org.chromium.base.BaseChromiumApplication Java Examples
The following examples show how to use
org.chromium.base.BaseChromiumApplication.
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: ChromeFullscreenManager.java From delion with Apache License 2.0 | 6 votes |
@Override public void onActivityStateChange(Activity activity, int newState) { if (newState == ActivityState.STOPPED) { // Exit fullscreen in onStop to ensure the system UI flags are set correctly when // showing again (on JB MR2+ builds, the omnibox would be covered by the // notification bar when this was done in onStart()). setPersistentFullscreenMode(false); } else if (newState == ActivityState.STARTED) { // Force the controls to be shown until we get an update from a Tab. This is a // workaround for when the renderer is killed but the Tab is not notified. mActivityShowToken = showControlsPersistentAndClearOldToken(mActivityShowToken); } else if (newState == ActivityState.DESTROYED) { ApplicationStatus.unregisterActivityStateListener(this); ((BaseChromiumApplication) mWindow.getContext().getApplicationContext()) .unregisterWindowFocusChangedListener(this); } }
Example #2
Source File: ChromeFullscreenManager.java From AndroidChromium with Apache License 2.0 | 6 votes |
@Override public void onActivityStateChange(Activity activity, int newState) { if (newState == ActivityState.STOPPED) { // Exit fullscreen in onStop to ensure the system UI flags are set correctly when // showing again (on JB MR2+ builds, the omnibox would be covered by the // notification bar when this was done in onStart()). setPersistentFullscreenMode(false); } else if (newState == ActivityState.STARTED) { ThreadUtils.postOnUiThreadDelayed(new Runnable() { @Override public void run() { mBrowserVisibilityDelegate.showControlsTransient(); } }, ACTIVITY_RETURN_SHOW_REQUEST_DELAY_MS); } else if (newState == ActivityState.DESTROYED) { ApplicationStatus.unregisterActivityStateListener(this); ((BaseChromiumApplication) mWindow.getContext().getApplicationContext()) .unregisterWindowFocusChangedListener(this); mTabModelObserver.destroy(); } }
Example #3
Source File: ChromeFullscreenManager.java From 365browser with Apache License 2.0 | 6 votes |
@Override public void onActivityStateChange(Activity activity, int newState) { if (newState == ActivityState.STOPPED && mExitFullscreenOnStop) { // Exit fullscreen in onStop to ensure the system UI flags are set correctly when // showing again (on JB MR2+ builds, the omnibox would be covered by the // notification bar when this was done in onStart()). setPersistentFullscreenMode(false); } else if (newState == ActivityState.STARTED) { ThreadUtils.postOnUiThreadDelayed(new Runnable() { @Override public void run() { mBrowserVisibilityDelegate.showControlsTransient(); } }, ACTIVITY_RETURN_SHOW_REQUEST_DELAY_MS); } else if (newState == ActivityState.DESTROYED) { ApplicationStatus.unregisterActivityStateListener(this); ((BaseChromiumApplication) mWindow.getContext().getApplicationContext()) .unregisterWindowFocusChangedListener(this); mTabModelObserver.destroy(); } }