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

Side by Side Diff: chrome/views/controls/button/menu_button.h

Issue 42460: Adds a bookmark menu. This is experimental. To turn on you need... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ 5 #ifndef CHROME_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_
6 #define CHROME_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ 6 #define CHROME_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include "chrome/common/gfx/chrome_font.h" 10 #include "chrome/common/gfx/chrome_font.h"
(...skipping 17 matching lines...) Expand all
28 class MenuButton : public TextButton { 28 class MenuButton : public TextButton {
29 public: 29 public:
30 // 30 //
31 // Create a Button 31 // Create a Button
32 MenuButton(ButtonListener* listener, 32 MenuButton(ButtonListener* listener,
33 const std::wstring& text, 33 const std::wstring& text,
34 ViewMenuDelegate* menu_delegate, 34 ViewMenuDelegate* menu_delegate,
35 bool show_menu_marker); 35 bool show_menu_marker);
36 virtual ~MenuButton(); 36 virtual ~MenuButton();
37 37
38 void set_menu_delegate(ViewMenuDelegate* delegate) {
39 menu_delegate_ = delegate;
40 }
41
38 // Activate the button (called when the button is pressed). 42 // Activate the button (called when the button is pressed).
39 virtual bool Activate(); 43 virtual bool Activate();
40 44
41 // Overridden to take into account the potential use of a drop marker. 45 // Overridden to take into account the potential use of a drop marker.
42 virtual gfx::Size GetPreferredSize(); 46 virtual gfx::Size GetPreferredSize();
43 virtual void Paint(ChromeCanvas* canvas, bool for_drag); 47 virtual void Paint(ChromeCanvas* canvas, bool for_drag);
44 48
45 // These methods are overriden to implement a simple push button 49 // These methods are overriden to implement a simple push button
46 // behavior 50 // behavior
47 virtual bool OnMousePressed(const MouseEvent& e); 51 virtual bool OnMousePressed(const MouseEvent& e);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 93
90 // Whether or not we're showing a drop marker. 94 // Whether or not we're showing a drop marker.
91 bool show_menu_marker_; 95 bool show_menu_marker_;
92 96
93 friend class TextButtonBackground; 97 friend class TextButtonBackground;
94 }; 98 };
95 99
96 } // namespace views 100 } // namespace views
97 101
98 #endif // CHROME_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ 102 #endif // CHROME_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_
OLDNEW
« chrome/browser/views/bookmark_menu_button.h ('K') | « chrome/common/chrome_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698