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_COMMON_TEXT_INPUT_CLIENT_MESSAGES_H_ |
| 6 #define CHROME_COMMON_TEXT_INPUT_CLIENT_MESSAGES_H_ |
| 7 |
| 8 #include "ipc/ipc_message_macros.h" |
| 9 #include "ui/gfx/rect.h" |
| 10 |
| 11 #define IPC_MESSAGE_START TextInputClientMsgStart |
| 12 |
| 13 // Browser -> Renderer Messages //////////////////////////////////////////////// |
| 14 // These messages are sent from the browser to the renderer. Each one has a |
| 15 // corresponding reply message. |
| 16 //////////////////////////////////////////////////////////////////////////////// |
| 17 |
| 18 // Tells the renderer to send back the character index for a point. |
| 19 IPC_MESSAGE_ROUTED1(TextInputClientMsg_CharacterIndexForPoint, |
| 20 gfx::Point) |
| 21 |
| 22 // Tells the renderer to send back the rectangle for a given character range. |
| 23 IPC_MESSAGE_ROUTED2(TextInputClientMsg_FirstRectForCharacterRange, |
| 24 uint /* location */, |
| 25 uint /* length */) |
| 26 |
| 27 // Tells the renderer to send back the text fragment in a given range. |
| 28 IPC_MESSAGE_ROUTED2(TextInputClientMsg_StringForRange, |
| 29 uint /* location */, |
| 30 uint /* length */) |
| 31 |
| 32 //////////////////////////////////////////////////////////////////////////////// |
| 33 |
| 34 // Renderer -> Browser Replies ///////////////////////////////////////////////// |
| 35 // These messages are sent in reply to the above messages. |
| 36 //////////////////////////////////////////////////////////////////////////////// |
| 37 |
| 38 // Reply message for TextInputClientMsg_CharacterIndexForPoint. |
| 39 IPC_MESSAGE_ROUTED1(TextInputClientReplyMsg_GotCharacterIndexForPoint, |
| 40 uint /* character index */) |
| 41 |
| 42 // Reply message for TextInputClientMsg_FirstRectForCharacterRange. |
| 43 IPC_MESSAGE_ROUTED1(TextInputClientReplyMsg_GotFirstRectForRange, |
| 44 gfx::Rect /* frame rectangle */) |
| 45 |
| 46 // Reply message for TextInputClientMsg_StringForRange. |
| 47 IPC_MESSAGE_ROUTED1(TextInputClientReplyMsg_GotStringForRange, |
| 48 string16 /* NSData-encoded NSAttributedString */) |
| 49 |
| 50 // Message sent when the IME text composition range changes. |
| 51 IPC_MESSAGE_ROUTED2(TextInputClientViewHostMsg_ImeCompositionRangeChanged, |
| 52 int /* range start */, |
| 53 int /* range end*/) |
| 54 |
| 55 #endif // CHROME_COMMON_TEXT_INPUT_CLIENT_MESSAGES_H_ |
OLD | NEW |