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

Side by Side Diff: chrome/browser/views/tabs/side_tab_strip_model.h

Issue 1141005: Revert r42156, r42157, r42160. Allow dynamic switching in and out of sidetabs... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/tabs/side_tab_strip.cc ('k') | chrome/browser/views/tabs/tab.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_VIEWS_TABS_SIDE_TAB_STRIP_MODEL_H_ 5 #ifndef CHROME_BROWSER_VIEWS_TABS_SIDE_TAB_STRIP_MODEL_H_
6 #define CHROME_BROWSER_VIEWS_TABS_SIDE_TAB_STRIP_MODEL_H_ 6 #define CHROME_BROWSER_VIEWS_TABS_SIDE_TAB_STRIP_MODEL_H_
7 7
8 #include "base/string16.h" 8 #include "base/string16.h"
9 9
10 namespace gfx {
11 class Point;
12 }
13 class SkBitmap; 10 class SkBitmap;
14 11
15 // A model interface implemented by an object that can provide information 12 // A model interface implemented by an object that can provide information
16 // about SideTabs in a SideTabStrip. 13 // about SideTabs in a SideTabStrip.
17 class SideTabStripModel { 14 class SideTabStripModel {
18 public: 15 public:
19 virtual ~SideTabStripModel() {}
20
21 // Returns metadata about the tab at the specified index. 16 // Returns metadata about the tab at the specified index.
22 virtual SkBitmap GetIcon(int index) const = 0; 17 virtual SkBitmap GetIcon(int index) const = 0;
23 virtual string16 GetTitle(int index) const = 0; 18 virtual string16 GetTitle(int index) const = 0;
24 virtual bool IsSelected(int index) const = 0; 19 virtual bool IsSelected(int index) const = 0;
25 20
26 // Different types of network activity for a tab. The NetworkState of a tab 21 // Different types of network activity for a tab. The NetworkState of a tab
27 // may be used to alter the UI (e.g. show different kinds of loading 22 // may be used to alter the UI (e.g. show different kinds of loading
28 // animations). 23 // animations).
29 enum NetworkState { 24 enum NetworkState {
30 NetworkState_None, // no network activity. 25 NetworkState_None, // no network activity.
31 NetworkState_Waiting, // waiting for a connection. 26 NetworkState_Waiting, // waiting for a connection.
32 NetworkState_Loading // connected, transferring data. 27 NetworkState_Loading // connected, transferring data.
33 }; 28 };
34 29
35 // Returns the NetworkState of the tab at the specified index. 30 // Returns the NetworkState of the tab at the specified index.
36 virtual NetworkState GetNetworkState(int index) const = 0; 31 virtual NetworkState GetNetworkState(int index) const = 0;
37 32
38 // Select the tab at the specified index in the model. 33 // Select the tab at the specified index in the model.
39 virtual void SelectTab(int index) = 0; 34 virtual void SelectTab(int index) = 0;
40 35
41 // Closes the tab at the specified index in the model. 36 // Closes the tab at the specified index in the model.
42 virtual void CloseTab(int index) = 0; 37 virtual void CloseTab(int index) = 0;
43
44 // Shows a context menu for the tab at the specified index at the specified
45 // point in screen coords.
46 virtual void ShowContextMenu(int index, const gfx::Point& p) = 0;
47 }; 38 };
48 39
49 #endif // CHROME_BROWSER_VIEWS_TABS_SIDE_TAB_STRIP_MODEL_H_ 40 #endif // CHROME_BROWSER_VIEWS_TABS_SIDE_TAB_STRIP_MODEL_H_
50 41
OLDNEW
« no previous file with comments | « chrome/browser/views/tabs/side_tab_strip.cc ('k') | chrome/browser/views/tabs/tab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698