org.chromium.chrome.browser.preferences.website.SingleWebsitePreferences Java Examples
The following examples show how to use
org.chromium.chrome.browser.preferences.website.SingleWebsitePreferences.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SearchEngineAdapter.java From delion with Apache License 2.0 | 6 votes |
private void onLocationLinkClicked() { if (!LocationUtils.getInstance().isSystemLocationSettingEnabled(mContext)) { mContext.startActivity(LocationUtils.getInstance().getSystemLocationSettingsIntent()); } else { Intent settingsIntent = PreferencesLauncher.createIntentForSettingsPage( mContext, SingleWebsitePreferences.class.getName()); String url = TemplateUrlService.getInstance().getSearchEngineUrlFromTemplateUrl( toIndex(mSelectedSearchEnginePosition)); Bundle fragmentArgs = SingleWebsitePreferences.createFragmentArgsForSite(url); fragmentArgs.putBoolean(SingleWebsitePreferences.EXTRA_LOCATION, locationEnabled(mSelectedSearchEnginePosition, true)); settingsIntent.putExtra(Preferences.EXTRA_SHOW_FRAGMENT_ARGUMENTS, fragmentArgs); mContext.startActivity(settingsIntent); } mCallback.onDismissDialog(); }
Example #2
Source File: SearchEngineAdapter.java From 365browser with Apache License 2.0 | 6 votes |
private void onLocationLinkClicked() { mIsLocationPermissionChanged = true; if (!LocationUtils.getInstance().isSystemLocationSettingEnabled()) { mContext.startActivity(LocationUtils.getInstance().getSystemLocationSettingsIntent()); } else { Intent settingsIntent = PreferencesLauncher.createIntentForSettingsPage( mContext, SingleWebsitePreferences.class.getName()); String url = TemplateUrlService.getInstance().getSearchEngineUrlFromTemplateUrl( toKeyword(mSelectedSearchEnginePosition)); Bundle fragmentArgs = SingleWebsitePreferences.createFragmentArgsForSite(url); fragmentArgs.putBoolean(SingleWebsitePreferences.EXTRA_LOCATION, locationEnabled((TemplateUrl) getItem(mSelectedSearchEnginePosition))); settingsIntent.putExtra(Preferences.EXTRA_SHOW_FRAGMENT_ARGUMENTS, fragmentArgs); mContext.startActivity(settingsIntent); } }
Example #3
Source File: ChromeApplication.java From delion with Apache License 2.0 | 5 votes |
/** * Opens the single origin settings page for the given URL. * * @param url The URL to show the single origin settings for. This is a complete url * including scheme, domain, port, path, etc. */ protected void showSingleOriginSettings(String url) { Bundle fragmentArgs = SingleWebsitePreferences.createFragmentArgsForSite(url); Intent intent = PreferencesLauncher.createIntentForSettingsPage( this, SingleWebsitePreferences.class.getName()); intent.putExtra(Preferences.EXTRA_SHOW_FRAGMENT_ARGUMENTS, fragmentArgs); startActivity(intent); }
Example #4
Source File: SearchEngineAdapter.java From AndroidChromium with Apache License 2.0 | 5 votes |
private void onLocationLinkClicked() { if (!LocationUtils.getInstance().isSystemLocationSettingEnabled()) { mContext.startActivity(LocationUtils.getInstance().getSystemLocationSettingsIntent()); } else { Intent settingsIntent = PreferencesLauncher.createIntentForSettingsPage( mContext, SingleWebsitePreferences.class.getName()); String url = TemplateUrlService.getInstance().getSearchEngineUrlFromTemplateUrl( toIndex(mSelectedSearchEnginePosition)); Bundle fragmentArgs = SingleWebsitePreferences.createFragmentArgsForSite(url); fragmentArgs.putBoolean(SingleWebsitePreferences.EXTRA_LOCATION, locationEnabled(mSelectedSearchEnginePosition, true)); settingsIntent.putExtra(Preferences.EXTRA_SHOW_FRAGMENT_ARGUMENTS, fragmentArgs); mContext.startActivity(settingsIntent); } }
Example #5
Source File: SearchGeolocationDisclosureInfoBar.java From AndroidChromium with Apache License 2.0 | 5 votes |
@CalledByNative private static void showSettingsPage(String searchUrl) { Context context = ContextUtils.getApplicationContext(); Intent settingsIntent = PreferencesLauncher.createIntentForSettingsPage( context, SingleWebsitePreferences.class.getName()); Bundle fragmentArgs = SingleWebsitePreferences.createFragmentArgsForSite(searchUrl); settingsIntent.putExtra(Preferences.EXTRA_SHOW_FRAGMENT_ARGUMENTS, fragmentArgs); IntentUtils.safeStartActivity(context, settingsIntent); }
Example #6
Source File: SearchGeolocationDisclosureInfoBar.java From 365browser with Apache License 2.0 | 5 votes |
@CalledByNative private static void showSettingsPage(String searchUrl) { Context context = ContextUtils.getApplicationContext(); Intent settingsIntent = PreferencesLauncher.createIntentForSettingsPage( context, SingleWebsitePreferences.class.getName()); Bundle fragmentArgs = SingleWebsitePreferences.createFragmentArgsForSite(searchUrl); settingsIntent.putExtra(Preferences.EXTRA_SHOW_FRAGMENT_ARGUMENTS, fragmentArgs); IntentUtils.safeStartActivity(context, settingsIntent); }