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

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

Issue 10533086: Action box menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Action box menu Created 8 years, 4 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 ExtensionService; 11 class Browser;
12 class Profile;
12 13
13 // ActionBoxButtonView displays a plus button with associated menu. 14 // ActionBoxButtonView displays a plus button with associated menu.
14 class ActionBoxButtonView : public views::MenuButton, 15 class ActionBoxButtonView : public views::MenuButton,
15 public views::MenuButtonListener { 16 public views::MenuButtonListener {
16 public: 17 public:
17 explicit ActionBoxButtonView(ExtensionService* extension_service); 18 explicit ActionBoxButtonView(Browser* browser, Profile* profile);
18 virtual ~ActionBoxButtonView(); 19 virtual ~ActionBoxButtonView();
19 20
20 SkColor GetBackgroundColor(); 21 SkColor GetBackgroundColor();
21 SkColor GetBorderColor(); 22 SkColor GetBorderColor();
22 23
24 void set_starred(bool starred) {
25 starred_ = starred;
26 }
27
23 private: 28 private:
24 // CustomButton 29 // CustomButton
25 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 30 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
26 31
27 // MenuButtonListener 32 // MenuButtonListener
28 virtual void OnMenuButtonClicked(View* source, 33 virtual void OnMenuButtonClicked(View* source,
29 const gfx::Point& point) OVERRIDE; 34 const gfx::Point& point) OVERRIDE;
30 35
31 ExtensionService* extension_service_; 36 Browser* browser_;
37 Profile* profile_;
38
39 // Set to true when the current page is bookmarked.
40 // To be passed to action box menu when this button is pressed.
41 bool starred_;
32 42
33 DISALLOW_COPY_AND_ASSIGN(ActionBoxButtonView); 43 DISALLOW_COPY_AND_ASSIGN(ActionBoxButtonView);
34 }; 44 };
35 45
36 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ACTION_BOX_BUTTON_VIEW_H_ 46 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ACTION_BOX_BUTTON_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698