| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 #include "third_party/skia/include/core/SkBitmap.h" | 11 #include "third_party/skia/include/core/SkBitmap.h" |
| 12 #include "third_party/skia/include/core/SkRegion.h" | 12 #include "third_party/skia/include/core/SkRegion.h" |
| 13 #include "third_party/WebKit/public/web/WebInputEvent.h" | 13 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 14 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
| 15 | 15 |
| 16 class GURL; | 16 class GURL; |
| 17 | 17 |
| 18 namespace gfx { | 18 namespace gfx { |
| 19 class Rect; | 19 class Rect; |
| 20 class Size; | 20 class Size; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace ui { |
| 24 class TextInputClient; |
| 25 } |
| 26 |
| 23 namespace content { | 27 namespace content { |
| 24 | 28 |
| 25 class BrowserAccessibilityManager; | 29 class BrowserAccessibilityManager; |
| 26 class RenderWidgetHost; | 30 class RenderWidgetHost; |
| 27 | 31 |
| 28 // RenderWidgetHostView is an interface implemented by an object that acts as | 32 // RenderWidgetHostView is an interface implemented by an object that acts as |
| 29 // the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its | 33 // the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its |
| 30 // associated RenderProcessHost own the "Model" in this case which is the | 34 // associated RenderProcessHost own the "Model" in this case which is the |
| 31 // child renderer process. The View is responsible for receiving events from | 35 // child renderer process. The View is responsible for receiving events from |
| 32 // the surrounding environment and passing them to the RenderWidgetHost, and | 36 // the surrounding environment and passing them to the RenderWidgetHost, and |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // Tells the View to size and move itself to the specified size and point in | 73 // Tells the View to size and move itself to the specified size and point in |
| 70 // screen space. | 74 // screen space. |
| 71 virtual void SetBounds(const gfx::Rect& rect) = 0; | 75 virtual void SetBounds(const gfx::Rect& rect) = 0; |
| 72 | 76 |
| 73 // Retrieves the native view used to contain plugins and identify the | 77 // Retrieves the native view used to contain plugins and identify the |
| 74 // renderer in IPC messages. | 78 // renderer in IPC messages. |
| 75 virtual gfx::NativeView GetNativeView() const = 0; | 79 virtual gfx::NativeView GetNativeView() const = 0; |
| 76 virtual gfx::NativeViewId GetNativeViewId() const = 0; | 80 virtual gfx::NativeViewId GetNativeViewId() const = 0; |
| 77 virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0; | 81 virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0; |
| 78 | 82 |
| 83 // Returns a ui::TextInputClient to support text input or NULL if this RWHV |
| 84 // doesn't support text input. |
| 85 // Note: Not all the platforms use ui::InputMethod and ui::TextInputClient for |
| 86 // text input. Some of platforms (Mac and Android for example) use their own |
| 87 // text input system. |
| 88 virtual ui::TextInputClient* GetTextInputClient() = 0; |
| 89 |
| 79 // Set focus to the associated View component. | 90 // Set focus to the associated View component. |
| 80 virtual void Focus() = 0; | 91 virtual void Focus() = 0; |
| 81 // Returns true if the View currently has the focus. | 92 // Returns true if the View currently has the focus. |
| 82 virtual bool HasFocus() const = 0; | 93 virtual bool HasFocus() const = 0; |
| 83 // Returns true is the current display surface is available. | 94 // Returns true is the current display surface is available. |
| 84 virtual bool IsSurfaceAvailableForCopy() const = 0; | 95 virtual bool IsSurfaceAvailableForCopy() const = 0; |
| 85 | 96 |
| 86 // Shows/hides the view. These must always be called together in pairs. | 97 // Shows/hides the view. These must always be called together in pairs. |
| 87 // It is not legal to call Hide() multiple times in a row. | 98 // It is not legal to call Hide() multiple times in a row. |
| 88 virtual void Show() = 0; | 99 virtual void Show() = 0; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // Returns |true| if text is currently being spoken by Mac OS X. | 156 // Returns |true| if text is currently being spoken by Mac OS X. |
| 146 virtual bool IsSpeaking() const = 0; | 157 virtual bool IsSpeaking() const = 0; |
| 147 // Stops speaking, if it is currently in progress. | 158 // Stops speaking, if it is currently in progress. |
| 148 virtual void StopSpeaking() = 0; | 159 virtual void StopSpeaking() = 0; |
| 149 #endif // defined(OS_MACOSX) | 160 #endif // defined(OS_MACOSX) |
| 150 }; | 161 }; |
| 151 | 162 |
| 152 } // namespace content | 163 } // namespace content |
| 153 | 164 |
| 154 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 165 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
| OLD | NEW |