summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs/side_tab_strip_model.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views/tabs/side_tab_strip_model.h')
-rw-r--r--chrome/browser/views/tabs/side_tab_strip_model.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/chrome/browser/views/tabs/side_tab_strip_model.h b/chrome/browser/views/tabs/side_tab_strip_model.h
new file mode 100644
index 0000000..a456c36
--- /dev/null
+++ b/chrome/browser/views/tabs/side_tab_strip_model.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2010 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.
+
+#ifndef CHROME_BROWSER_VIEWS_TABS_SIDE_TAB_STRIP_MODEL_H_
+#define CHROME_BROWSER_VIEWS_TABS_SIDE_TAB_STRIP_MODEL_H_
+
+#include "base/string16.h"
+
+class SkBitmap;
+
+// A model interface implemented by an object that can provide information
+// about SideTabs in a SideTabStrip.
+class SideTabStripModel {
+ public:
+ // Returns metadata about the tab at the specified index.
+ virtual SkBitmap GetIcon(int index) const = 0;
+ virtual string16 GetTitle(int index) const = 0;
+ virtual bool IsSelected(int index) const = 0;
+
+ // Different types of network activity for a tab. The NetworkState of a tab
+ // may be used to alter the UI (e.g. show different kinds of loading
+ // animations).
+ enum NetworkState {
+ NetworkState_None, // no network activity.
+ NetworkState_Waiting, // waiting for a connection.
+ NetworkState_Loading // connected, transferring data.
+ };
+
+ // Returns the NetworkState of the tab at the specified index.
+ virtual NetworkState GetNetworkState(int index) const = 0;
+
+ // Select the tab at the specified index in the model.
+ virtual void SelectTab(int index) = 0;
+
+ // Closes the tab at the specified index in the model.
+ virtual void CloseTab(int index) = 0;
+};
+
+#endif // CHROME_BROWSER_VIEWS_TABS_SIDE_TAB_STRIP_MODEL_H_
+