| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_ | 5 #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_ |
| 6 #define CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_ | 6 #define CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_ |
| 7 | 7 |
| 8 #include "chrome/common/gfx/chrome_font.h" | 8 #include "chrome/common/gfx/chrome_font.h" |
| 9 #include "chrome/views/controls/button/button.h" | 9 #include "chrome/views/controls/button/button.h" |
| 10 #include "chrome/views/controls/button/native_button_wrapper.h" | 10 #include "chrome/views/controls/button/native_button_wrapper.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 void set_ignore_minimum_size(bool ignore_minimum_size) { | 41 void set_ignore_minimum_size(bool ignore_minimum_size) { |
| 42 ignore_minimum_size_ = ignore_minimum_size; | 42 ignore_minimum_size_ = ignore_minimum_size; |
| 43 } | 43 } |
| 44 | 44 |
| 45 // Called by the wrapper when the actual wrapped native button was pressed. | 45 // Called by the wrapper when the actual wrapped native button was pressed. |
| 46 void ButtonPressed(); | 46 void ButtonPressed(); |
| 47 | 47 |
| 48 // Overridden from View: | 48 // Overridden from View: |
| 49 virtual gfx::Size GetPreferredSize(); | 49 virtual gfx::Size GetPreferredSize(); |
| 50 virtual void Layout(); | 50 virtual void Layout(); |
| 51 virtual void SetEnabled(bool flag); |
| 51 virtual void Focus(); | 52 virtual void Focus(); |
| 52 | 53 |
| 53 protected: | 54 protected: |
| 54 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); | 55 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); |
| 55 virtual std::string GetClassName() const; | 56 virtual std::string GetClassName() const; |
| 56 virtual bool AcceleratorPressed(const Accelerator& accelerator); | 57 virtual bool AcceleratorPressed(const Accelerator& accelerator); |
| 57 | 58 |
| 58 // Create the button wrapper. Can be overridden by subclass to create a | 59 // Create the button wrapper. Can be overridden by subclass to create a |
| 59 // wrapper of a particular type. See NativeButtonWrapper interface for types. | 60 // wrapper of a particular type. See NativeButtonWrapper interface for types. |
| 60 virtual void CreateWrapper(); | 61 virtual void CreateWrapper(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 85 // the width/height is non-zero, the preferred size of the button will not be | 86 // the width/height is non-zero, the preferred size of the button will not be |
| 86 // less than this value when the dialog units are converted to pixels. | 87 // less than this value when the dialog units are converted to pixels. |
| 87 gfx::Size minimum_size_; | 88 gfx::Size minimum_size_; |
| 88 | 89 |
| 89 DISALLOW_COPY_AND_ASSIGN(NativeButton); | 90 DISALLOW_COPY_AND_ASSIGN(NativeButton); |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 } // namespace views | 93 } // namespace views |
| 93 | 94 |
| 94 #endif // #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_ | 95 #endif // #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_ |
| OLD | NEW |