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

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

Issue 3012042: Revert 54560 - ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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
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_BROWSER_TAB_STRIP_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_
6 #define CHROME_BROWSER_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ 6 #define CHROME_BROWSER_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "chrome/browser/tabs/tab_strip_model.h" 10 #include "chrome/browser/tabs/tab_strip_model.h"
11 #include "chrome/browser/views/tabs/tab_strip_controller.h" 11 #include "chrome/browser/views/tabs/tab_strip_controller.h"
12 #include "chrome/common/notification_registrar.h" 12 #include "chrome/common/notification_registrar.h"
13 13
14 class BaseTab; 14 class BaseTab;
15 class BaseTabStrip; 15 class BaseTabStrip;
16 class Browser;
17 16
18 struct TabRendererData; 17 struct TabRendererData;
19 18
20 // An implementation of TabStripController that sources data from the 19 // An implementation of TabStripController that sources data from the
21 // TabContentses in a TabStripModel. 20 // TabContentses in a TabStripModel.
22 class BrowserTabStripController : public TabStripController, 21 class BrowserTabStripController : public TabStripController,
23 public TabStripModelObserver, 22 public TabStripModelObserver,
24 public NotificationObserver { 23 public NotificationObserver {
25 public: 24 public:
26 BrowserTabStripController(Browser* browser, TabStripModel* model); 25 explicit BrowserTabStripController(TabStripModel* model);
27 virtual ~BrowserTabStripController(); 26 virtual ~BrowserTabStripController();
28 27
29 void InitFromModel(BaseTabStrip* tabstrip); 28 void InitFromModel(BaseTabStrip* tabstrip);
30 29
31 TabStripModel* model() const { return model_; } 30 TabStripModel* model() const { return model_; }
32 31
33 bool IsCommandEnabledForTab(TabStripModel::ContextMenuCommand command_id, 32 bool IsCommandEnabledForTab(TabStripModel::ContextMenuCommand command_id,
34 BaseTab* tab) const; 33 BaseTab* tab) const;
35 bool IsCommandCheckedForTab(TabStripModel::ContextMenuCommand command_id, 34 bool IsCommandCheckedForTab(TabStripModel::ContextMenuCommand command_id,
36 BaseTab* tab) const; 35 BaseTab* tab) const;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void StopHighlightTabsForCommand( 97 void StopHighlightTabsForCommand(
99 TabStripModel::ContextMenuCommand command_id, 98 TabStripModel::ContextMenuCommand command_id,
100 BaseTab* tab); 99 BaseTab* tab);
101 100
102 Profile* profile() const { return model_->profile(); } 101 Profile* profile() const { return model_->profile(); }
103 102
104 TabStripModel* model_; 103 TabStripModel* model_;
105 104
106 BaseTabStrip* tabstrip_; 105 BaseTabStrip* tabstrip_;
107 106
108 // Non-owning pointer to the browser which is using this controller.
109 Browser* browser_;
110
111 // If non-NULL it means we're showing a menu for the tab. 107 // If non-NULL it means we're showing a menu for the tab.
112 scoped_ptr<TabContextMenuContents> context_menu_contents_; 108 scoped_ptr<TabContextMenuContents> context_menu_contents_;
113 109
114 NotificationRegistrar notification_registrar_; 110 NotificationRegistrar notification_registrar_;
115 111
116 DISALLOW_COPY_AND_ASSIGN(BrowserTabStripController); 112 DISALLOW_COPY_AND_ASSIGN(BrowserTabStripController);
117 }; 113 };
118 114
119 #endif // CHROME_BROWSER_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ 115 #endif // CHROME_BROWSER_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_
120 116
OLDNEW
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/browser/views/tabs/browser_tab_strip_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698