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

Side by Side Diff: chrome/browser/ui/gtk/browser_titlebar.h

Issue 8511041: GTK: Use IDR_THEME_WINDOW_CONTROL_BACKGROUND when drawing min/max/close and new tab buttons. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: estade nits Created 9 years, 1 month 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 | « no previous file | chrome/browser/ui/gtk/browser_titlebar.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) 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 // A helper class that contains the gtk widgets that make up the titlebar. The 5 // A helper class that contains the gtk widgets that make up the titlebar. The
6 // titlebar consists of the tabstrip and if the custom chrome frame is turned 6 // titlebar consists of the tabstrip and if the custom chrome frame is turned
7 // on, it includes the taller titlebar and minimize, restore, maximize, and 7 // on, it includes the taller titlebar and minimize, restore, maximize, and
8 // close buttons. 8 // close buttons.
9 9
10 #ifndef CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_ 10 #ifndef CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 GtkWidget* widget() { 43 GtkWidget* widget() {
44 return container_; 44 return container_;
45 } 45 }
46 46
47 void set_window(GtkWindow* window) { window_ = window; } 47 void set_window(GtkWindow* window) { window_ = window; }
48 48
49 // Builds the buttons based on the metacity |button_string|. 49 // Builds the buttons based on the metacity |button_string|.
50 void BuildButtons(const std::string& button_string); 50 void BuildButtons(const std::string& button_string);
51 51
52 // Updates the theme supplied background color and image.
53 void UpdateButtonBackground(CustomDrawButton* button);
54
52 // Update the appearance of the title bar based on whether we're showing a 55 // Update the appearance of the title bar based on whether we're showing a
53 // custom frame or not. If |use_custom_frame| is true, we show an extra 56 // custom frame or not. If |use_custom_frame| is true, we show an extra
54 // tall titlebar and the min/max/close buttons. 57 // tall titlebar and the min/max/close buttons.
55 void UpdateCustomFrame(bool use_custom_frame); 58 void UpdateCustomFrame(bool use_custom_frame);
56 59
57 // Updates the title and icon when in app or popup mode (no tabstrip). 60 // Updates the title and icon when in app or popup mode (no tabstrip).
58 void UpdateTitleAndIcon(); 61 void UpdateTitleAndIcon();
59 62
60 // Called by the browser asking us to update the loading throbber. 63 // Called by the browser asking us to update the loading throbber.
61 // |tab_contents| is the tab that is associated with the window throbber. 64 // |tab_contents| is the tab that is associated with the window throbber.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // SimpleMenuModel::Delegate implementation: 167 // SimpleMenuModel::Delegate implementation:
165 virtual bool IsCommandIdEnabled(int command_id) const; 168 virtual bool IsCommandIdEnabled(int command_id) const;
166 virtual bool IsCommandIdChecked(int command_id) const; 169 virtual bool IsCommandIdChecked(int command_id) const;
167 virtual void ExecuteCommand(int command_id); 170 virtual void ExecuteCommand(int command_id);
168 virtual bool GetAcceleratorForCommandId(int command_id, 171 virtual bool GetAcceleratorForCommandId(int command_id,
169 ui::Accelerator* accelerator); 172 ui::Accelerator* accelerator);
170 173
171 // Overridden from content::NotificationObserver: 174 // Overridden from content::NotificationObserver:
172 virtual void Observe(int type, 175 virtual void Observe(int type,
173 const content::NotificationSource& source, 176 const content::NotificationSource& source,
174 const content::NotificationDetails& details); 177 const content::NotificationDetails& details) OVERRIDE;
175 178
176 // Overriden from ActiveWindowWatcher::Observer. 179 // Overriden from ActiveWindowWatcher::Observer.
177 virtual void ActiveWindowChanged(GdkWindow* active_window); 180 virtual void ActiveWindowChanged(GdkWindow* active_window);
178 181
179 bool IsTypePanel(); 182 bool IsTypePanel();
180 183
181 // Whether to display the avatar image. 184 // Whether to display the avatar image.
182 bool ShouldDisplayAvatar(); 185 bool ShouldDisplayAvatar();
183 186
184 // Returns true if the profile associated with this BrowserWindow is off the 187 // Returns true if the profile associated with this BrowserWindow is off the
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 // The avatar button. 276 // The avatar button.
274 scoped_ptr<AvatarMenuButtonGtk> avatar_button_; 277 scoped_ptr<AvatarMenuButtonGtk> avatar_button_;
275 278
276 // Theme provider for building buttons. 279 // Theme provider for building buttons.
277 GtkThemeService* theme_service_; 280 GtkThemeService* theme_service_;
278 281
279 content::NotificationRegistrar registrar_; 282 content::NotificationRegistrar registrar_;
280 }; 283 };
281 284
282 #endif // CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_ 285 #endif // CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/browser_titlebar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698