| Index: content/renderer/text_input_client_observer.h
|
| diff --git a/content/renderer/text_input_client_observer.h b/content/renderer/text_input_client_observer.h
|
| index 2c538a61c2b9813b18ae21cbb734c1d0f96bf773..6871057ba283f8d28f8a290dae6541bb2f46a4b1 100644
|
| --- a/content/renderer/text_input_client_observer.h
|
| +++ b/content/renderer/text_input_client_observer.h
|
| @@ -12,30 +12,41 @@
|
| #include "ui/gfx/range/range.h"
|
|
|
| namespace blink {
|
| -class WebView;
|
| +class WebFrameWidget;
|
| +class WebLocalFrame;
|
| }
|
|
|
| namespace content {
|
|
|
| -class RenderViewImpl;
|
| +class PepperPluginInstanceImpl;
|
| +class RenderWidget;
|
|
|
| // This is the renderer-side message filter that generates the replies for the
|
| // messages sent by the TextInputClientMac. See
|
| // content/browser/renderer_host/text_input_client_mac.h for more information.
|
| -class TextInputClientObserver : public RenderViewObserver {
|
| +class TextInputClientObserver : public IPC::Listener, public IPC::Sender {
|
| public:
|
| - explicit TextInputClientObserver(RenderViewImpl* render_view);
|
| + explicit TextInputClientObserver(RenderWidget* render_widget);
|
| ~TextInputClientObserver() override;
|
|
|
| - // RenderViewObserver overrides:
|
| + // IPC::Listener override.
|
| bool OnMessageReceived(const IPC::Message& message) override;
|
|
|
| + // IPC::Sender override.
|
| + bool Send(IPC::Message* message) override;
|
| +
|
| private:
|
| - // RenderViewObserver implementation.
|
| - void OnDestruct() override;
|
| + // The render widget corresponding to this TextInputClientObserver.
|
| + blink::WebFrameWidget* GetWebFrameWidget() const;
|
| +
|
| + blink::WebLocalFrame* GetFocusedFrame() const;
|
|
|
| - // Returns the WebView of the RenderView.
|
| - blink::WebView* webview();
|
| +#if defined(ENABLE_PLUGINS)
|
| + // Returns the currently focused pepper plugin on the page. The expectation is
|
| + // that the focused pepper plugin is inside a frame whose local root is equal
|
| + // to GetWebFrameWidget()->localRoot().
|
| + PepperPluginInstanceImpl* GetFocusedPepperPlugin() const;
|
| +#endif
|
|
|
| // IPC Message handlers:
|
| void OnStringAtPoint(gfx::Point point);
|
| @@ -43,9 +54,8 @@ class TextInputClientObserver : public RenderViewObserver {
|
| void OnFirstRectForCharacterRange(gfx::Range range);
|
| void OnStringForRange(gfx::Range range);
|
|
|
| -#if defined(ENABLE_PLUGINS)
|
| - RenderViewImpl* const render_view_impl_;
|
| -#endif
|
| + // The RenderWidget owning this instance of the observer.
|
| + RenderWidget* render_widget_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TextInputClientObserver);
|
| };
|
|
|