org.chromium.chrome.browser.nfc.BeamController Java Examples
The following examples show how to use
org.chromium.chrome.browser.nfc.BeamController.
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: ChromeActivity.java From delion with Apache License 2.0 | 6 votes |
/** * All deferred startup tasks that require the activity rather than the app should go here. */ private void onDeferredStartupForActivity() { BeamController.registerForBeam(this, new BeamProvider() { @Override public String getTabUrlForBeam() { if (isOverlayVisible()) return null; if (getActivityTab() == null) return null; return getActivityTab().getUrl(); } }); UpdateMenuItemHelper.getInstance().checkForUpdateOnBackgroundThread(this); if (mToolbarManager != null) { String simpleName = getClass().getSimpleName(); RecordHistogram.recordTimesHistogram("MobileStartup.ToolbarInflationTime." + simpleName, mInflateInitialLayoutDurationMs, TimeUnit.MILLISECONDS); mToolbarManager.onDeferredStartup(getOnCreateTimestampMs(), simpleName); } if (MultiWindowUtils.getInstance().isInMultiWindowMode(this)) { onDeferredStartupForMultiWindowMode(); } }
Example #2
Source File: ChromeActivity.java From AndroidChromium with Apache License 2.0 | 5 votes |
/** * All deferred startup tasks that require the activity rather than the app should go here. */ private void initDeferredStartupForActivity() { DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() { @Override public void run() { if (isActivityDestroyed()) return; BeamController.registerForBeam(ChromeActivity.this, new BeamProvider() { @Override public String getTabUrlForBeam() { if (isOverlayVisible()) return null; if (getActivityTab() == null) return null; return getActivityTab().getUrl(); } }); UpdateMenuItemHelper.getInstance().checkForUpdateOnBackgroundThread( ChromeActivity.this); } }); final String simpleName = getClass().getSimpleName(); DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() { @Override public void run() { if (isActivityDestroyed()) return; if (mToolbarManager != null) { RecordHistogram.recordTimesHistogram( "MobileStartup.ToolbarInflationTime." + simpleName, mInflateInitialLayoutDurationMs, TimeUnit.MILLISECONDS); mToolbarManager.onDeferredStartup(getOnCreateTimestampMs(), simpleName); } if (MultiWindowUtils.getInstance().isInMultiWindowMode(ChromeActivity.this)) { onDeferredStartupForMultiWindowMode(); } } }); }
Example #3
Source File: ChromeActivity.java From 365browser with Apache License 2.0 | 4 votes |
/** * All deferred startup tasks that require the activity rather than the app should go here. */ private void initDeferredStartupForActivity() { DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() { @Override public void run() { if (isActivityDestroyed()) return; BeamController.registerForBeam(ChromeActivity.this, new BeamProvider() { @Override public String getTabUrlForBeam() { if (isOverlayVisible()) return null; if (getActivityTab() == null) return null; return getActivityTab().getUrl(); } }); UpdateMenuItemHelper.getInstance().checkForUpdateOnBackgroundThread( ChromeActivity.this); } }); final String simpleName = getClass().getSimpleName(); DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() { @Override public void run() { if (isActivityDestroyed()) return; if (mToolbarManager != null) { RecordHistogram.recordTimesHistogram( "MobileStartup.ToolbarInflationTime." + simpleName, mInflateInitialLayoutDurationMs, TimeUnit.MILLISECONDS); mToolbarManager.onDeferredStartup(getOnCreateTimestampMs(), simpleName); } if (MultiWindowUtils.getInstance().isInMultiWindowMode(ChromeActivity.this)) { onDeferredStartupForMultiWindowMode(); } long intentTimestamp = IntentHandler.getTimestampFromIntent(getIntent()); if (intentTimestamp != -1) { recordIntentToCreationTime(getOnCreateTimestampMs() - intentTimestamp); } } }); DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() { @Override public void run() { if (isActivityDestroyed()) return; ForcedSigninProcessor.checkCanSignIn(ChromeActivity.this); } }); DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() { @Override public void run() { if (isActivityDestroyed() || mBottomSheetContentController == null) return; mBottomSheetContentController.initializeDefaultContent(); } }); }