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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelDelegate.java

Issue 270883002: Upstream base implementations of TabModel, TabModelSelector, and TabModelObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 6 years, 7 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/tabmodel/TabModelDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelDelegate.java
new file mode 100644
index 0000000000000000000000000000000000000000..9b8c8a7ba779d250eb5c132bd876fff1307f0239
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelDelegate.java
@@ -0,0 +1,39 @@
+// Copyright 2014 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.tabmodel;
+
+import org.chromium.chrome.browser.Tab;
+import org.chromium.chrome.browser.tabmodel.TabModel.TabSelectionType;
+
+/**
+ * This class serves as a callback from TabModel to TabModelSelector. The number of methods in this
+ * class should be reduced to a minimum. http://crbug.com/263579
+ */
+public interface TabModelDelegate {
+
+ /**
+ * Called when a new tab is created.
+ */
+ void didCreateNewTab(Tab tab);
+
+ /**
+ * Called when the {@link TabModelSelector} or its {@link TabModel} has changed.
+ */
+ void didChange();
+
+ /**
+ * Requests the specified to be shown.
+ * @param tab The tab that is requested to be shown.
+ * @param type The reason why this tab was requested to be shown.
+ */
+ void requestToShowTab(Tab tab, TabSelectionType type);
+
+ // TODO(aurimas): clean these methods up.
+ TabModel getCurrentModel();
+ TabModel getModel(boolean incognito);
+ boolean isInOverviewMode();
+ boolean isSessionRestoreInProgress();
+ void selectModel(boolean incognito);
+}

Powered by Google App Engine
This is Rietveld 408576698