Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Side by Side Diff: chrome/browser/ui/gtk/action_box_button_gtk.h

Issue 12319031: Display Page Launcher icons in gtk. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Estade comments Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/action_box_button_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_BROWSER_UI_GTK_ACTION_BOX_BUTTON_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_ACTION_BOX_BUTTON_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_ACTION_BOX_BUTTON_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_ACTION_BOX_BUTTON_GTK_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/gtk/menu_gtk.h" 10 #include "chrome/browser/ui/gtk/menu_gtk.h"
11 #include "chrome/browser/ui/toolbar/action_box_button_controller.h" 11 #include "chrome/browser/ui/toolbar/action_box_button_controller.h"
12 #include "ui/base/gtk/gtk_signal.h" 12 #include "ui/base/gtk/gtk_signal.h"
13 13
14 class ActionBoxMenuModel; 14 class ActionBoxMenuModel;
15 class Browser; 15 class Browser;
16 class CustomDrawButton; 16 class CustomDrawButton;
17 17
18 typedef struct _GtkWidget GtkWidget; 18 typedef struct _GtkWidget GtkWidget;
19 19
20 // This class displays the action box button with an associated menu. This is 20 // This class displays the action box button with an associated menu. This is
21 // where extension actions and the bookmark star live. 21 // where extension actions and the bookmark star live.
22 class ActionBoxButtonGtk : public MenuGtk::Delegate, 22 class ActionBoxButtonGtk : public MenuGtk::Delegate,
23 public ActionBoxButtonController::Delegate { 23 public ActionBoxButtonController::Delegate {
24 public: 24 public:
25 explicit ActionBoxButtonGtk(Browser* browser); 25 explicit ActionBoxButtonGtk(Browser* browser);
26 virtual ~ActionBoxButtonGtk(); 26 virtual ~ActionBoxButtonGtk();
27 27
28 // MenuGtk::Delegate implementation. 28 // MenuGtk::Delegate implementation.
29 virtual bool AlwaysShowIconForCmd(int command_id) const OVERRIDE; 29 virtual bool AlwaysShowIconForCmd(int command_id) const OVERRIDE;
30 virtual GtkWidget* GetImageForCommandId(int command_id) const OVERRIDE;
30 31
31 GtkWidget* widget(); 32 GtkWidget* widget();
32 33
33 ActionBoxButtonController* action_box_button_controller() { 34 ActionBoxButtonController* action_box_button_controller() {
34 return &controller_; 35 return &controller_;
35 } 36 }
36 37
37 private: 38 private:
38 // ActionBoxButtonController::Delegate implementation. 39 // ActionBoxButtonController::Delegate implementation.
39 virtual void ShowMenu(scoped_ptr<ActionBoxMenuModel> model) OVERRIDE; 40 virtual void ShowMenu(scoped_ptr<ActionBoxMenuModel> model) OVERRIDE;
(...skipping 11 matching lines...) Expand all
51 52
52 // The model and menu displayed when the button is clicked. The menu is 53 // The model and menu displayed when the button is clicked. The menu is
53 // recreated every time it is displayed. 54 // recreated every time it is displayed.
54 scoped_ptr<ActionBoxMenuModel> model_; 55 scoped_ptr<ActionBoxMenuModel> model_;
55 scoped_ptr<MenuGtk> menu_; 56 scoped_ptr<MenuGtk> menu_;
56 57
57 DISALLOW_COPY_AND_ASSIGN(ActionBoxButtonGtk); 58 DISALLOW_COPY_AND_ASSIGN(ActionBoxButtonGtk);
58 }; 59 };
59 60
60 #endif // CHROME_BROWSER_UI_GTK_ACTION_BOX_BUTTON_GTK_H_ 61 #endif // CHROME_BROWSER_UI_GTK_ACTION_BOX_BUTTON_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/action_box_button_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698