org.chromium.chrome.browser.rlz.RevenueStats Java Examples
The following examples show how to use
org.chromium.chrome.browser.rlz.RevenueStats.
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: ChromeApplication.java From delion with Apache License 2.0 | 4 votes |
/** * @return An instance of RevenueStats to be installed as a singleton. */ public RevenueStats createRevenueStatsInstance() { return new RevenueStats(); }
Example #2
Source File: Tab.java From delion with Apache License 2.0 | 4 votes |
/** * Initializes {@link Tab} with {@code webContents}. If {@code webContents} is {@code null} a * new {@link WebContents} will be created for this {@link Tab}. * @param webContents A {@link WebContents} object or {@code null} if one should be * created. * @param tabContentManager A {@link TabContentManager} instance or {@code null} if the web * content will be managed/displayed manually. * @param delegateFactory The {@link TabDelegateFactory} to be used for delegate creation. * @param initiallyHidden Only used if {@code webContents} is {@code null}. Determines * whether or not the newly created {@link WebContents} will be hidden * or not. * @param unfreeze Whether there should be an attempt to restore state at the end of * the initialization. */ public final void initialize(WebContents webContents, TabContentManager tabContentManager, TabDelegateFactory delegateFactory, boolean initiallyHidden, boolean unfreeze) { try { TraceEvent.begin("Tab.initialize"); mDelegateFactory = delegateFactory; initializeNative(); RevenueStats.getInstance().tabCreated(this); if (AppBannerManager.isEnabled()) { mAppBannerManager = mDelegateFactory.createAppBannerManager(this); if (mAppBannerManager != null) addObserver(mAppBannerManager); } mTopControlsVisibilityDelegate = mDelegateFactory.createTopControlsVisibilityDelegate(this); // Attach the TabContentManager if we have one. This will bind this Tab's content layer // to this manager. // TODO(dtrainor): Remove this and move to a pull model instead of pushing the layer. attachTabContentManager(tabContentManager); // If there is a frozen WebContents state or a pending lazy load, don't create a new // WebContents. if (getFrozenContentsState() != null || getPendingLoadParams() != null) { if (unfreeze) unfreezeContents(); return; } boolean creatingWebContents = webContents == null; if (creatingWebContents) { webContents = WebContentsFactory.createWebContents(isIncognito(), initiallyHidden); } ContentViewCore contentViewCore = ContentViewCore.fromWebContents(webContents); if (contentViewCore == null) { initContentViewCore(webContents); } else { setContentViewCore(contentViewCore); } if (!creatingWebContents && webContents.isLoadingToDifferentDocument()) { didStartPageLoad(webContents.getUrl(), false); } } finally { if (mTimestampMillis == INVALID_TIMESTAMP) { mTimestampMillis = System.currentTimeMillis(); } TraceEvent.end("Tab.initialize"); } }
Example #3
Source File: ChromeApplication.java From AndroidChromium with Apache License 2.0 | 4 votes |
/** * @return An instance of RevenueStats to be installed as a singleton. */ public RevenueStats createRevenueStatsInstance() { return new RevenueStats(); }
Example #4
Source File: Tab.java From AndroidChromium with Apache License 2.0 | 4 votes |
/** * Initializes {@link Tab} with {@code webContents}. If {@code webContents} is {@code null} a * new {@link WebContents} will be created for this {@link Tab}. * @param webContents A {@link WebContents} object or {@code null} if one should be * created. * @param tabContentManager A {@link TabContentManager} instance or {@code null} if the web * content will be managed/displayed manually. * @param delegateFactory The {@link TabDelegateFactory} to be used for delegate creation. * @param initiallyHidden Only used if {@code webContents} is {@code null}. Determines * whether or not the newly created {@link WebContents} will be hidden * or not. * @param unfreeze Whether there should be an attempt to restore state at the end of * the initialization. */ public final void initialize(WebContents webContents, TabContentManager tabContentManager, TabDelegateFactory delegateFactory, boolean initiallyHidden, boolean unfreeze) { try { TraceEvent.begin("Tab.initialize"); mDelegateFactory = delegateFactory; initializeNative(); RevenueStats.getInstance().tabCreated(this); mBrowserControlsVisibilityDelegate = mDelegateFactory.createBrowserControlsVisibilityDelegate(this); mBlimp = BlimpClientContextFactory .getBlimpClientContextForProfile( Profile.getLastUsedProfile().getOriginalProfile()) .isBlimpEnabled() && !mIncognito; // Attach the TabContentManager if we have one. This will bind this Tab's content layer // to this manager. // TODO(dtrainor): Remove this and move to a pull model instead of pushing the layer. attachTabContentManager(tabContentManager); // If there is a frozen WebContents state or a pending lazy load, don't create a new // WebContents. if (getFrozenContentsState() != null || getPendingLoadParams() != null) { if (unfreeze) unfreezeContents(); return; } if (isBlimpTab() && getBlimpContents() == null) { Profile profile = Profile.getLastUsedProfile(); if (mIncognito) profile = profile.getOffTheRecordProfile(); mBlimpContents = nativeInitBlimpContents( mNativeTabAndroid, profile, mWindowAndroid.getNativePointer()); if (mBlimpContents != null) { mBlimpContentsObserver = new TabBlimpContentsObserver(this); mBlimpContents.addObserver(mBlimpContentsObserver); } else { mBlimp = false; } } boolean creatingWebContents = webContents == null; if (creatingWebContents) { webContents = WarmupManager.getInstance().takeSpareWebContents( isIncognito(), initiallyHidden); if (webContents == null) { webContents = WebContentsFactory.createWebContents(isIncognito(), initiallyHidden); } } ContentViewCore contentViewCore = ContentViewCore.fromWebContents(webContents); if (contentViewCore == null) { initContentViewCore(webContents); } else { setContentViewCore(contentViewCore); } if (!creatingWebContents && webContents.isLoadingToDifferentDocument()) { didStartPageLoad(webContents.getUrl(), false); } getAppBannerManager().setIsEnabledForTab(mDelegateFactory.canShowAppBanners(this)); } finally { if (mTimestampMillis == INVALID_TIMESTAMP) { mTimestampMillis = System.currentTimeMillis(); } TraceEvent.end("Tab.initialize"); } }
Example #5
Source File: Tab.java From 365browser with Apache License 2.0 | 4 votes |
/** * Initializes {@link Tab} with {@code webContents}. If {@code webContents} is {@code null} a * new {@link WebContents} will be created for this {@link Tab}. * @param webContents A {@link WebContents} object or {@code null} if one should be * created. * @param tabContentManager A {@link TabContentManager} instance or {@code null} if the web * content will be managed/displayed manually. * @param delegateFactory The {@link TabDelegateFactory} to be used for delegate creation. * @param initiallyHidden Only used if {@code webContents} is {@code null}. Determines * whether or not the newly created {@link WebContents} will be hidden * or not. * @param unfreeze Whether there should be an attempt to restore state at the end of * the initialization. */ public final void initialize(WebContents webContents, TabContentManager tabContentManager, TabDelegateFactory delegateFactory, boolean initiallyHidden, boolean unfreeze) { try { TraceEvent.begin("Tab.initialize"); mDelegateFactory = delegateFactory; initializeNative(); RevenueStats.getInstance().tabCreated(this); mBrowserControlsVisibilityDelegate = mDelegateFactory.createBrowserControlsVisibilityDelegate(this); // Attach the TabContentManager if we have one. This will bind this Tab's content layer // to this manager. // TODO(dtrainor): Remove this and move to a pull model instead of pushing the layer. attachTabContentManager(tabContentManager); // If there is a frozen WebContents state or a pending lazy load, don't create a new // WebContents. if (getFrozenContentsState() != null || getPendingLoadParams() != null) { if (unfreeze) unfreezeContents(); return; } boolean creatingWebContents = webContents == null; if (creatingWebContents) { webContents = WarmupManager.getInstance().takeSpareWebContents( isIncognito(), initiallyHidden); if (webContents == null) { webContents = WebContentsFactory.createWebContents(isIncognito(), initiallyHidden); } } ContentViewCore contentViewCore = ContentViewCore.fromWebContents(webContents); if (contentViewCore == null) { initContentViewCore(webContents); } else { setContentViewCore(contentViewCore); } mContentViewCore.addImeEventObserver(new ImeEventObserver() { @Override public void onImeEvent() { // Some text was set in the page. Don't reuse it if a tab is // open from the same external application, we might lose some // user data. mAppAssociatedWith = null; } @Override public void onNodeAttributeUpdated(boolean editable, boolean password) { if (getFullscreenManager() == null) return; updateFullscreenEnabledState(); } }); if (!creatingWebContents && webContents.isLoadingToDifferentDocument()) { didStartPageLoad(webContents.getUrl(), false); } getAppBannerManager().setIsEnabledForTab(mDelegateFactory.canShowAppBanners(this)); } finally { if (mTimestampMillis == INVALID_TIMESTAMP) { mTimestampMillis = System.currentTimeMillis(); } TraceEvent.end("Tab.initialize"); } }
Example #6
Source File: AppHooks.java From 365browser with Apache License 2.0 | 4 votes |
/** * @return An instance of RevenueStats to be installed as a singleton. */ public RevenueStats createRevenueStatsInstance() { return new RevenueStats(); }