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

Side by Side Diff: views/controls/button/radio_button.h

Issue 6685069: Disambiguate OnMouseCaptureLost from OnMouseReleased, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments, fix tests, cleanup, etc. Created 9 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
« no previous file with comments | « views/controls/button/menu_button.cc ('k') | views/controls/button/radio_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 VIEWS_CONTROLS_BUTTON_RADIO_BUTTON_H_ 5 #ifndef VIEWS_CONTROLS_BUTTON_RADIO_BUTTON_H_
6 #define VIEWS_CONTROLS_BUTTON_RADIO_BUTTON_H_ 6 #define VIEWS_CONTROLS_BUTTON_RADIO_BUTTON_H_
7 #pragma once 7 #pragma once
8 8
9 #include "views/controls/button/checkbox.h" 9 #include "views/controls/button/checkbox.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 class NativeRadioButtonGtk; 13 class NativeRadioButtonGtk;
14 14
15 // A Checkbox subclass representing a radio button. 15 // A Checkbox subclass representing a radio button.
16 class RadioButton : public Checkbox { 16 class RadioButton : public Checkbox {
17 public: 17 public:
18 // The button's class name. 18 // The button's class name.
19 static const char kViewClassName[]; 19 static const char kViewClassName[];
20 20
21 RadioButton(const std::wstring& label, int group_id); 21 RadioButton(const std::wstring& label, int group_id);
22 virtual ~RadioButton(); 22 virtual ~RadioButton();
23 23
24 // Overridden from Checkbox: 24 // Overridden from Checkbox:
25 virtual void SetChecked(bool checked) OVERRIDE; 25 virtual void SetChecked(bool checked) OVERRIDE;
26 26
27 // Overridden from View: 27 // Overridden from View:
28 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 28 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
29 virtual View* GetSelectedViewForGroup(int group_id) OVERRIDE; 29 virtual View* GetSelectedViewForGroup(int group_id) OVERRIDE;
30 virtual bool IsGroupFocusTraversable() const OVERRIDE; 30 virtual bool IsGroupFocusTraversable() const OVERRIDE;
31 virtual void OnMouseReleased(const MouseEvent& event, bool canceled) 31 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE;
32 OVERRIDE; 32 virtual void OnMouseCaptureLost() OVERRIDE;
33 33
34 protected: 34 protected:
35 // Overridden from View: 35 // Overridden from View:
36 virtual std::string GetClassName() const OVERRIDE; 36 virtual std::string GetClassName() const OVERRIDE;
37 37
38 // Overridden from NativeButton: 38 // Overridden from NativeButton:
39 virtual NativeButtonWrapper* CreateWrapper(); 39 virtual NativeButtonWrapper* CreateWrapper() OVERRIDE;
40 40
41 private: 41 private:
42 friend class NativeRadioButtonGtk; 42 friend class NativeRadioButtonGtk;
43 43
44 NativeButtonWrapper* native_wrapper() { return native_wrapper_; } 44 NativeButtonWrapper* native_wrapper() { return native_wrapper_; }
45 45
46 DISALLOW_COPY_AND_ASSIGN(RadioButton); 46 DISALLOW_COPY_AND_ASSIGN(RadioButton);
47 }; 47 };
48 48
49 } // namespace views 49 } // namespace views
50 50
51 #endif // VIEWS_CONTROLS_BUTTON_RADIO_BUTTON_H_ 51 #endif // VIEWS_CONTROLS_BUTTON_RADIO_BUTTON_H_
OLDNEW
« no previous file with comments | « views/controls/button/menu_button.cc ('k') | views/controls/button/radio_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698