blob: f66196cc6c51ae0d395dec48d2f274dfc36ed242 [file] [log] [blame]
[email protected]565477e2012-03-16 21:31:331// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]d4cff272011-05-02 15:46:012// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]304017d2011-06-17 16:49:185// Multiply-included message file, hence no include guard
[email protected]d4cff272011-05-02 15:46:016
avia9aa7a82015-12-25 03:06:317#include <stddef.h>
8
9#include "build/build_config.h"
[email protected]d4cff272011-05-02 15:46:0110#include "ipc/ipc_message_macros.h"
tfarina3b0452d2014-12-31 15:20:0911#include "ui/gfx/geometry/rect.h"
[email protected]db4fc1e2013-09-06 20:01:5112#include "ui/gfx/range/range.h"
[email protected]d4cff272011-05-02 15:46:0113
14#if defined(OS_MACOSX)
[email protected]81fc9f02011-09-09 23:05:3415#include "content/common/mac/attributed_string_coder.h"
[email protected]d4cff272011-05-02 15:46:0116#endif
17
18#define IPC_MESSAGE_START TextInputClientMsgStart
[email protected]565477e2012-03-16 21:31:3319#undef IPC_MESSAGE_EXPORT
20#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
[email protected]d4cff272011-05-02 15:46:0121
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.
28IPC_MESSAGE_ROUTED1(TextInputClientMsg_CharacterIndexForPoint,
29 gfx::Point)
30
31// Tells the renderer to send back the rectangle for a given character range.
32IPC_MESSAGE_ROUTED1(TextInputClientMsg_FirstRectForCharacterRange,
[email protected]db4fc1e2013-09-06 20:01:5133 gfx::Range)
[email protected]d4cff272011-05-02 15:46:0134
35// Tells the renderer to send back the text fragment in a given range.
36IPC_MESSAGE_ROUTED1(TextInputClientMsg_StringForRange,
[email protected]db4fc1e2013-09-06 20:01:5137 gfx::Range)
[email protected]d4cff272011-05-02 15:46:0138
[email protected]6623d872014-03-18 17:43:1339// Tells the renderer to send back the word under the given point and its
40// baseline point.
41IPC_MESSAGE_ROUTED1(TextInputClientMsg_StringAtPoint, gfx::Point)
42
[email protected]d4cff272011-05-02 15:46:0143////////////////////////////////////////////////////////////////////////////////
44
45// Renderer -> Browser Replies /////////////////////////////////////////////////
46// These messages are sent in reply to the above messages.
47////////////////////////////////////////////////////////////////////////////////
48
49// Reply message for TextInputClientMsg_CharacterIndexForPoint.
50IPC_MESSAGE_ROUTED1(TextInputClientReplyMsg_GotCharacterIndexForPoint,
jam973236102016-02-09 00:47:0551 uint32_t /* character index */)
[email protected]d4cff272011-05-02 15:46:0152
53// Reply message for TextInputClientMsg_FirstRectForCharacterRange.
54IPC_MESSAGE_ROUTED1(TextInputClientReplyMsg_GotFirstRectForRange,
55 gfx::Rect /* frame rectangle */)
56
57#if defined(OS_MACOSX)
58// Reply message for TextInputClientMsg_StringForRange.
shuchen3146b3a2015-09-22 16:08:2459IPC_MESSAGE_ROUTED2(TextInputClientReplyMsg_GotStringForRange,
60 mac::AttributedStringCoder::EncodedString,
61 gfx::Point)
[email protected]6623d872014-03-18 17:43:1362
63// Reply message for TextInputClientMsg_StringAtPoint
64IPC_MESSAGE_ROUTED2(TextInputClientReplyMsg_GotStringAtPoint,
65 mac::AttributedStringCoder::EncodedString,
66 gfx::Point)
[email protected]d4cff272011-05-02 15:46:0167#endif // defined(OS_MACOSX)
68