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

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 most TODOs and sync. 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
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 std::string GetClassName() const 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 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
33 34
34 protected: 35 protected:
35 // Overridden from View:
36 virtual std::string GetClassName() const OVERRIDE;
37
38 // Overridden from NativeButton: 36 // Overridden from NativeButton:
39 virtual NativeButtonWrapper* CreateWrapper(); 37 virtual NativeButtonWrapper* CreateWrapper() OVERRIDE;
40 38
41 private: 39 private:
42 friend class NativeRadioButtonGtk; 40 friend class NativeRadioButtonGtk;
43 41
44 NativeButtonWrapper* native_wrapper() { return native_wrapper_; } 42 NativeButtonWrapper* native_wrapper() { return native_wrapper_; }
45 43
46 DISALLOW_COPY_AND_ASSIGN(RadioButton); 44 DISALLOW_COPY_AND_ASSIGN(RadioButton);
47 }; 45 };
48 46
49 } // namespace views 47 } // namespace views
50 48
51 #endif // VIEWS_CONTROLS_BUTTON_RADIO_BUTTON_H_ 49 #endif // VIEWS_CONTROLS_BUTTON_RADIO_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698