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 #ifndef CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ |
6 #define CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ | 6 #define CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 OwnedWidgetGtk* owner); | 91 OwnedWidgetGtk* owner); |
92 | 92 |
93 // Adds a keyboard accelerator which triggers a button (e.g., ctrl+r is now | 93 // Adds a keyboard accelerator which triggers a button (e.g., ctrl+r is now |
94 // equivalent to a reload click). | 94 // equivalent to a reload click). |
95 void AddAcceleratorToButton( | 95 void AddAcceleratorToButton( |
96 const scoped_ptr<CustomDrawButton>& button, | 96 const scoped_ptr<CustomDrawButton>& button, |
97 unsigned int accelerator, | 97 unsigned int accelerator, |
98 unsigned int accelerator_mod); | 98 unsigned int accelerator_mod); |
99 | 99 |
100 // Gtk callback for the "expose-event" signal. | 100 // Gtk callback for the "expose-event" signal. |
101 static gboolean OnContentAreaExpose(GtkWidget* widget, GdkEventExpose* e, | 101 static gboolean OnToolbarExpose(GtkWidget* widget, GdkEventExpose* e, |
102 BrowserToolbarGtk* toolbar); | 102 BrowserToolbarGtk* toolbar); |
103 | 103 |
104 // Gtk callback for the "clicked" signal. | 104 // Gtk callback for the "clicked" signal. |
105 static void OnButtonClick(GtkWidget* button, BrowserToolbarGtk* toolbar); | 105 static void OnButtonClick(GtkWidget* button, BrowserToolbarGtk* toolbar); |
106 | 106 |
107 // Gtk callback to intercept mouse clicks to the menu buttons. | 107 // Gtk callback to intercept mouse clicks to the menu buttons. |
108 static gboolean OnMenuButtonPressEvent(GtkWidget* button, | 108 static gboolean OnMenuButtonPressEvent(GtkWidget* button, |
109 GdkEvent *event, | 109 GdkEvent *event, |
110 BrowserToolbarGtk* toolbar); | 110 BrowserToolbarGtk* toolbar); |
111 | 111 |
112 // Displays the page menu. | 112 // Displays the page menu. |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 // The back/forward menu gets reset every time it is shown. | 180 // The back/forward menu gets reset every time it is shown. |
181 scoped_ptr<MenuGtk> back_forward_menu_; | 181 scoped_ptr<MenuGtk> back_forward_menu_; |
182 | 182 |
183 scoped_ptr<BackForwardMenuModelGtk> back_menu_model_; | 183 scoped_ptr<BackForwardMenuModelGtk> back_menu_model_; |
184 scoped_ptr<BackForwardMenuModelGtk> forward_menu_model_; | 184 scoped_ptr<BackForwardMenuModelGtk> forward_menu_model_; |
185 | 185 |
186 ScopedRunnableMethodFactory<BrowserToolbarGtk> show_menu_factory_; | 186 ScopedRunnableMethodFactory<BrowserToolbarGtk> show_menu_factory_; |
187 }; | 187 }; |
188 | 188 |
189 #endif // CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ | 189 #endif // CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ |
OLD | NEW |