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

Side by Side Diff: ui/views/controls/button/custom_button.h

Issue 82113004: Fix key navigation to cut/copy/paste zoom button on wrench menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ 6 #define UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/events/event_constants.h" 9 #include "ui/events/event_constants.h"
10 #include "ui/gfx/animation/animation_delegate.h" 10 #include "ui/gfx/animation/animation_delegate.h"
(...skipping 11 matching lines...) Expand all
22 // TextButton. 22 // TextButton.
23 // Note that this type of button is not focusable by default and will not be 23 // Note that this type of button is not focusable by default and will not be
24 // part of the focus chain. Call set_focusable(true) to make it part of the 24 // part of the focus chain. Call set_focusable(true) to make it part of the
25 // focus chain. 25 // focus chain.
26 class VIEWS_EXPORT CustomButton : public Button, 26 class VIEWS_EXPORT CustomButton : public Button,
27 public gfx::AnimationDelegate { 27 public gfx::AnimationDelegate {
28 public: 28 public:
29 // The menu button's class name. 29 // The menu button's class name.
30 static const char kViewClassName[]; 30 static const char kViewClassName[];
31 31
32 static const CustomButton* AsCustomButton(const views::View* view);
33 static CustomButton* AsCustomButton(views::View* view);
34
32 virtual ~CustomButton(); 35 virtual ~CustomButton();
33 36
34 // Get/sets the current display state of the button. 37 // Get/sets the current display state of the button.
35 ButtonState state() const { return state_; } 38 ButtonState state() const { return state_; }
36 void SetState(ButtonState state); 39 void SetState(ButtonState state);
37 40
38 // Starts throbbing. See HoverAnimation for a description of cycles_til_stop. 41 // Starts throbbing. See HoverAnimation for a description of cycles_til_stop.
39 void StartThrobbing(int cycles_til_stop); 42 void StartThrobbing(int cycles_til_stop);
40 43
41 // Stops throbbing immediately. 44 // Stops throbbing immediately.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 protected: 152 protected:
150 CustomButtonStateChangedDelegate() {} 153 CustomButtonStateChangedDelegate() {}
151 154
152 private: 155 private:
153 DISALLOW_COPY_AND_ASSIGN(CustomButtonStateChangedDelegate); 156 DISALLOW_COPY_AND_ASSIGN(CustomButtonStateChangedDelegate);
154 }; 157 };
155 158
156 } // namespace views 159 } // namespace views
157 160
158 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ 161 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/wrench_menu.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698