| 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_WRAPPER_H_ | 5 #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WRAPPER_H_ |
| 6 #define CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WRAPPER_H_ | 6 #define CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WRAPPER_H_ |
| 7 | 7 |
| 8 class ChromeFont; | 8 class ChromeFont; |
| 9 | 9 |
| 10 namespace views { | 10 namespace views { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // associated NativeButton. | 24 // associated NativeButton. |
| 25 virtual void UpdateFont() = 0; | 25 virtual void UpdateFont() = 0; |
| 26 | 26 |
| 27 // Updates the native button's default state from the state stored in its | 27 // Updates the native button's default state from the state stored in its |
| 28 // associated NativeButton. | 28 // associated NativeButton. |
| 29 virtual void UpdateDefault() = 0; | 29 virtual void UpdateDefault() = 0; |
| 30 | 30 |
| 31 // Updates the native button's checked state from the state stored in its | 31 // Updates the native button's checked state from the state stored in its |
| 32 // associated NativeCheckbox. Valid only for checkboxes and radio buttons. | 32 // associated NativeCheckbox. Valid only for checkboxes and radio buttons. |
| 33 virtual void UpdateChecked() {} | 33 virtual void UpdateChecked() {} |
| 34 | 34 |
| 35 // Shows the pushed state for the button if |pushed| is true. | 35 // Shows the pushed state for the button if |pushed| is true. |
| 36 virtual void SetPushed(bool pushed) {}; | 36 virtual void SetPushed(bool pushed) {}; |
| 37 | 37 |
| 38 // Retrieves the views::View that hosts the native control. | 38 // Retrieves the views::View that hosts the native control. |
| 39 virtual View* GetView() = 0; | 39 virtual View* GetView() = 0; |
| 40 | 40 |
| 41 // Sets the focus to the button. |
| 42 virtual void SetFocus() = 0; |
| 43 |
| 41 // Return the width of the button. Used for fixed size buttons (checkboxes and | 44 // Return the width of the button. Used for fixed size buttons (checkboxes and |
| 42 // radio buttons) only. | 45 // radio buttons) only. |
| 43 static int GetFixedWidth(); | 46 static int GetFixedWidth(); |
| 44 | 47 |
| 45 // Creates an appropriate NativeButtonWrapper for the platform. | 48 // Creates an appropriate NativeButtonWrapper for the platform. |
| 46 static NativeButtonWrapper* CreateNativeButtonWrapper(NativeButton* button); | 49 static NativeButtonWrapper* CreateNativeButtonWrapper(NativeButton* button); |
| 47 static NativeButtonWrapper* CreateCheckboxWrapper(Checkbox* checkbox); | 50 static NativeButtonWrapper* CreateCheckboxWrapper(Checkbox* checkbox); |
| 48 static NativeButtonWrapper* CreateRadioButtonWrapper( | 51 static NativeButtonWrapper* CreateRadioButtonWrapper( |
| 49 RadioButton* radio_button); | 52 RadioButton* radio_button); |
| 50 | 53 |
| 51 }; | 54 }; |
| 52 | 55 |
| 53 } // namespace views | 56 } // namespace views |
| 54 | 57 |
| 55 #endif // #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WRAPPER_H_ | 58 #endif // #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WRAPPER_H_ |
| OLD | NEW |