blob: c42a32aaf124eedf876ce0df838b0ddd7a183382 [file] [log] [blame]
[email protected]d4cff272011-05-02 15:46:011// 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
[email protected]304017d2011-06-17 16:49:185// Multiply-included message file, hence no include guard
[email protected]d4cff272011-05-02 15:46:016
7#include "ipc/ipc_message_macros.h"
8#include "ui/base/range/range.h"
9#include "ui/gfx/rect.h"
10
11#if defined(OS_MACOSX)
[email protected]81fc9f02011-09-09 23:05:3412#include "content/common/mac/attributed_string_coder.h"
[email protected]d4cff272011-05-02 15:46:0113#endif
14
15#define IPC_MESSAGE_START TextInputClientMsgStart
16
17// Browser -> Renderer Messages ////////////////////////////////////////////////
18// These messages are sent from the browser to the renderer. Each one has a
19// corresponding reply message.
20////////////////////////////////////////////////////////////////////////////////
21
22// Tells the renderer to send back the character index for a point.
23IPC_MESSAGE_ROUTED1(TextInputClientMsg_CharacterIndexForPoint,
24 gfx::Point)
25
26// Tells the renderer to send back the rectangle for a given character range.
27IPC_MESSAGE_ROUTED1(TextInputClientMsg_FirstRectForCharacterRange,
28 ui::Range)
29
30// Tells the renderer to send back the text fragment in a given range.
31IPC_MESSAGE_ROUTED1(TextInputClientMsg_StringForRange,
32 ui::Range)
33
34////////////////////////////////////////////////////////////////////////////////
35
36// Renderer -> Browser Replies /////////////////////////////////////////////////
37// These messages are sent in reply to the above messages.
38////////////////////////////////////////////////////////////////////////////////
39
40// Reply message for TextInputClientMsg_CharacterIndexForPoint.
41IPC_MESSAGE_ROUTED1(TextInputClientReplyMsg_GotCharacterIndexForPoint,
42 size_t /* character index */)
43
44// Reply message for TextInputClientMsg_FirstRectForCharacterRange.
45IPC_MESSAGE_ROUTED1(TextInputClientReplyMsg_GotFirstRectForRange,
46 gfx::Rect /* frame rectangle */)
47
48#if defined(OS_MACOSX)
49// Reply message for TextInputClientMsg_StringForRange.
50IPC_MESSAGE_ROUTED1(TextInputClientReplyMsg_GotStringForRange,
51 mac::AttributedStringCoder::EncodedString)
52#endif // defined(OS_MACOSX)
53