| OLD | NEW |
| 1 // Copyright (c) 2011 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 UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ | 5 #ifndef UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ |
| 6 #define UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ | 6 #define UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/native_widget_types.h" | 8 #include "ui/gfx/native_widget_types.h" |
| 9 #include "ui/views/views_export.h" | 9 #include "ui/views/views_export.h" |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 // Whether or not a clip has been installed on the wrapped gfx::NativeView. | 46 // Whether or not a clip has been installed on the wrapped gfx::NativeView. |
| 47 virtual bool HasInstalledClip() = 0; | 47 virtual bool HasInstalledClip() = 0; |
| 48 | 48 |
| 49 // Removes the clip installed on the gfx::NativeView by way of InstallClip. A | 49 // Removes the clip installed on the gfx::NativeView by way of InstallClip. A |
| 50 // following call to ShowWidget should occur after calling this method to | 50 // following call to ShowWidget should occur after calling this method to |
| 51 // position the gfx::NativeView correctly, since the clipping process may have | 51 // position the gfx::NativeView correctly, since the clipping process may have |
| 52 // adjusted its position. | 52 // adjusted its position. |
| 53 virtual void UninstallClip() = 0; | 53 virtual void UninstallClip() = 0; |
| 54 | 54 |
| 55 // Shows the gfx::NativeView at the specified position (relative to the parent | 55 // Shows the gfx::NativeView within the specified region (relative to the |
| 56 // native view). | 56 // parent native view) and with the given rendering size. The content will |
| 57 virtual void ShowWidget(int x, int y, int w, int h) = 0; | 57 // appear scaled if the |render_w| or |render_h| are different from |w| or |
| 58 // |h|. |
| 59 virtual void ShowWidget(int x, |
| 60 int y, |
| 61 int w, |
| 62 int h, |
| 63 int render_w, |
| 64 int render_h) = 0; |
| 58 | 65 |
| 59 // Hides the gfx::NativeView. NOTE: this may be invoked when the native view | 66 // Hides the gfx::NativeView. NOTE: this may be invoked when the native view |
| 60 // is already hidden. | 67 // is already hidden. |
| 61 virtual void HideWidget() = 0; | 68 virtual void HideWidget() = 0; |
| 62 | 69 |
| 63 // Sets focus to the gfx::NativeView. | 70 // Sets focus to the gfx::NativeView. |
| 64 virtual void SetFocus() = 0; | 71 virtual void SetFocus() = 0; |
| 65 | 72 |
| 66 // Return the native view accessible corresponding to the wrapped native | 73 // Return the native view accessible corresponding to the wrapped native |
| 67 // view. | 74 // view. |
| 68 virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0; | 75 virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0; |
| 69 | 76 |
| 70 // Returns the native cursor corresponding to the point (x, y) | 77 // Returns the native cursor corresponding to the point (x, y) |
| 71 // in the native view. | 78 // in the native view. |
| 72 virtual gfx::NativeCursor GetCursor(int x, int y) = 0; | 79 virtual gfx::NativeCursor GetCursor(int x, int y) = 0; |
| 73 | 80 |
| 74 // Creates a platform-specific instance of an object implementing this | 81 // Creates a platform-specific instance of an object implementing this |
| 75 // interface. | 82 // interface. |
| 76 static NativeViewHostWrapper* CreateWrapper(NativeViewHost* host); | 83 static NativeViewHostWrapper* CreateWrapper(NativeViewHost* host); |
| 77 }; | 84 }; |
| 78 | 85 |
| 79 } // namespace views | 86 } // namespace views |
| 80 | 87 |
| 81 #endif // UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ | 88 #endif // UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ |
| OLD | NEW |