| OLD | NEW |
| 1 // Copyright (c) 2010 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_NATIVE_CONTROL_H_ | 5 #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_H_ |
| 6 #define VIEWS_CONTROLS_NATIVE_CONTROL_H_ | 6 #define VIEWS_CONTROLS_NATIVE_CONTROL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 | 10 |
| 11 #include "ui/base/keycodes/keyboard_codes.h" | 11 #include "ui/base/keycodes/keyboard_codes.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 31 TRAILING }; | 31 TRAILING }; |
| 32 | 32 |
| 33 NativeControl(); | 33 NativeControl(); |
| 34 virtual ~NativeControl(); | 34 virtual ~NativeControl(); |
| 35 | 35 |
| 36 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); | 36 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); |
| 37 virtual void Layout(); | 37 virtual void Layout(); |
| 38 | 38 |
| 39 // Overridden to properly set the native control state. | 39 // Overridden to properly set the native control state. |
| 40 virtual void SetVisible(bool f); | 40 virtual void SetVisible(bool f); |
| 41 virtual void SetEnabled(bool enabled); | 41 virtual void OnEnabledChanged(); |
| 42 | 42 |
| 43 // Overridden to do nothing. | 43 // Overridden to do nothing. |
| 44 virtual void OnPaint(gfx::Canvas* canvas); | 44 virtual void OnPaint(gfx::Canvas* canvas); |
| 45 | 45 |
| 46 protected: | 46 protected: |
| 47 friend class NativeControlContainer; | 47 friend class NativeControlContainer; |
| 48 | 48 |
| 49 // Overridden by sub-classes to create the windows control which is wrapped | 49 // Overridden by sub-classes to create the windows control which is wrapped |
| 50 virtual HWND CreateNativeControl(HWND parent_container) = 0; | 50 virtual HWND CreateNativeControl(HWND parent_container) = 0; |
| 51 | 51 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 WPARAM w_param, LPARAM l_param); | 117 WPARAM w_param, LPARAM l_param); |
| 118 | 118 |
| 119 NativeControlContainer* container_; | 119 NativeControlContainer* container_; |
| 120 | 120 |
| 121 DISALLOW_COPY_AND_ASSIGN(NativeControl); | 121 DISALLOW_COPY_AND_ASSIGN(NativeControl); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 } // namespace views | 124 } // namespace views |
| 125 | 125 |
| 126 #endif // VIEWS_CONTROLS_NATIVE_CONTROL_H_ | 126 #endif // VIEWS_CONTROLS_NATIVE_CONTROL_H_ |
| OLD | NEW |