| 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 VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ | 5 #ifndef VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ |
| 6 #define VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ | 6 #define VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ |
| 7 | 7 |
| 8 namespace views { | 8 namespace views { |
| 9 | 9 |
| 10 class NativeViewHost; | 10 class NativeViewHost; |
| 11 | 11 |
| 12 // An interface that implemented by an object that wraps a gfx::NativeView on | 12 // An interface that implemented by an object that wraps a gfx::NativeView on |
| 13 // a specific platform, used to perform platform specific operations on that | 13 // a specific platform, used to perform platform specific operations on that |
| 14 // native view when attached, detached, moved and sized. | 14 // native view when attached, detached, moved and sized. |
| 15 class NativeViewHostWrapper { | 15 class NativeViewHostWrapper { |
| 16 public: | 16 public: |
| 17 virtual ~NativeViewHostWrapper() {} |
| 18 |
| 17 // Called when a gfx::NativeView has been attached to the associated | 19 // Called when a gfx::NativeView has been attached to the associated |
| 18 // NativeViewHost, allowing the wrapper to perform platform-specific | 20 // NativeViewHost, allowing the wrapper to perform platform-specific |
| 19 // initialization. | 21 // initialization. |
| 20 virtual void NativeViewAttached() = 0; | 22 virtual void NativeViewAttached() = 0; |
| 21 | 23 |
| 22 // Called before the attached gfx::NativeView is detached from the | 24 // Called before the attached gfx::NativeView is detached from the |
| 23 // NativeViewHost, allowing the wrapper to perform platform-specific | 25 // NativeViewHost, allowing the wrapper to perform platform-specific |
| 24 // cleanup. | 26 // cleanup. |
| 25 virtual void NativeViewDetaching() = 0; | 27 virtual void NativeViewDetaching() = 0; |
| 26 | 28 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 53 virtual void SetFocus() = 0; | 55 virtual void SetFocus() = 0; |
| 54 | 56 |
| 55 // Creates a platform-specific instance of an object implementing this | 57 // Creates a platform-specific instance of an object implementing this |
| 56 // interface. | 58 // interface. |
| 57 static NativeViewHostWrapper* CreateWrapper(NativeViewHost* host); | 59 static NativeViewHostWrapper* CreateWrapper(NativeViewHost* host); |
| 58 }; | 60 }; |
| 59 | 61 |
| 60 } // namespace views | 62 } // namespace views |
| 61 | 63 |
| 62 #endif // VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ | 64 #endif // VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ |
| OLD | NEW |