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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/TabBlimpContentsObserver.java

Issue 2623023002: Remove //chrome as an embedder of blimp. (Closed)
Patch Set: One more rebase for good measure Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/tab/TabBlimpContentsObserver.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabBlimpContentsObserver.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabBlimpContentsObserver.java
deleted file mode 100644
index 38203177465a7f6e7a10bf2cd70267596b2490c8..0000000000000000000000000000000000000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabBlimpContentsObserver.java
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser.tab;
-
-import org.chromium.base.ObserverList.RewindableIterator;
-import org.chromium.blimp_public.contents.EmptyBlimpContentsObserver;
-import org.chromium.ui.base.PageTransition;
-
-/**
- * BlimpContentsObserver used by Tab.
- */
-public class TabBlimpContentsObserver extends EmptyBlimpContentsObserver {
- private Tab mTab;
- private boolean mPageIsLoading;
-
- public TabBlimpContentsObserver(Tab tab) {
- mTab = tab;
- mPageIsLoading = false;
- }
-
- /**
- * All UI updates related to navigation state should be notified from this method.
- */
- @Override
- public void onNavigationStateChanged() {
- mTab.updateTitle();
- RewindableIterator<TabObserver> observers = mTab.getTabObservers();
- while (observers.hasNext()) {
- observers.next().onUrlUpdated(mTab);
- }
- }
-
- /**
- * Tab can use this to drive what kind of content to show based on the URL.
- * Also sets the loading status of the tab correctly.
- */
- @Override
- public void onLoadingStateChanged(boolean loading) {
- if (loading) {
- // Passing true for toDifferentDocument to update visuals related to location bar.
- mTab.onLoadStarted(true);
- } else {
- mTab.onLoadStopped();
- }
- }
-
- /**
- * This method is used to update the status of progress bar.
- */
- @Override
- public void onPageLoadingStateChanged(boolean loading) {
- mPageIsLoading = loading;
- if (loading) {
- mTab.didStartPageLoad(mTab.getUrl(), false);
-
- // Simulate provisional load start and completion events.
- mTab.handleDidStartProvisionalLoadForFrame(true, mTab.getUrl());
-
- // TODO(dtrainor): Investigate if we need to pipe through a more accurate PageTransition
- // here.
- mTab.handleDidCommitProvisonalLoadForFrame(mTab.getUrl(), PageTransition.TYPED);
-
- // Currently, blimp doesn't have a way to calculate the progress. So we are sending a
- // fake progress value.
- mTab.notifyLoadProgress(30);
- } else {
- mTab.notifyLoadProgress(100);
- mTab.didFinishPageLoad();
- }
- }
-
- /**
- * @return a value between 0 and 100 reflecting what percentage of the page load is complete.
- */
- public int getMostRecentProgress() {
- return mPageIsLoading ? 30 : 100;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698