| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_GTK_BROWSER_TITLEBAR_H_ | 10 #ifndef CHROME_BROWSER_GTK_BROWSER_TITLEBAR_H_ |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // Callback for min/max/close buttons. | 59 // Callback for min/max/close buttons. |
| 60 static void OnButtonClicked(GtkWidget* button, BrowserTitlebar* window); | 60 static void OnButtonClicked(GtkWidget* button, BrowserTitlebar* window); |
| 61 | 61 |
| 62 // -- Context Menu ----------------------------------------------------------- | 62 // -- Context Menu ----------------------------------------------------------- |
| 63 | 63 |
| 64 // MenuGtk::Delegate implementation: | 64 // MenuGtk::Delegate implementation: |
| 65 virtual bool IsCommandEnabled(int command_id) const; | 65 virtual bool IsCommandEnabled(int command_id) const; |
| 66 virtual bool IsItemChecked(int command_id) const; | 66 virtual bool IsItemChecked(int command_id) const; |
| 67 virtual void ExecuteCommand(int command_id); | 67 virtual void ExecuteCommand(int command_id); |
| 68 | 68 |
| 69 static gboolean OnAvatarExpose( |
| 70 GtkWidget* widget, GdkEventExpose* event, BrowserTitlebar* titlebar); |
| 71 |
| 69 // Pointers to the browser window that owns us and it's GtkWindow. | 72 // Pointers to the browser window that owns us and it's GtkWindow. |
| 70 BrowserWindowGtk* browser_window_; | 73 BrowserWindowGtk* browser_window_; |
| 71 GtkWindow* window_; | 74 GtkWindow* window_; |
| 72 | 75 |
| 73 // The container widget the holds the whole titlebar. | 76 // The container widget the holds the whole titlebar. |
| 74 GtkWidget* container_; | 77 GtkWidget* container_; |
| 75 // Box that holds the min/max/close buttons if the user turns off window | 78 // Box that holds the min/max/close buttons if the user turns off window |
| 76 // manager decorations. | 79 // manager decorations. |
| 77 GtkWidget* titlebar_buttons_box_; | 80 GtkWidget* titlebar_buttons_box_; |
| 78 // Gtk alignment that contains the tab strip. If the user turns off window | 81 // Gtk alignment that contains the tab strip. If the user turns off window |
| 79 // manager decorations, we draw this taller. | 82 // manager decorations, we draw this taller. |
| 80 GtkWidget* titlebar_alignment_; | 83 GtkWidget* titlebar_alignment_; |
| 81 | 84 |
| 82 // Maximize and restore widgets in the titlebar. | 85 // Maximize and restore widgets in the titlebar. |
| 83 scoped_ptr<CustomDrawButton> minimize_button_; | 86 scoped_ptr<CustomDrawButton> minimize_button_; |
| 84 scoped_ptr<CustomDrawButton> maximize_button_; | 87 scoped_ptr<CustomDrawButton> maximize_button_; |
| 85 scoped_ptr<CustomDrawButton> restore_button_; | 88 scoped_ptr<CustomDrawButton> restore_button_; |
| 86 scoped_ptr<CustomDrawButton> close_button_; | 89 scoped_ptr<CustomDrawButton> close_button_; |
| 87 | 90 |
| 88 // The context menu. | 91 // The context menu. |
| 89 scoped_ptr<MenuGtk> context_menu_; | 92 scoped_ptr<MenuGtk> context_menu_; |
| 90 }; | 93 }; |
| 91 | 94 |
| 92 #endif // CHROME_BROWSER_GTK_BROWSER_TITLEBAR_H_ | 95 #endif // CHROME_BROWSER_GTK_BROWSER_TITLEBAR_H_ |
| OLD | NEW |