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

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

Issue 7065052: Improve large tab strip by leveraging touch icons when present (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed extra line Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/tabs/tab_strip_model.h" 10 #include "chrome/browser/tabs/tab_strip_model.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 virtual void TabMiniStateChanged(TabContentsWrapper* contents, 90 virtual void TabMiniStateChanged(TabContentsWrapper* contents,
91 int model_index) OVERRIDE; 91 int model_index) OVERRIDE;
92 virtual void TabBlockedStateChanged(TabContentsWrapper* contents, 92 virtual void TabBlockedStateChanged(TabContentsWrapper* contents,
93 int model_index) OVERRIDE; 93 int model_index) OVERRIDE;
94 94
95 // NotificationObserver implementation: 95 // NotificationObserver implementation:
96 virtual void Observe(NotificationType type, 96 virtual void Observe(NotificationType type,
97 const NotificationSource& source, 97 const NotificationSource& source,
98 const NotificationDetails& details) OVERRIDE; 98 const NotificationDetails& details) OVERRIDE;
99 99
100 protected:
101 // Sets the TabRendererData from the TabStripModel.
102 virtual void SetTabRendererDataFromModel(TabContents* contents,
103 int model_index,
104 TabRendererData* data);
105
106 TabStripModel* model_;
107
108 BaseTabStrip* tabstrip_;
109
110 // Non-owning pointer to the browser which is using this controller.
111 Browser* browser_;
112
100 private: 113 private:
101 class TabContextMenuContents; 114 class TabContextMenuContents;
102 115
103 // Invokes tabstrip_->SetTabData. 116 // Invokes tabstrip_->SetTabData.
104 void SetTabDataAt(TabContentsWrapper* contents, int model_index); 117 void SetTabDataAt(TabContentsWrapper* contents, int model_index);
105 118
106 // Sets the TabRendererData from the TabStripModel.
107 void SetTabRendererDataFromModel(TabContents* contents,
108 int model_index,
109 TabRendererData* data);
110
111 void StartHighlightTabsForCommand( 119 void StartHighlightTabsForCommand(
112 TabStripModel::ContextMenuCommand command_id, 120 TabStripModel::ContextMenuCommand command_id,
113 BaseTab* tab); 121 BaseTab* tab);
114 void StopHighlightTabsForCommand( 122 void StopHighlightTabsForCommand(
115 TabStripModel::ContextMenuCommand command_id, 123 TabStripModel::ContextMenuCommand command_id,
116 BaseTab* tab); 124 BaseTab* tab);
117 125
118 Profile* profile() const { return model_->profile(); } 126 Profile* profile() const { return model_->profile(); }
119 127
120 TabStripModel* model_;
121
122 BaseTabStrip* tabstrip_;
123
124 // Non-owning pointer to the browser which is using this controller.
125 Browser* browser_;
126
127 // If non-NULL it means we're showing a menu for the tab. 128 // If non-NULL it means we're showing a menu for the tab.
128 scoped_ptr<TabContextMenuContents> context_menu_contents_; 129 scoped_ptr<TabContextMenuContents> context_menu_contents_;
129 130
130 NotificationRegistrar notification_registrar_; 131 NotificationRegistrar notification_registrar_;
131 132
132 // Helper for performing tab selection as a result of dragging over a tab. 133 // Helper for performing tab selection as a result of dragging over a tab.
133 HoverTabSelector hover_tab_selector_; 134 HoverTabSelector hover_tab_selector_;
134 135
135 DISALLOW_COPY_AND_ASSIGN(BrowserTabStripController); 136 DISALLOW_COPY_AND_ASSIGN(BrowserTabStripController);
136 }; 137 };
137 138
138 #endif // CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ 139 #endif // CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698