| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // A floating point variant of the above. PointF values will be snapped to | 78 // A floating point variant of the above. PointF values will be snapped to |
| 79 // integral points before transformation. | 79 // integral points before transformation. |
| 80 virtual gfx::PointF TransformPointToRootCoordSpaceF( | 80 virtual gfx::PointF TransformPointToRootCoordSpaceF( |
| 81 const gfx::PointF& point) = 0; | 81 const gfx::PointF& point) = 0; |
| 82 | 82 |
| 83 // Retrieves the native view used to contain plugins and identify the | 83 // Retrieves the native view used to contain plugins and identify the |
| 84 // renderer in IPC messages. | 84 // renderer in IPC messages. |
| 85 virtual gfx::NativeView GetNativeView() const = 0; | 85 virtual gfx::NativeView GetNativeView() const = 0; |
| 86 virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0; | 86 virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0; |
| 87 | 87 |
| 88 // Returns scale factor of the display nearest to the native view. |
| 89 // Returns 1.0f if the platform does not support DIP. |
| 90 virtual float GetScaleFactorForNativeView() const = 0; |
| 91 |
| 88 // Returns a ui::TextInputClient to support text input or nullptr if this RWHV | 92 // Returns a ui::TextInputClient to support text input or nullptr if this RWHV |
| 89 // doesn't support text input. | 93 // doesn't support text input. |
| 90 // Note: Not all the platforms use ui::InputMethod and ui::TextInputClient for | 94 // Note: Not all the platforms use ui::InputMethod and ui::TextInputClient for |
| 91 // text input. Some platforms (Mac and Android for example) use their own | 95 // text input. Some platforms (Mac and Android for example) use their own |
| 92 // text input system. | 96 // text input system. |
| 93 virtual ui::TextInputClient* GetTextInputClient() = 0; | 97 virtual ui::TextInputClient* GetTextInputClient() = 0; |
| 94 | 98 |
| 95 // Set focus to the associated View component. | 99 // Set focus to the associated View component. |
| 96 virtual void Focus() = 0; | 100 virtual void Focus() = 0; |
| 97 // Returns true if the View currently has the focus. | 101 // Returns true if the View currently has the focus. |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // Returns |true| if text is currently being spoken by Mac OS X. | 196 // Returns |true| if text is currently being spoken by Mac OS X. |
| 193 virtual bool IsSpeaking() const = 0; | 197 virtual bool IsSpeaking() const = 0; |
| 194 // Stops speaking, if it is currently in progress. | 198 // Stops speaking, if it is currently in progress. |
| 195 virtual void StopSpeaking() = 0; | 199 virtual void StopSpeaking() = 0; |
| 196 #endif // defined(OS_MACOSX) | 200 #endif // defined(OS_MACOSX) |
| 197 }; | 201 }; |
| 198 | 202 |
| 199 } // namespace content | 203 } // namespace content |
| 200 | 204 |
| 201 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 205 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
| OLD | NEW |