| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/gfx/native_widget_types.h" |
| 10 |
| 9 namespace views { | 11 namespace views { |
| 10 | 12 |
| 11 class NativeViewHost; | 13 class NativeViewHost; |
| 12 | 14 |
| 13 // An interface that implemented by an object that wraps a gfx::NativeView on | 15 // An interface that implemented by an object that wraps a gfx::NativeView on |
| 14 // a specific platform, used to perform platform specific operations on that | 16 // a specific platform, used to perform platform specific operations on that |
| 15 // native view when attached, detached, moved and sized. | 17 // native view when attached, detached, moved and sized. |
| 16 class NativeViewHostWrapper { | 18 class NativeViewHostWrapper { |
| 17 public: | 19 public: |
| 18 virtual ~NativeViewHostWrapper() {} | 20 virtual ~NativeViewHostWrapper() {} |
| (...skipping 30 matching lines...) Expand all Loading... |
| 49 // native view). | 51 // native view). |
| 50 virtual void ShowWidget(int x, int y, int w, int h) = 0; | 52 virtual void ShowWidget(int x, int y, int w, int h) = 0; |
| 51 | 53 |
| 52 // Hides the gfx::NativeView. NOTE: this may be invoked when the native view | 54 // Hides the gfx::NativeView. NOTE: this may be invoked when the native view |
| 53 // is already hidden. | 55 // is already hidden. |
| 54 virtual void HideWidget() = 0; | 56 virtual void HideWidget() = 0; |
| 55 | 57 |
| 56 // Sets focus to the gfx::NativeView. | 58 // Sets focus to the gfx::NativeView. |
| 57 virtual void SetFocus() = 0; | 59 virtual void SetFocus() = 0; |
| 58 | 60 |
| 61 // Return the native view accessible corresponding to the wrapped native |
| 62 // view. |
| 63 virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0; |
| 64 |
| 59 // Creates a platform-specific instance of an object implementing this | 65 // Creates a platform-specific instance of an object implementing this |
| 60 // interface. | 66 // interface. |
| 61 static NativeViewHostWrapper* CreateWrapper(NativeViewHost* host); | 67 static NativeViewHostWrapper* CreateWrapper(NativeViewHost* host); |
| 62 }; | 68 }; |
| 63 | 69 |
| 64 } // namespace views | 70 } // namespace views |
| 65 | 71 |
| 66 #endif // VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ | 72 #endif // VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ |
| OLD | NEW |