| 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 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 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include "views/view.h" | 10 #include "views/view.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 virtual ~NativeControl(); | 36 virtual ~NativeControl(); |
| 37 | 37 |
| 38 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); | 38 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); |
| 39 virtual void Layout(); | 39 virtual void Layout(); |
| 40 | 40 |
| 41 // Overridden to properly set the native control state. | 41 // Overridden to properly set the native control state. |
| 42 virtual void SetVisible(bool f); | 42 virtual void SetVisible(bool f); |
| 43 virtual void SetEnabled(bool enabled); | 43 virtual void SetEnabled(bool enabled); |
| 44 | 44 |
| 45 // Overridden to do nothing. | 45 // Overridden to do nothing. |
| 46 virtual void Paint(ChromeCanvas* canvas); | 46 virtual void Paint(gfx::Canvas* canvas); |
| 47 protected: | 47 protected: |
| 48 friend class NativeControlContainer; | 48 friend class NativeControlContainer; |
| 49 | 49 |
| 50 // Overridden by sub-classes to create the windows control which is wrapped | 50 // Overridden by sub-classes to create the windows control which is wrapped |
| 51 virtual HWND CreateNativeControl(HWND parent_container) = 0; | 51 virtual HWND CreateNativeControl(HWND parent_container) = 0; |
| 52 | 52 |
| 53 // Invoked when the native control sends a WM_NOTIFY message to its parent | 53 // Invoked when the native control sends a WM_NOTIFY message to its parent |
| 54 virtual LRESULT OnNotify(int w_param, LPNMHDR l_param) = 0; | 54 virtual LRESULT OnNotify(int w_param, LPNMHDR l_param) = 0; |
| 55 | 55 |
| 56 // Invoked when the native control sends a WM_COMMAND message to its parent | 56 // Invoked when the native control sends a WM_COMMAND message to its parent |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 WPARAM w_param, LPARAM l_param); | 127 WPARAM w_param, LPARAM l_param); |
| 128 | 128 |
| 129 NativeControlContainer* container_; | 129 NativeControlContainer* container_; |
| 130 | 130 |
| 131 DISALLOW_COPY_AND_ASSIGN(NativeControl); | 131 DISALLOW_COPY_AND_ASSIGN(NativeControl); |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } // namespace views | 134 } // namespace views |
| 135 | 135 |
| 136 #endif // VIEWS_CONTROLS_NATIVE_CONTROL_H_ | 136 #endif // VIEWS_CONTROLS_NATIVE_CONTROL_H_ |
| OLD | NEW |