Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3083)

Unified Diff: chrome/renderer/text_input_client_observer.h

Issue 6289009: [Mac] Implement the system dictionary popup by implementing NSTextInput methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address jam@ comments Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/text_input_client_observer.h
diff --git a/chrome/renderer/text_input_client_observer.h b/chrome/renderer/text_input_client_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..4bb3b23024e9d92341831ad48212ce5d6fe4e650
--- /dev/null
+++ b/chrome/renderer/text_input_client_observer.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_
+#define CHROME_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_
+
+#include "base/basictypes.h"
+#include "build/build_config.h"
+#include "chrome/renderer/render_view_observer.h"
+#include "ui/gfx/point.h"
+
+namespace WebKit {
+class WebView;
+}
+
+// This is the renderer-side message filter that generates the replies for the
+// messages sent by the TextInputClientMac. See
+// chrome/browser/renderer_host/text_input_client_mac.h for more information.
+class TextInputClientObserver : public RenderViewObserver {
+ public:
+ explicit TextInputClientObserver(RenderView* render_view);
+ virtual ~TextInputClientObserver();
+
+ // RenderViewObserver overrides:
+ bool OnMessageReceived(const IPC::Message& message);
+
+ private:
+ // Returns the WebView of the RenderView.
+ WebKit::WebView* webview();
+
+ // IPC Message handlers:
+ void OnCharacterIndexForPoint(gfx::Point point);
+ void OnFirstRectForCharacterRange(uint location, uint length);
+ void OnStringForRange(uint location, uint length);
+
+ DISALLOW_COPY_AND_ASSIGN(TextInputClientObserver);
+};
+
+#endif // CHROME_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698