| OLD | NEW |
| 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_NATIVE_BUTTON_H__ | 5 #ifndef CHROME_VIEWS_NATIVE_BUTTON_H__ |
| 6 #define CHROME_VIEWS_NATIVE_BUTTON_H__ | 6 #define CHROME_VIEWS_NATIVE_BUTTON_H__ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gfx/size.h" | 10 #include "base/gfx/size.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // get all the listenery-stuff for free and to work with | 23 // get all the listenery-stuff for free and to work with |
| 24 // AddManagedButton. | 24 // AddManagedButton. |
| 25 // | 25 // |
| 26 //////////////////////////////////////////////////////////////////////////////// | 26 //////////////////////////////////////////////////////////////////////////////// |
| 27 class NativeButton : public NativeControl { | 27 class NativeButton : public NativeControl { |
| 28 public: | 28 public: |
| 29 explicit NativeButton(const std::wstring& label); | 29 explicit NativeButton(const std::wstring& label); |
| 30 NativeButton(const std::wstring& label, bool is_default); | 30 NativeButton(const std::wstring& label, bool is_default); |
| 31 virtual ~NativeButton(); | 31 virtual ~NativeButton(); |
| 32 | 32 |
| 33 virtual void GetPreferredSize(CSize *out); | 33 virtual gfx::Size GetPreferredSize(); |
| 34 | 34 |
| 35 void SetLabel(const std::wstring& l); | 35 void SetLabel(const std::wstring& l); |
| 36 const std::wstring GetLabel() const; | 36 const std::wstring GetLabel() const; |
| 37 | 37 |
| 38 class Listener { | 38 class Listener { |
| 39 public: | 39 public: |
| 40 // | 40 // |
| 41 // This is invoked once the button is released. | 41 // This is invoked once the button is released. |
| 42 virtual void ButtonPressed(NativeButton* sender) = 0; | 42 virtual void ButtonPressed(NativeButton* sender) = 0; |
| 43 }; | 43 }; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // Storage of strings needed for accessibility. | 131 // Storage of strings needed for accessibility. |
| 132 std::wstring accessible_name_; | 132 std::wstring accessible_name_; |
| 133 | 133 |
| 134 DISALLOW_EVIL_CONSTRUCTORS(NativeButton); | 134 DISALLOW_EVIL_CONSTRUCTORS(NativeButton); |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 } | 137 } |
| 138 | 138 |
| 139 #endif // CHROME_VIEWS_NATIVE_BUTTON_H__ | 139 #endif // CHROME_VIEWS_NATIVE_BUTTON_H__ |
| 140 | 140 |
| OLD | NEW |