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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/views/controls/button/menu_button.h" | 9 #include "ui/views/controls/button/menu_button.h" |
10 #include "ui/views/controls/button/menu_button_listener.h" | 10 #include "ui/views/controls/button/menu_button_listener.h" |
11 | 11 |
12 class ExtensionService; | 12 class ActionBoxMenu; |
| 13 class Profile; |
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(ExtensionService* extension_service); | 19 explicit ActionBoxButtonView(Profile* profile); |
19 virtual ~ActionBoxButtonView(); | 20 virtual ~ActionBoxButtonView(); |
20 | 21 |
21 SkColor GetBackgroundColor(); | 22 SkColor GetBackgroundColor(); |
22 SkColor GetBorderColor(); | 23 SkColor GetBorderColor(); |
23 | 24 |
| 25 void SetBookmarkState(bool on); |
| 26 |
24 private: | 27 private: |
25 // CustomButton | 28 // CustomButton |
26 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 29 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
27 | 30 |
28 // MenuButtonListener | 31 // MenuButtonListener |
29 virtual void OnMenuButtonClicked(View* source, | 32 virtual void OnMenuButtonClicked(View* source, |
30 const gfx::Point& point) OVERRIDE; | 33 const gfx::Point& point) OVERRIDE; |
31 | 34 |
32 ExtensionService* extension_service_; | 35 Profile* profile_; |
| 36 |
| 37 scoped_ptr<ActionBoxMenu> action_box_menu_; |
| 38 |
| 39 bool bookmark_state_; |
33 | 40 |
34 DISALLOW_COPY_AND_ASSIGN(ActionBoxButtonView); | 41 DISALLOW_COPY_AND_ASSIGN(ActionBoxButtonView); |
35 }; | 42 }; |
36 | 43 |
37 #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 |