[email protected] | 565477e | 2012-03-16 21:31:33 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | d4cff27 | 2011-05-02 15:46:01 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | 304017d | 2011-06-17 16:49:18 | [diff] [blame] | 5 | // Multiply-included message file, hence no include guard |
[email protected] | d4cff27 | 2011-05-02 15:46:01 | [diff] [blame] | 6 | |
avi | a9aa7a8 | 2015-12-25 03:06:31 | [diff] [blame] | 7 | #include <stddef.h> |
| 8 | |
| 9 | #include "build/build_config.h" |
[email protected] | d4cff27 | 2011-05-02 15:46:01 | [diff] [blame] | 10 | #include "ipc/ipc_message_macros.h" |
tfarina | 3b0452d | 2014-12-31 15:20:09 | [diff] [blame] | 11 | #include "ui/gfx/geometry/rect.h" |
[email protected] | db4fc1e | 2013-09-06 20:01:51 | [diff] [blame] | 12 | #include "ui/gfx/range/range.h" |
[email protected] | d4cff27 | 2011-05-02 15:46:01 | [diff] [blame] | 13 | |
| 14 | #if defined(OS_MACOSX) |
[email protected] | 81fc9f0 | 2011-09-09 23:05:34 | [diff] [blame] | 15 | #include "content/common/mac/attributed_string_coder.h" |
[email protected] | d4cff27 | 2011-05-02 15:46:01 | [diff] [blame] | 16 | #endif |
| 17 | |
| 18 | #define IPC_MESSAGE_START TextInputClientMsgStart |
[email protected] | 565477e | 2012-03-16 21:31:33 | [diff] [blame] | 19 | #undef IPC_MESSAGE_EXPORT |
| 20 | #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
[email protected] | d4cff27 | 2011-05-02 15:46:01 | [diff] [blame] | 21 | |
| 22 | // Browser -> Renderer Messages //////////////////////////////////////////////// |
| 23 | // These messages are sent from the browser to the renderer. Each one has a |
| 24 | // corresponding reply message. |
| 25 | //////////////////////////////////////////////////////////////////////////////// |
| 26 | |
| 27 | // Tells the renderer to send back the character index for a point. |
| 28 | IPC_MESSAGE_ROUTED1(TextInputClientMsg_CharacterIndexForPoint, |
| 29 | gfx::Point) |
| 30 | |
| 31 | // Tells the renderer to send back the rectangle for a given character range. |
| 32 | IPC_MESSAGE_ROUTED1(TextInputClientMsg_FirstRectForCharacterRange, |
[email protected] | db4fc1e | 2013-09-06 20:01:51 | [diff] [blame] | 33 | gfx::Range) |
[email protected] | d4cff27 | 2011-05-02 15:46:01 | [diff] [blame] | 34 | |
| 35 | // Tells the renderer to send back the text fragment in a given range. |
| 36 | IPC_MESSAGE_ROUTED1(TextInputClientMsg_StringForRange, |
[email protected] | db4fc1e | 2013-09-06 20:01:51 | [diff] [blame] | 37 | gfx::Range) |
[email protected] | d4cff27 | 2011-05-02 15:46:01 | [diff] [blame] | 38 | |
[email protected] | 6623d87 | 2014-03-18 17:43:13 | [diff] [blame] | 39 | // Tells the renderer to send back the word under the given point and its |
| 40 | // baseline point. |
| 41 | IPC_MESSAGE_ROUTED1(TextInputClientMsg_StringAtPoint, gfx::Point) |
| 42 | |
[email protected] | d4cff27 | 2011-05-02 15:46:01 | [diff] [blame] | 43 | //////////////////////////////////////////////////////////////////////////////// |
| 44 | |
| 45 | // Renderer -> Browser Replies ///////////////////////////////////////////////// |
| 46 | // These messages are sent in reply to the above messages. |
| 47 | //////////////////////////////////////////////////////////////////////////////// |
| 48 | |
| 49 | // Reply message for TextInputClientMsg_CharacterIndexForPoint. |
| 50 | IPC_MESSAGE_ROUTED1(TextInputClientReplyMsg_GotCharacterIndexForPoint, |
jam | 97323610 | 2016-02-09 00:47:05 | [diff] [blame^] | 51 | uint32_t /* character index */) |
[email protected] | d4cff27 | 2011-05-02 15:46:01 | [diff] [blame] | 52 | |
| 53 | // Reply message for TextInputClientMsg_FirstRectForCharacterRange. |
| 54 | IPC_MESSAGE_ROUTED1(TextInputClientReplyMsg_GotFirstRectForRange, |
| 55 | gfx::Rect /* frame rectangle */) |
| 56 | |
| 57 | #if defined(OS_MACOSX) |
| 58 | // Reply message for TextInputClientMsg_StringForRange. |
shuchen | 3146b3a | 2015-09-22 16:08:24 | [diff] [blame] | 59 | IPC_MESSAGE_ROUTED2(TextInputClientReplyMsg_GotStringForRange, |
| 60 | mac::AttributedStringCoder::EncodedString, |
| 61 | gfx::Point) |
[email protected] | 6623d87 | 2014-03-18 17:43:13 | [diff] [blame] | 62 | |
| 63 | // Reply message for TextInputClientMsg_StringAtPoint |
| 64 | IPC_MESSAGE_ROUTED2(TextInputClientReplyMsg_GotStringAtPoint, |
| 65 | mac::AttributedStringCoder::EncodedString, |
| 66 | gfx::Point) |
[email protected] | d4cff27 | 2011-05-02 15:46:01 | [diff] [blame] | 67 | #endif // defined(OS_MACOSX) |
| 68 | |