Chromium Code Reviews| OLD | NEW |
|---|---|
| 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; | 5 package org.chromium.chrome.browser; |
| 6 | 6 |
| 7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.annotation.TargetApi; | 8 import android.annotation.TargetApi; |
| 9 import android.app.Activity; | 9 import android.app.Activity; |
| 10 import android.app.SearchManager; | 10 import android.app.SearchManager; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 import org.chromium.chrome.browser.nfc.BeamController; | 96 import org.chromium.chrome.browser.nfc.BeamController; |
| 97 import org.chromium.chrome.browser.nfc.BeamProvider; | 97 import org.chromium.chrome.browser.nfc.BeamProvider; |
| 98 import org.chromium.chrome.browser.ntp.NewTabPage; | 98 import org.chromium.chrome.browser.ntp.NewTabPage; |
| 99 import org.chromium.chrome.browser.ntp.NewTabPageUma; | 99 import org.chromium.chrome.browser.ntp.NewTabPageUma; |
| 100 import org.chromium.chrome.browser.offlinepages.OfflinePageBridge; | 100 import org.chromium.chrome.browser.offlinepages.OfflinePageBridge; |
| 101 import org.chromium.chrome.browser.offlinepages.OfflinePageUtils; | 101 import org.chromium.chrome.browser.offlinepages.OfflinePageUtils; |
| 102 import org.chromium.chrome.browser.omaha.UpdateMenuItemHelper; | 102 import org.chromium.chrome.browser.omaha.UpdateMenuItemHelper; |
| 103 import org.chromium.chrome.browser.pageinfo.WebsiteSettingsPopup; | 103 import org.chromium.chrome.browser.pageinfo.WebsiteSettingsPopup; |
| 104 import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomiza tions; | 104 import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomiza tions; |
| 105 import org.chromium.chrome.browser.physicalweb.PhysicalWebShareActivity; | 105 import org.chromium.chrome.browser.physicalweb.PhysicalWebShareActivity; |
| 106 import org.chromium.chrome.browser.physicalweb.PhysicalWebShareEntryActivity; | |
| 106 import org.chromium.chrome.browser.preferences.ChromePreferenceManager; | 107 import org.chromium.chrome.browser.preferences.ChromePreferenceManager; |
| 107 import org.chromium.chrome.browser.preferences.PrefServiceBridge; | 108 import org.chromium.chrome.browser.preferences.PrefServiceBridge; |
| 108 import org.chromium.chrome.browser.preferences.PreferencesLauncher; | 109 import org.chromium.chrome.browser.preferences.PreferencesLauncher; |
| 109 import org.chromium.chrome.browser.printing.PrintShareActivity; | 110 import org.chromium.chrome.browser.printing.PrintShareActivity; |
| 110 import org.chromium.chrome.browser.printing.TabPrinter; | 111 import org.chromium.chrome.browser.printing.TabPrinter; |
| 111 import org.chromium.chrome.browser.share.OptionalShareTargetsManager; | 112 import org.chromium.chrome.browser.share.OptionalShareTargetsManager; |
| 112 import org.chromium.chrome.browser.share.ShareActivity; | 113 import org.chromium.chrome.browser.share.ShareActivity; |
| 113 import org.chromium.chrome.browser.share.ShareHelper; | 114 import org.chromium.chrome.browser.share.ShareHelper; |
| 114 import org.chromium.chrome.browser.snackbar.BottomContainer; | 115 import org.chromium.chrome.browser.snackbar.BottomContainer; |
| 115 import org.chromium.chrome.browser.snackbar.DataReductionPromoSnackbarController ; | 116 import org.chromium.chrome.browser.snackbar.DataReductionPromoSnackbarController ; |
| (...skipping 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1830 onShareMenuItemSelected(id == R.id.direct_share_menu_id, | 1831 onShareMenuItemSelected(id == R.id.direct_share_menu_id, |
| 1831 getCurrentTabModel().isIncognito()); | 1832 getCurrentTabModel().isIncognito()); |
| 1832 } else if (id == R.id.print_id) { | 1833 } else if (id == R.id.print_id) { |
| 1833 PrintingController printingController = PrintingControllerImpl.getIn stance(); | 1834 PrintingController printingController = PrintingControllerImpl.getIn stance(); |
| 1834 if (printingController != null && !printingController.isBusy() | 1835 if (printingController != null && !printingController.isBusy() |
| 1835 && PrefServiceBridge.getInstance().isPrintingEnabled()) { | 1836 && PrefServiceBridge.getInstance().isPrintingEnabled()) { |
| 1836 printingController.startPrint(new TabPrinter(currentTab), | 1837 printingController.startPrint(new TabPrinter(currentTab), |
| 1837 new PrintManagerDelegateImpl(this)); | 1838 new PrintManagerDelegateImpl(this)); |
| 1838 RecordUserAction.record("MobileMenuPrint"); | 1839 RecordUserAction.record("MobileMenuPrint"); |
| 1839 } | 1840 } |
| 1841 } else if (id == R.id.physical_web_sharing_id) { | |
| 1842 Intent intent = new Intent(this, PhysicalWebShareEntryActivity.class ); | |
|
Ted C
2017/03/20 21:05:59
I saw the commit message, but I'm not sure I follo
iankc
2017/03/20 21:32:22
The problem isn't gaining access to the URL.
The p
Ted C
2017/03/21 00:01:22
I guess I'm surprised as the manager only unregist
iankc
2017/03/21 01:19:52
When
0. Click Share on menu.
1. Log: Components En
| |
| 1843 intent.putExtra(PhysicalWebShareEntryActivity.SHARING_ENTRY_URL, cur rentTab.getUrl()); | |
| 1844 startActivity(intent); | |
| 1840 } else if (id == R.id.add_to_homescreen_id) { | 1845 } else if (id == R.id.add_to_homescreen_id) { |
| 1841 AddToHomescreenManager addToHomescreenManager = | 1846 AddToHomescreenManager addToHomescreenManager = |
| 1842 new AddToHomescreenManager(this, currentTab); | 1847 new AddToHomescreenManager(this, currentTab); |
| 1843 addToHomescreenManager.start(); | 1848 addToHomescreenManager.start(); |
| 1844 RecordUserAction.record("MobileMenuAddToHomescreen"); | 1849 RecordUserAction.record("MobileMenuAddToHomescreen"); |
| 1845 } else if (id == R.id.open_webapk_id) { | 1850 } else if (id == R.id.open_webapk_id) { |
| 1846 Context context = ContextUtils.getApplicationContext(); | 1851 Context context = ContextUtils.getApplicationContext(); |
| 1847 String packageName = WebApkValidator.queryWebApkPackage(context, cur rentTab.getUrl()); | 1852 String packageName = WebApkValidator.queryWebApkPackage(context, cur rentTab.getUrl()); |
| 1848 Intent launchIntent = | 1853 Intent launchIntent = |
| 1849 context.getPackageManager().getLaunchIntentForPackage(packag eName); | 1854 context.getPackageManager().getLaunchIntentForPackage(packag eName); |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2117 * draw over VR contents should be hidden in this call. | 2122 * draw over VR contents should be hidden in this call. |
| 2118 */ | 2123 */ |
| 2119 public void onEnterVR() {} | 2124 public void onEnterVR() {} |
| 2120 | 2125 |
| 2121 /** | 2126 /** |
| 2122 * Called when VR mode using this activity is exited. Any state set for VR s hould be restored | 2127 * Called when VR mode using this activity is exited. Any state set for VR s hould be restored |
| 2123 * in this call, including showing 2D UI that was hidden. | 2128 * in this call, including showing 2D UI that was hidden. |
| 2124 */ | 2129 */ |
| 2125 public void onExitVR() {} | 2130 public void onExitVR() {} |
| 2126 } | 2131 } |
| OLD | NEW |