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

Unified Diff: chrome/common/text_input_client_messages.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
« no previous file with comments | « chrome/common/attributed_string_coder_mac_unittest.mm ('k') | chrome/common/text_input_client_messages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/text_input_client_messages.h
diff --git a/chrome/common/text_input_client_messages.h b/chrome/common/text_input_client_messages.h
new file mode 100644
index 0000000000000000000000000000000000000000..a840c2c86ef12700d166dbcfcbb9eb19b80bde2e
--- /dev/null
+++ b/chrome/common/text_input_client_messages.h
@@ -0,0 +1,55 @@
+// 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_COMMON_TEXT_INPUT_CLIENT_MESSAGES_H_
+#define CHROME_COMMON_TEXT_INPUT_CLIENT_MESSAGES_H_
+
+#include "ipc/ipc_message_macros.h"
+#include "ui/base/range/range.h"
+#include "ui/gfx/rect.h"
+
+#if defined(OS_MACOSX)
+#include "chrome/common/attributed_string_coder_mac.h"
+#endif
+
+#define IPC_MESSAGE_START TextInputClientMsgStart
+
+// Browser -> Renderer Messages ////////////////////////////////////////////////
+// These messages are sent from the browser to the renderer. Each one has a
+// corresponding reply message.
+////////////////////////////////////////////////////////////////////////////////
+
+// Tells the renderer to send back the character index for a point.
+IPC_MESSAGE_ROUTED1(TextInputClientMsg_CharacterIndexForPoint,
+ gfx::Point)
+
+// Tells the renderer to send back the rectangle for a given character range.
+IPC_MESSAGE_ROUTED1(TextInputClientMsg_FirstRectForCharacterRange,
+ ui::Range)
+
+// Tells the renderer to send back the text fragment in a given range.
+IPC_MESSAGE_ROUTED1(TextInputClientMsg_StringForRange,
+ ui::Range)
+
+////////////////////////////////////////////////////////////////////////////////
+
+// Renderer -> Browser Replies /////////////////////////////////////////////////
+// These messages are sent in reply to the above messages.
+////////////////////////////////////////////////////////////////////////////////
+
+// Reply message for TextInputClientMsg_CharacterIndexForPoint.
+IPC_MESSAGE_ROUTED1(TextInputClientReplyMsg_GotCharacterIndexForPoint,
+ size_t /* character index */)
+
+// Reply message for TextInputClientMsg_FirstRectForCharacterRange.
+IPC_MESSAGE_ROUTED1(TextInputClientReplyMsg_GotFirstRectForRange,
+ gfx::Rect /* frame rectangle */)
+
+#if defined(OS_MACOSX)
+// Reply message for TextInputClientMsg_StringForRange.
+IPC_MESSAGE_ROUTED1(TextInputClientReplyMsg_GotStringForRange,
+ mac::AttributedStringCoder::EncodedString)
+#endif // defined(OS_MACOSX)
+
+#endif // CHROME_COMMON_TEXT_INPUT_CLIENT_MESSAGES_H_
« no previous file with comments | « chrome/common/attributed_string_coder_mac_unittest.mm ('k') | chrome/common/text_input_client_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698