| 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; | |
| 13 | 12 |
| 14 // ActionBoxButtonView displays a plus button with associated menu. | 13 // ActionBoxButtonView displays a plus button with associated menu. |
| 15 class ActionBoxButtonView : public views::MenuButton, | 14 class ActionBoxButtonView : public views::MenuButton, |
| 16 public views::MenuButtonListener { | 15 public views::MenuButtonListener { |
| 17 public: | 16 public: |
| 18 explicit ActionBoxButtonView(Browser* browser, Profile* profile); | 17 explicit ActionBoxButtonView(Browser* browser); |
| 19 virtual ~ActionBoxButtonView(); | 18 virtual ~ActionBoxButtonView(); |
| 20 | 19 |
| 21 SkColor GetBackgroundColor(); | 20 SkColor GetBackgroundColor(); |
| 22 SkColor GetBorderColor(); | 21 SkColor GetBorderColor(); |
| 23 | 22 |
| 24 static bool IsActionBoxEnabled(); | 23 static bool IsActionBoxEnabled(); |
| 25 | 24 |
| 26 private: | 25 private: |
| 27 // Overridden from views::CustomButton: | 26 // Overridden from views::CustomButton: |
| 28 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 27 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 29 | 28 |
| 30 // Overridden from views::MenuButtonListener: | 29 // Overridden from views::MenuButtonListener: |
| 31 virtual void OnMenuButtonClicked(View* source, | 30 virtual void OnMenuButtonClicked(View* source, |
| 32 const gfx::Point& point) OVERRIDE; | 31 const gfx::Point& point) OVERRIDE; |
| 33 | 32 |
| 34 Browser* browser_; | 33 Browser* browser_; |
| 35 Profile* profile_; | |
| 36 | 34 |
| 37 DISALLOW_COPY_AND_ASSIGN(ActionBoxButtonView); | 35 DISALLOW_COPY_AND_ASSIGN(ActionBoxButtonView); |
| 38 }; | 36 }; |
| 39 | 37 |
| 40 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ACTION_BOX_BUTTON_VIEW_H_ | 38 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ACTION_BOX_BUTTON_VIEW_H_ |
| OLD | NEW |