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

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

Issue 3032024: Add undeclared virtual destructors part 2... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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
« no previous file with comments | « printing/printed_pages_source.h ('k') | views/controls/button/native_button_wrapper.h » ('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) 2010 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_BUTTON_H_ 5 #ifndef VIEWS_CONTROLS_BUTTON_BUTTON_H_
6 #define VIEWS_CONTROLS_BUTTON_BUTTON_H_ 6 #define VIEWS_CONTROLS_BUTTON_BUTTON_H_
7 7
8 #include "views/view.h" 8 #include "views/view.h"
9 9
10 namespace views { 10 namespace views {
11 11
12 class Button; 12 class Button;
13 class Event; 13 class Event;
14 14
15 // An interface implemented by an object to let it know that a button was 15 // An interface implemented by an object to let it know that a button was
16 // pressed. 16 // pressed.
17 class ButtonListener { 17 class ButtonListener {
18 public: 18 public:
19 virtual void ButtonPressed(Button* sender, const views::Event& event) = 0; 19 virtual void ButtonPressed(Button* sender, const views::Event& event) = 0;
20
21 protected:
22 virtual ~ButtonListener() {}
20 }; 23 };
21 24
22 // A View representing a button. Depending on the specific type, the button 25 // A View representing a button. Depending on the specific type, the button
23 // could be implemented by a native control or custom rendered. 26 // could be implemented by a native control or custom rendered.
24 class Button : public View { 27 class Button : public View {
25 public: 28 public:
26 virtual ~Button(); 29 virtual ~Button();
27 30
28 void SetTooltipText(const std::wstring& tooltip_text); 31 void SetTooltipText(const std::wstring& tooltip_text);
29 32
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 67
65 // Event flags present when the button was clicked. 68 // Event flags present when the button was clicked.
66 int mouse_event_flags_; 69 int mouse_event_flags_;
67 70
68 DISALLOW_COPY_AND_ASSIGN(Button); 71 DISALLOW_COPY_AND_ASSIGN(Button);
69 }; 72 };
70 73
71 } // namespace views 74 } // namespace views
72 75
73 #endif // VIEWS_CONTROLS_BUTTON_BUTTON_H_ 76 #endif // VIEWS_CONTROLS_BUTTON_BUTTON_H_
OLDNEW
« no previous file with comments | « printing/printed_pages_source.h ('k') | views/controls/button/native_button_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698