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

Unified Diff: chrome/browser/renderer_host/text_input_client_message_filter.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: Fix Clang Created 9 years, 8 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/browser/renderer_host/text_input_client_message_filter.h
diff --git a/chrome/browser/renderer_host/text_input_client_message_filter.h b/chrome/browser/renderer_host/text_input_client_message_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..17c022bfa79948fae8134f016c8572c6a510d865
--- /dev/null
+++ b/chrome/browser/renderer_host/text_input_client_message_filter.h
@@ -0,0 +1,44 @@
+// 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_BROWSER_RENDERER_HOST_TEXT_INPUT_CLIENT_MESSAGE_FILTER_H_
+#define CHROME_BROWSER_RENDERER_HOST_TEXT_INPUT_CLIENT_MESSAGE_FILTER_H_
+
+#include "chrome/common/attributed_string_coder_mac.h"
+#include "content/browser/browser_message_filter.h"
+
+namespace gfx {
+class Rect;
+}
+
+namespace ui {
+class Range;
+}
+
+// This is a browser-side message filter that lives on the IO thread to handle
+// replies to messages sent by the TextInputClientMac. See
+// chrome/browser/renderer_host/text_input_client_mac.h for more information.
+class TextInputClientMessageFilter : public BrowserMessageFilter {
+ public:
+ explicit TextInputClientMessageFilter(int child_id);
+ virtual ~TextInputClientMessageFilter();
+
+ // BrowserMessageFilter override:
+ virtual bool OnMessageReceived(const IPC::Message& message,
+ bool* message_was_ok);
+
+ private:
+ // IPC Message handlers:
+ void OnGotCharacterIndexForPoint(size_t index);
+ void OnGotFirstRectForRange(const gfx::Rect& rect);
+ void OnGotStringFromRange(
+ const mac::AttributedStringCoder::EncodedString& string);
+
+ // Child process id.
+ int child_process_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(TextInputClientMessageFilter);
+};
+
+#endif // CHROME_BROWSER_RENDERER_HOST_TEXT_INPUT_CLIENT_MESSAGE_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698