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

Side by Side Diff: chrome/browser/gtk/tabs/tab_renderer_gtk.h

Issue 2821011: Removes phantom tabs. (Closed)
Patch Set: Created 10 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
« no previous file with comments | « chrome/browser/gtk/tabs/tab_gtk.cc ('k') | chrome/browser/gtk/tabs/tab_renderer_gtk.cc » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_GTK_TABS_TAB_RENDERER_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_
6 #define CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ 6 #define CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #include <map> 9 #include <map>
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 DISALLOW_COPY_AND_ASSIGN(LoadingAnimation); 97 DISALLOW_COPY_AND_ASSIGN(LoadingAnimation);
98 }; 98 };
99 99
100 explicit TabRendererGtk(ThemeProvider* theme_provider); 100 explicit TabRendererGtk(ThemeProvider* theme_provider);
101 virtual ~TabRendererGtk(); 101 virtual ~TabRendererGtk();
102 102
103 // TabContents. If only the loading state was updated, the loading_only flag 103 // TabContents. If only the loading state was updated, the loading_only flag
104 // should be specified. If other things change, set this flag to false to 104 // should be specified. If other things change, set this flag to false to
105 // update everything. 105 // update everything.
106 virtual void UpdateData(TabContents* contents, 106 virtual void UpdateData(TabContents* contents,
107 bool phantom,
108 bool loading_only); 107 bool loading_only);
109 108
110 // Sets the blocked state of the tab. 109 // Sets the blocked state of the tab.
111 void SetBlocked(bool pinned); 110 void SetBlocked(bool pinned);
112 bool is_blocked() const; 111 bool is_blocked() const;
113 112
114 // Sets the mini-state of the tab. 113 // Sets the mini-state of the tab.
115 void set_mini(bool mini) { data_.mini = mini; } 114 void set_mini(bool mini) { data_.mini = mini; }
116 bool mini() const { return data_.mini; } 115 bool mini() const { return data_.mini; }
117 116
118 // Sets the phantom state of the tab.
119 void set_phantom(bool phantom) { data_.phantom = phantom; }
120 bool phantom() const { return data_.phantom; }
121
122 // Are we in the process of animating a mini tab state change on this tab? 117 // Are we in the process of animating a mini tab state change on this tab?
123 void set_animating_mini_change(bool value) { 118 void set_animating_mini_change(bool value) {
124 data_.animating_mini_change = value; 119 data_.animating_mini_change = value;
125 } 120 }
126 121
127 // Updates the display to reflect the contents of this TabRenderer's model. 122 // Updates the display to reflect the contents of this TabRenderer's model.
128 void UpdateFromModel(); 123 void UpdateFromModel();
129 124
130 // Returns true if the Tab is selected, false otherwise. 125 // Returns true if the Tab is selected, false otherwise.
131 virtual bool IsSelected() const; 126 virtual bool IsSelected() const;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // corresponding objects in the underlying model. 244 // corresponding objects in the underlying model.
250 struct TabData { 245 struct TabData {
251 TabData() 246 TabData()
252 : is_default_favicon(false), 247 : is_default_favicon(false),
253 loading(false), 248 loading(false),
254 crashed(false), 249 crashed(false),
255 off_the_record(false), 250 off_the_record(false),
256 show_icon(true), 251 show_icon(true),
257 mini(false), 252 mini(false),
258 blocked(false), 253 blocked(false),
259 animating_mini_change(false), 254 animating_mini_change(false) {
260 phantom(false) {
261 } 255 }
262 256
263 SkBitmap favicon; 257 SkBitmap favicon;
264 bool is_default_favicon; 258 bool is_default_favicon;
265 string16 title; 259 string16 title;
266 bool loading; 260 bool loading;
267 bool crashed; 261 bool crashed;
268 bool off_the_record; 262 bool off_the_record;
269 bool show_icon; 263 bool show_icon;
270 bool mini; 264 bool mini;
271 bool blocked; 265 bool blocked;
272 bool animating_mini_change; 266 bool animating_mini_change;
273 bool phantom;
274 }; 267 };
275 268
276 // TODO(jhawkins): Move into TabResources class. 269 // TODO(jhawkins): Move into TabResources class.
277 struct TabImage { 270 struct TabImage {
278 SkBitmap* image_l; 271 SkBitmap* image_l;
279 SkBitmap* image_c; 272 SkBitmap* image_c;
280 SkBitmap* image_r; 273 SkBitmap* image_r;
281 int l_width; 274 int l_width;
282 int r_width; 275 int r_width;
283 }; 276 };
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 // The current color of the close button. 433 // The current color of the close button.
441 SkColor close_button_color_; 434 SkColor close_button_color_;
442 435
443 // Used to listen for theme change notifications. 436 // Used to listen for theme change notifications.
444 NotificationRegistrar registrar_; 437 NotificationRegistrar registrar_;
445 438
446 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk); 439 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk);
447 }; 440 };
448 441
449 #endif // CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ 442 #endif // CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/gtk/tabs/tab_gtk.cc ('k') | chrome/browser/gtk/tabs/tab_renderer_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698