| OLD | NEW |
| 1 // Copyright (c) 2011 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_NATIVE_BUTTON_H_ | 5 #ifndef VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_ |
| 6 #define VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_ | 6 #define VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 // TODO(avi): remove when not needed | 9 // TODO(avi): remove when not needed |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 void set_ignore_minimum_size(bool ignore_minimum_size) { | 51 void set_ignore_minimum_size(bool ignore_minimum_size) { |
| 52 ignore_minimum_size_ = ignore_minimum_size; | 52 ignore_minimum_size_ = ignore_minimum_size; |
| 53 } | 53 } |
| 54 | 54 |
| 55 // Called by the wrapper when the actual wrapped native button was pressed. | 55 // Called by the wrapper when the actual wrapped native button was pressed. |
| 56 void ButtonPressed(); | 56 void ButtonPressed(); |
| 57 | 57 |
| 58 // Overridden from View: | 58 // Overridden from View: |
| 59 virtual gfx::Size GetPreferredSize() OVERRIDE; | 59 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 60 virtual void Layout() OVERRIDE; | 60 virtual void Layout() OVERRIDE; |
| 61 virtual void SetEnabled(bool flag) OVERRIDE; | 61 virtual void OnEnabledChanged() OVERRIDE; |
| 62 virtual void OnFocus() OVERRIDE; | 62 virtual void OnFocus() OVERRIDE; |
| 63 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; | 63 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; |
| 64 | 64 |
| 65 protected: | 65 protected: |
| 66 virtual void ViewHierarchyChanged(bool is_add, View* parent, | 66 virtual void ViewHierarchyChanged(bool is_add, View* parent, |
| 67 View* child) OVERRIDE; | 67 View* child) OVERRIDE; |
| 68 virtual std::string GetClassName() const OVERRIDE; | 68 virtual std::string GetClassName() const OVERRIDE; |
| 69 virtual bool AcceleratorPressed(const Accelerator& accelerator) OVERRIDE; | 69 virtual bool AcceleratorPressed(const Accelerator& accelerator) OVERRIDE; |
| 70 | 70 |
| 71 // Create the button wrapper and returns it. Ownership of the returned | 71 // Create the button wrapper and returns it. Ownership of the returned |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 virtual ~NativeButton(); | 134 virtual ~NativeButton(); |
| 135 | 135 |
| 136 private: | 136 private: |
| 137 DISALLOW_COPY_AND_ASSIGN(NativeButton); | 137 DISALLOW_COPY_AND_ASSIGN(NativeButton); |
| 138 }; | 138 }; |
| 139 #endif | 139 #endif |
| 140 | 140 |
| 141 } // namespace views | 141 } // namespace views |
| 142 | 142 |
| 143 #endif // VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_ | 143 #endif // VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_ |
| OLD | NEW |