| OLD | NEW |
| 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/linked_ptr.h" | 13 #include "base/memory/linked_ptr.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "chrome/browser/extensions/extension_toolbar_model.h" | 15 #include "chrome/browser/extensions/extension_toolbar_model.h" |
| 16 #include "chrome/browser/ui/gtk/custom_button.h" | 16 #include "chrome/browser/ui/gtk/custom_button.h" |
| 17 #include "chrome/browser/ui/gtk/menu_gtk.h" | 17 #include "chrome/browser/ui/gtk/menu_gtk.h" |
| 18 #include "chrome/browser/ui/gtk/overflow_button.h" | 18 #include "chrome/browser/ui/gtk/overflow_button.h" |
| 19 #include "content/public/browser/notification_observer.h" | 19 #include "content/public/browser/notification_observer.h" |
| 20 #include "content/public/browser/notification_registrar.h" | 20 #include "content/public/browser/notification_registrar.h" |
| 21 #include "ui/base/animation/animation_delegate.h" | 21 #include "ui/base/animation/animation_delegate.h" |
| 22 #include "ui/base/animation/slide_animation.h" | 22 #include "ui/base/animation/slide_animation.h" |
| 23 #include "ui/base/gtk/gtk_signal.h" | 23 #include "ui/base/gtk/gtk_signal.h" |
| 24 #include "ui/base/gtk/gtk_signal_registrar.h" | 24 #include "ui/base/gtk/gtk_signal_registrar.h" |
| 25 #include "ui/base/gtk/owned_widget_gtk.h" | 25 #include "ui/base/gtk/owned_widget_gtk.h" |
| 26 #include "ui/base/models/simple_menu_model.h" | 26 #include "ui/base/models/simple_menu_model.h" |
| 27 | 27 |
| 28 class Browser; | 28 class Browser; |
| 29 class BrowserActionButton; | 29 class BrowserActionButton; |
| 30 class Extension; | 30 class Extension; |
| 31 class GtkThemeService; | 31 class ThemeServiceGtk; |
| 32 class Profile; | 32 class Profile; |
| 33 | 33 |
| 34 typedef struct _GdkDragContext GdkDragContext; | 34 typedef struct _GdkDragContext GdkDragContext; |
| 35 typedef struct _GtkWidget GtkWidget; | 35 typedef struct _GtkWidget GtkWidget; |
| 36 | 36 |
| 37 class BrowserActionsToolbarGtk : public ExtensionToolbarModel::Observer, | 37 class BrowserActionsToolbarGtk : public ExtensionToolbarModel::Observer, |
| 38 public ui::AnimationDelegate, | 38 public ui::AnimationDelegate, |
| 39 public MenuGtk::Delegate, | 39 public MenuGtk::Delegate, |
| 40 public ui::SimpleMenuModel::Delegate, | 40 public ui::SimpleMenuModel::Delegate, |
| 41 public content::NotificationObserver { | 41 public content::NotificationObserver { |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 CHROMEGTK_CALLBACK_1(BrowserActionsToolbarGtk, gboolean, | 166 CHROMEGTK_CALLBACK_1(BrowserActionsToolbarGtk, gboolean, |
| 167 OnOverflowButtonPress, GdkEventButton*); | 167 OnOverflowButtonPress, GdkEventButton*); |
| 168 // The user presses a mouse button over the popped up overflow menu. | 168 // The user presses a mouse button over the popped up overflow menu. |
| 169 CHROMEGTK_CALLBACK_1(BrowserActionsToolbarGtk, gboolean, | 169 CHROMEGTK_CALLBACK_1(BrowserActionsToolbarGtk, gboolean, |
| 170 OnOverflowMenuButtonPress, GdkEventButton*); | 170 OnOverflowMenuButtonPress, GdkEventButton*); |
| 171 CHROMEGTK_CALLBACK_0(BrowserActionsToolbarGtk, void, OnButtonShowOrHide); | 171 CHROMEGTK_CALLBACK_0(BrowserActionsToolbarGtk, void, OnButtonShowOrHide); |
| 172 | 172 |
| 173 Browser* browser_; | 173 Browser* browser_; |
| 174 | 174 |
| 175 Profile* profile_; | 175 Profile* profile_; |
| 176 GtkThemeService* theme_service_; | 176 ThemeServiceGtk* theme_service_; |
| 177 | 177 |
| 178 ExtensionToolbarModel* model_; | 178 ExtensionToolbarModel* model_; |
| 179 | 179 |
| 180 // Contains the drag gripper, browser action buttons, and overflow chevron. | 180 // Contains the drag gripper, browser action buttons, and overflow chevron. |
| 181 ui::OwnedWidgetGtk hbox_; | 181 ui::OwnedWidgetGtk hbox_; |
| 182 | 182 |
| 183 // Contains the browser action buttons. | 183 // Contains the browser action buttons. |
| 184 ui::OwnedWidgetGtk button_hbox_; | 184 ui::OwnedWidgetGtk button_hbox_; |
| 185 | 185 |
| 186 // The overflow button for chrome theme mode. | 186 // The overflow button for chrome theme mode. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 217 ui::GtkSignalRegistrar signals_; | 217 ui::GtkSignalRegistrar signals_; |
| 218 | 218 |
| 219 content::NotificationRegistrar registrar_; | 219 content::NotificationRegistrar registrar_; |
| 220 | 220 |
| 221 base::WeakPtrFactory<BrowserActionsToolbarGtk> weak_factory_; | 221 base::WeakPtrFactory<BrowserActionsToolbarGtk> weak_factory_; |
| 222 | 222 |
| 223 DISALLOW_COPY_AND_ASSIGN(BrowserActionsToolbarGtk); | 223 DISALLOW_COPY_AND_ASSIGN(BrowserActionsToolbarGtk); |
| 224 }; | 224 }; |
| 225 | 225 |
| 226 #endif // CHROME_BROWSER_UI_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_ | 226 #endif // CHROME_BROWSER_UI_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_ |
| OLD | NEW |