| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_LIBGTK2UI_APP_INDICATOR_ICON_MENU_H_ | 5 #ifndef CHROME_BROWSER_UI_LIBGTKUI_APP_INDICATOR_ICON_MENU_H_ |
| 6 #define CHROME_BROWSER_UI_LIBGTK2UI_APP_INDICATOR_ICON_MENU_H_ | 6 #define CHROME_BROWSER_UI_LIBGTKUI_APP_INDICATOR_ICON_MENU_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "chrome/browser/ui/libgtk2ui/gtk2_signal.h" | 10 #include "chrome/browser/ui/libgtkui/gtk2_signal.h" |
| 11 | 11 |
| 12 typedef struct _GtkMenu GtkMenu; | 12 typedef struct _GtkMenu GtkMenu; |
| 13 typedef struct _GtkWidget GtkWidget; | 13 typedef struct _GtkWidget GtkWidget; |
| 14 | 14 |
| 15 namespace ui { | 15 namespace ui { |
| 16 class MenuModel; | 16 class MenuModel; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace libgtk2ui { | 19 namespace libgtkui { |
| 20 | 20 |
| 21 // The app indicator icon's menu. | 21 // The app indicator icon's menu. |
| 22 class AppIndicatorIconMenu { | 22 class AppIndicatorIconMenu { |
| 23 public: | 23 public: |
| 24 explicit AppIndicatorIconMenu(ui::MenuModel* model); | 24 explicit AppIndicatorIconMenu(ui::MenuModel* model); |
| 25 virtual ~AppIndicatorIconMenu(); | 25 virtual ~AppIndicatorIconMenu(); |
| 26 | 26 |
| 27 // Sets a menu item at the top of |gtk_menu_| as a replacement for the app | 27 // Sets a menu item at the top of |gtk_menu_| as a replacement for the app |
| 28 // indicator icon's click action. |callback| is called when the menu item | 28 // indicator icon's click action. |callback| is called when the menu item |
| 29 // is activated. | 29 // is activated. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 55 // invoked and is assumed to do any necessary processing. | 55 // invoked and is assumed to do any necessary processing. |
| 56 base::Closure click_action_replacement_callback_; | 56 base::Closure click_action_replacement_callback_; |
| 57 | 57 |
| 58 GtkWidget* gtk_menu_; | 58 GtkWidget* gtk_menu_; |
| 59 | 59 |
| 60 bool block_activation_; | 60 bool block_activation_; |
| 61 | 61 |
| 62 DISALLOW_COPY_AND_ASSIGN(AppIndicatorIconMenu); | 62 DISALLOW_COPY_AND_ASSIGN(AppIndicatorIconMenu); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 } // namespace libgtk2ui | 65 } // namespace libgtkui |
| 66 | 66 |
| 67 #endif // CHROME_BROWSER_UI_LIBGTK2UI_APP_INDICATOR_ICON_MENU_H_ | 67 #endif // CHROME_BROWSER_UI_LIBGTKUI_APP_INDICATOR_ICON_MENU_H_ |
| OLD | NEW |