Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java

Issue 2754383004: Rename WebsiteSettings code to PageInfo. (Closed)
Patch Set: Address msw@'s comments. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.customtabs; 5 package org.chromium.chrome.browser.customtabs;
6 6
7 import android.app.PendingIntent; 7 import android.app.PendingIntent;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.content.SharedPreferences; 10 import android.content.SharedPreferences;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.StateChange Reason; 51 import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.StateChange Reason;
52 import org.chromium.chrome.browser.compositor.layouts.LayoutManagerDocument; 52 import org.chromium.chrome.browser.compositor.layouts.LayoutManagerDocument;
53 import org.chromium.chrome.browser.datausage.DataUseTabUIManager; 53 import org.chromium.chrome.browser.datausage.DataUseTabUIManager;
54 import org.chromium.chrome.browser.document.ChromeLauncherActivity; 54 import org.chromium.chrome.browser.document.ChromeLauncherActivity;
55 import org.chromium.chrome.browser.externalnav.ExternalNavigationDelegateImpl; 55 import org.chromium.chrome.browser.externalnav.ExternalNavigationDelegateImpl;
56 import org.chromium.chrome.browser.firstrun.FirstRunSignInProcessor; 56 import org.chromium.chrome.browser.firstrun.FirstRunSignInProcessor;
57 import org.chromium.chrome.browser.fullscreen.BrowserStateBrowserControlsVisibil ityDelegate; 57 import org.chromium.chrome.browser.fullscreen.BrowserStateBrowserControlsVisibil ityDelegate;
58 import org.chromium.chrome.browser.gsa.GSAState; 58 import org.chromium.chrome.browser.gsa.GSAState;
59 import org.chromium.chrome.browser.metrics.PageLoadMetrics; 59 import org.chromium.chrome.browser.metrics.PageLoadMetrics;
60 import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings; 60 import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings;
61 import org.chromium.chrome.browser.page_info.WebsiteSettingsPopup; 61 import org.chromium.chrome.browser.page_info.PageInfoPopup;
62 import org.chromium.chrome.browser.rappor.RapporServiceBridge; 62 import org.chromium.chrome.browser.rappor.RapporServiceBridge;
63 import org.chromium.chrome.browser.tab.EmptyTabObserver; 63 import org.chromium.chrome.browser.tab.EmptyTabObserver;
64 import org.chromium.chrome.browser.tab.Tab; 64 import org.chromium.chrome.browser.tab.Tab;
65 import org.chromium.chrome.browser.tab.TabDelegateFactory; 65 import org.chromium.chrome.browser.tab.TabDelegateFactory;
66 import org.chromium.chrome.browser.tab.TabIdManager; 66 import org.chromium.chrome.browser.tab.TabIdManager;
67 import org.chromium.chrome.browser.tabmodel.ChromeTabCreator; 67 import org.chromium.chrome.browser.tabmodel.ChromeTabCreator;
68 import org.chromium.chrome.browser.tabmodel.EmptyTabModelObserver; 68 import org.chromium.chrome.browser.tabmodel.EmptyTabModelObserver;
69 import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType; 69 import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType;
70 import org.chromium.chrome.browser.tabmodel.TabModelObserver; 70 import org.chromium.chrome.browser.tabmodel.TabModelObserver;
71 import org.chromium.chrome.browser.tabmodel.TabModelSelector; 71 import org.chromium.chrome.browser.tabmodel.TabModelSelector;
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 RecordUserAction.record("MobileMenuFindInPage"); 895 RecordUserAction.record("MobileMenuFindInPage");
896 } else { 896 } else {
897 RecordUserAction.record("MobileShortcutFindInPage"); 897 RecordUserAction.record("MobileShortcutFindInPage");
898 } 898 }
899 } else if (id == R.id.open_in_browser_id) { 899 } else if (id == R.id.open_in_browser_id) {
900 openCurrentUrlInBrowser(false); 900 openCurrentUrlInBrowser(false);
901 RecordUserAction.record("CustomTabsMenuOpenInChrome"); 901 RecordUserAction.record("CustomTabsMenuOpenInChrome");
902 return true; 902 return true;
903 } else if (id == R.id.info_menu_id) { 903 } else if (id == R.id.info_menu_id) {
904 if (getTabModelSelector().getCurrentTab() == null) return false; 904 if (getTabModelSelector().getCurrentTab() == null) return false;
905 WebsiteSettingsPopup.show( 905 PageInfoPopup.show(this, getTabModelSelector().getCurrentTab(),
906 this, getTabModelSelector().getCurrentTab(), 906 getToolbarManager().getContentPublisher(), PageInfoPopup.OPE NED_FROM_MENU);
907 getToolbarManager().getContentPublisher(),
908 WebsiteSettingsPopup.OPENED_FROM_MENU);
909 return true; 907 return true;
910 } 908 }
911 return super.onMenuOrKeyboardAction(id, fromMenu); 909 return super.onMenuOrKeyboardAction(id, fromMenu);
912 } 910 }
913 911
914 @Override 912 @Override
915 protected void setStatusBarColor(Tab tab, int color) { 913 protected void setStatusBarColor(Tab tab, int color) {
916 // Intentionally do nothing as CustomTabActivity explicitly sets status bar color. Except 914 // Intentionally do nothing as CustomTabActivity explicitly sets status bar color. Except
917 // for Custom Tabs opened by Chrome. 915 // for Custom Tabs opened by Chrome.
918 if (mIntentDataProvider.isOpenedByChrome()) super.setStatusBarColor(tab, color); 916 if (mIntentDataProvider.isOpenedByChrome()) super.setStatusBarColor(tab, color);
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 Intent intent = ChromeLauncherActivity.createCustomTabActivityIntent( 1092 Intent intent = ChromeLauncherActivity.createCustomTabActivityIntent(
1095 context, customTabIntent.intent, false); 1093 context, customTabIntent.intent, false);
1096 intent.setPackage(context.getPackageName()); 1094 intent.setPackage(context.getPackageName());
1097 intent.putExtra(CustomTabIntentDataProvider.EXTRA_IS_INFO_PAGE, true); 1095 intent.putExtra(CustomTabIntentDataProvider.EXTRA_IS_INFO_PAGE, true);
1098 intent.putExtra(Browser.EXTRA_APPLICATION_ID, context.getPackageName()); 1096 intent.putExtra(Browser.EXTRA_APPLICATION_ID, context.getPackageName());
1099 IntentHandler.addTrustedIntentExtras(intent); 1097 IntentHandler.addTrustedIntentExtras(intent);
1100 1098
1101 context.startActivity(intent); 1099 context.startActivity(intent);
1102 } 1100 }
1103 } 1101 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698