OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_ |
| 6 #define CHROME_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "build/build_config.h" |
| 10 #include "content/renderer/render_view_observer.h" |
| 11 #include "ui/base/range/range.h" |
| 12 #include "ui/gfx/point.h" |
| 13 |
| 14 namespace WebKit { |
| 15 class WebView; |
| 16 } |
| 17 |
| 18 // This is the renderer-side message filter that generates the replies for the |
| 19 // messages sent by the TextInputClientMac. See |
| 20 // chrome/browser/renderer_host/text_input_client_mac.h for more information. |
| 21 class TextInputClientObserver : public RenderViewObserver { |
| 22 public: |
| 23 explicit TextInputClientObserver(RenderView* render_view); |
| 24 virtual ~TextInputClientObserver(); |
| 25 |
| 26 // RenderViewObserver overrides: |
| 27 virtual bool OnMessageReceived(const IPC::Message& message); |
| 28 |
| 29 private: |
| 30 // Returns the WebView of the RenderView. |
| 31 WebKit::WebView* webview(); |
| 32 |
| 33 // IPC Message handlers: |
| 34 void OnCharacterIndexForPoint(gfx::Point point); |
| 35 void OnFirstRectForCharacterRange(ui::Range range); |
| 36 void OnStringForRange(ui::Range range); |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(TextInputClientObserver); |
| 39 }; |
| 40 |
| 41 #endif // CHROME_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_ |
OLD | NEW |