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

Side by Side Diff: chrome/browser/ui/views/location_bar/action_box_button_view.h

Issue 10887029: Only show chrome2mobile in action box if it is enabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 3 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 | Annotate | Revision Log
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_VIEWS_LOCATION_BAR_ACTION_BOX_BUTTON_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ACTION_BOX_BUTTON_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ACTION_BOX_BUTTON_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ACTION_BOX_BUTTON_VIEW_H_
7 7
8 #include "ui/views/controls/button/menu_button.h" 8 #include "ui/views/controls/button/menu_button.h"
9 #include "ui/views/controls/button/menu_button_listener.h" 9 #include "ui/views/controls/button/menu_button_listener.h"
10 10
11 class Browser; 11 class Browser;
12 class Profile; 12 class Profile;
13 class CommandUpdater;
13 14
14 // ActionBoxButtonView displays a plus button with associated menu. 15 // ActionBoxButtonView displays a plus button with associated menu.
15 class ActionBoxButtonView : public views::MenuButton, 16 class ActionBoxButtonView : public views::MenuButton,
16 public views::MenuButtonListener { 17 public views::MenuButtonListener {
17 public: 18 public:
18 explicit ActionBoxButtonView(Browser* browser, Profile* profile); 19 explicit ActionBoxButtonView(Browser* browser, Profile* profile,
msw 2012/08/29 19:27:04 nit: one arg per line.
Cait (Slow) 2012/08/29 20:26:14 Done.
20 CommandUpdater* command_updater);
19 virtual ~ActionBoxButtonView(); 21 virtual ~ActionBoxButtonView();
20 22
21 SkColor GetBackgroundColor(); 23 SkColor GetBackgroundColor();
22 SkColor GetBorderColor(); 24 SkColor GetBorderColor();
23 25
24 static bool IsActionBoxEnabled(); 26 static bool IsActionBoxEnabled();
25 27
26 private: 28 private:
27 // Overridden from views::CustomButton: 29 // Overridden from views::CustomButton:
28 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 30 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
29 31
30 // Overridden from views::MenuButtonListener: 32 // Overridden from views::MenuButtonListener:
31 virtual void OnMenuButtonClicked(View* source, 33 virtual void OnMenuButtonClicked(View* source,
32 const gfx::Point& point) OVERRIDE; 34 const gfx::Point& point) OVERRIDE;
33 35
34 Browser* browser_; 36 Browser* browser_;
35 Profile* profile_; 37 Profile* profile_;
38 CommandUpdater* command_updater_;
36 39
37 DISALLOW_COPY_AND_ASSIGN(ActionBoxButtonView); 40 DISALLOW_COPY_AND_ASSIGN(ActionBoxButtonView);
38 }; 41 };
39 42
40 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ACTION_BOX_BUTTON_VIEW_H_ 43 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ACTION_BOX_BUTTON_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698