2019-08-14 16:58:29 +00: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),
|
2020-08-05 23:22:07 +00:00
|
|
|
FromSearchDialog(R.id.searchDialogFragment),
|
2019-08-14 16:58:29 +00:00
|
|
|
FromSettings(R.id.settingsFragment),
|
|
|
|
FromBookmarks(R.id.bookmarkFragment),
|
2022-03-04 18:06:51 +00:00
|
|
|
FromBookmarkSearchDialog(R.id.bookmarkSearchDialogFragment),
|
2019-08-14 16:58:29 +00:00
|
|
|
FromHistory(R.id.historyFragment),
|
2022-02-04 17:15:31 +00:00
|
|
|
FromHistorySearchDialog(R.id.historySearchDialogFragment),
|
2021-08-23 16:25:30 +00:00
|
|
|
FromHistoryMetadataGroup(R.id.historyMetadataGroupFragment),
|
2020-07-02 02:37:03 +00:00
|
|
|
FromTrackingProtectionExceptions(R.id.trackingProtectionExceptionsFragment),
|
2019-09-10 20:29:21 +00:00
|
|
|
FromAbout(R.id.aboutFragment),
|
2019-10-10 18:16:21 +00:00
|
|
|
FromTrackingProtection(R.id.trackingProtectionFragment),
|
2022-03-04 08:00:40 +00:00
|
|
|
FromHttpsOnlyMode(R.id.httpsOnlyFragment),
|
2021-08-27 00:02:36 +00:00
|
|
|
FromTrackingProtectionDialog(R.id.trackingProtectionPanelDialogFragment),
|
2020-04-21 11:44:59 +00:00
|
|
|
FromSavedLoginsFragment(R.id.savedLoginsFragment),
|
|
|
|
FromAddNewDeviceFragment(R.id.addNewDeviceFragment),
|
|
|
|
FromAddSearchEngineFragment(R.id.addSearchEngineFragment),
|
2020-07-02 02:13:23 +00:00
|
|
|
FromEditCustomSearchEngineFragment(R.id.editCustomSearchEngineFragment),
|
2020-07-07 17:31:05 +00:00
|
|
|
FromAddonDetailsFragment(R.id.addonDetailsFragment),
|
2021-08-09 18:43:44 +00:00
|
|
|
FromStudiesFragment(R.id.studiesFragment),
|
2020-07-13 13:05:28 +00:00
|
|
|
FromAddonPermissionsDetailsFragment(R.id.addonPermissionsDetailFragment),
|
2020-08-18 04:09:27 +00:00
|
|
|
FromLoginDetailFragment(R.id.loginDetailFragment),
|
2021-06-01 03:12:37 +00:00
|
|
|
FromTabsTray(R.id.tabsTrayFragment),
|
2022-09-09 12:23:13 +00:00
|
|
|
FromRecentlyClosed(R.id.recentlyClosedFragment),
|
2019-08-14 16:58:29 +00:00
|
|
|
}
|