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