OLD | NEW |
---|---|
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, |
sky
2012/08/29 21:27:01
no explicit.
Why do you need these three args? Onc
Cait (Slow)
2012/08/29 23:03:47
Done.
| |
20 Profile* profile, | |
21 CommandUpdater* command_updater); | |
19 virtual ~ActionBoxButtonView(); | 22 virtual ~ActionBoxButtonView(); |
20 | 23 |
21 SkColor GetBackgroundColor(); | 24 SkColor GetBackgroundColor(); |
22 SkColor GetBorderColor(); | 25 SkColor GetBorderColor(); |
23 | 26 |
24 static bool IsActionBoxEnabled(); | 27 static bool IsActionBoxEnabled(); |
25 | 28 |
26 private: | 29 private: |
27 // Overridden from views::CustomButton: | 30 // Overridden from views::CustomButton: |
28 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 31 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
29 | 32 |
30 // Overridden from views::MenuButtonListener: | 33 // Overridden from views::MenuButtonListener: |
31 virtual void OnMenuButtonClicked(View* source, | 34 virtual void OnMenuButtonClicked(View* source, |
32 const gfx::Point& point) OVERRIDE; | 35 const gfx::Point& point) OVERRIDE; |
33 | 36 |
34 Browser* browser_; | 37 Browser* browser_; |
35 Profile* profile_; | 38 Profile* profile_; |
39 CommandUpdater* command_updater_; | |
36 | 40 |
37 DISALLOW_COPY_AND_ASSIGN(ActionBoxButtonView); | 41 DISALLOW_COPY_AND_ASSIGN(ActionBoxButtonView); |
38 }; | 42 }; |
39 | 43 |
40 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ACTION_BOX_BUTTON_VIEW_H_ | 44 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ACTION_BOX_BUTTON_VIEW_H_ |
OLD | NEW |