2019-08-14 18:58:29 +02:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
package org.mozilla.fenix
|
|
|
|
|
|
|
|
import androidx.annotation.IdRes
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used with [HomeActivity.openToBrowser] to indicate which fragment
|
|
|
|
* the browser is being opened from.
|
|
|
|
*
|
|
|
|
* @property fragmentId ID of the fragment opening the browser in the navigation graph.
|
|
|
|
* An ID of `0` indicates a global action with no corresponding opening fragment.
|
|
|
|
*/
|
|
|
|
enum class BrowserDirection(@IdRes val fragmentId: Int) {
|
|
|
|
FromGlobal(0),
|
|
|
|
FromHome(R.id.homeFragment),
|
|
|
|
FromSearch(R.id.searchFragment),
|
|
|
|
FromSettings(R.id.settingsFragment),
|
2020-05-26 22:25:52 +02:00
|
|
|
FromSyncedTabs(R.id.syncedTabsFragment),
|
2019-08-14 18:58:29 +02:00
|
|
|
FromBookmarks(R.id.bookmarkFragment),
|
|
|
|
FromHistory(R.id.historyFragment),
|
2020-07-02 04:37:03 +02:00
|
|
|
FromTrackingProtectionExceptions(R.id.trackingProtectionExceptionsFragment),
|
2019-09-10 22:29:21 +02:00
|
|
|
FromAbout(R.id.aboutFragment),
|
2019-10-10 20:16:21 +02:00
|
|
|
FromTrackingProtection(R.id.trackingProtectionFragment),
|
2020-04-21 13:44:59 +02:00
|
|
|
FromSavedLoginsFragment(R.id.savedLoginsFragment),
|
|
|
|
FromAddNewDeviceFragment(R.id.addNewDeviceFragment),
|
|
|
|
FromAddSearchEngineFragment(R.id.addSearchEngineFragment),
|
2020-07-02 04:13:23 +02:00
|
|
|
FromEditCustomSearchEngineFragment(R.id.editCustomSearchEngineFragment),
|
2020-07-07 19:31:05 +02:00
|
|
|
FromAddonDetailsFragment(R.id.addonDetailsFragment),
|
2020-07-13 15:05:28 +02:00
|
|
|
FromAddonPermissionsDetailsFragment(R.id.addonPermissionsDetailFragment),
|
2020-07-07 19:31:05 +02:00
|
|
|
FromLoginDetailFragment(R.id.loginDetailFragment)
|
2019-08-14 18:58:29 +02:00
|
|
|
}
|