| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 GtkWidget* widget() { | 47 GtkWidget* widget() { |
| 48 return container_; | 48 return container_; |
| 49 } | 49 } |
| 50 | 50 |
| 51 void set_window(GtkWindow* window) { window_ = window; } | 51 void set_window(GtkWindow* window) { window_ = window; } |
| 52 | 52 |
| 53 // Build the titlebar, the space above the tab strip, and (maybe) the min, | 53 // Build the titlebar, the space above the tab strip, and (maybe) the min, |
| 54 // max, close buttons. |container_| is the gtk container that we put the | 54 // max, close buttons. |container_| is the gtk container that we put the |
| 55 // widget into. | 55 // widget into. |
| 56 void Init(); | 56 virtual void Init(); |
| 57 | 57 |
| 58 // Builds the buttons based on the metacity |button_string|. | 58 // Builds the buttons based on the metacity |button_string|. |
| 59 void BuildButtons(const std::string& button_string); | 59 void BuildButtons(const std::string& button_string); |
| 60 | 60 |
| 61 // Updates the theme supplied background color and image. | 61 // Updates the theme supplied background color and image. |
| 62 void UpdateButtonBackground(CustomDrawButton* button); | 62 void UpdateButtonBackground(CustomDrawButton* button); |
| 63 | 63 |
| 64 // Update the appearance of the title bar based on whether we're showing a | 64 // Update the appearance of the title bar based on whether we're showing a |
| 65 // custom frame or not. If |use_custom_frame| is true, we show an extra | 65 // custom frame or not. If |use_custom_frame| is true, we show an extra |
| 66 // tall titlebar and the min/max/close buttons. | 66 // tall titlebar and the min/max/close buttons. |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 // The avatar button. | 304 // The avatar button. |
| 305 scoped_ptr<AvatarMenuButtonGtk> avatar_button_; | 305 scoped_ptr<AvatarMenuButtonGtk> avatar_button_; |
| 306 | 306 |
| 307 // Theme provider for building buttons. | 307 // Theme provider for building buttons. |
| 308 ThemeServiceGtk* theme_service_; | 308 ThemeServiceGtk* theme_service_; |
| 309 | 309 |
| 310 content::NotificationRegistrar registrar_; | 310 content::NotificationRegistrar registrar_; |
| 311 }; | 311 }; |
| 312 | 312 |
| 313 #endif // CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_ | 313 #endif // CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_ |
| OLD | NEW |