Chromium Code Reviews| Index: content/common/view_messages.h |
| diff --git a/content/common/view_messages.h b/content/common/view_messages.h |
| index 9b8ade47245caf20bff70631d516f1fe544e6346..a81ff736af6ca2ad27f602fcd7cbe3a8e59f18d5 100644 |
| --- a/content/common/view_messages.h |
| +++ b/content/common/view_messages.h |
| @@ -51,6 +51,7 @@ |
| #endif |
| #if defined(OS_ANDROID) |
| +#include "ui/gfx/rect_f.h" |
|
joth
2012/09/04 22:43:31
(ditto)
Leandro GraciĆ” Gil
2012/09/05 00:57:09
Done.
|
| #include "webkit/media/android/media_metadata_android.h" |
| #endif |
| @@ -845,6 +846,28 @@ IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile, |
| IPC_MESSAGE_CONTROL1(ViewMsg_New, |
| ViewMsg_New_Params) |
| +#if defined(OS_ANDROID) |
| +// Sent when the user clicks on the find result bar to activate a find result. |
| +// The point (x,y) is in fractions of the content document's width and height. |
| +IPC_MESSAGE_ROUTED3(ViewMsg_ActivateNearestFindResult, |
| + int /* request_id */, |
| + float /* x */, |
| + float /* y */) |
| + |
| +// Sent when the browser wants the bounding boxes of the current find matches. |
| +// |
| +// If match rects are already cached on the browser side, |current_version| |
| +// should be the version number from the ViewHostMsg_FindMatchRects_Reply |
| +// they came in, so the renderer can tell if it needs to send updated rects. |
| +// Otherwise just pass -1 to always receive the list of rects. |
| +// |
| +// There must be an active search string (it is probably most useful to call |
| +// this immediately after a ViewHostMsg_Find_Reply message arrives with |
| +// final_update set to true). |
| +IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects, |
| + int /* current_version */) |
| +#endif |
| + |
| // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget. |
| // similar to the new command, but used when the renderer created a view |
| // first, and we need to update it. |
| @@ -2302,3 +2325,25 @@ IPC_MESSAGE_ROUTED1(ViewMsg_OrientationChangeEvent, |
| // the names of any frames. |
| IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameTreeUpdated, |
| std::string /* json encoded frame tree */) |
| + |
| +#if defined(OS_ANDROID) |
| +// Response to ViewMsg_FindMatchRects. |
| +// |
| +// |version| will contain the current version number of the renderer's find |
| +// match list (incremented whenever they change), which should be passed in the |
| +// next call to ViewMsg_FindMatchRects. |
| +// |
| +// |rects| will either contain a list of the enclosing rects of all matches |
| +// found by the most recent Find operation, or will be empty if |version| is not |
| +// greater than the |current_version| passed to ViewMsg_FindMatchRects (hence |
| +// your locally cached rects should still be valid). The rect coords will be |
| +// custom normalized fractions of the document size. The rects will be sorted by |
| +// frame traversal order starting in the main frame, then by dom order. |
| +// |
| +// |active_rect| will contain the bounding box of the active find-in-page match |
| +// marker, in similarly normalized coords (or an empty rect if there isn't one). |
| +IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply, |
| + int /* version */, |
| + std::vector<gfx::RectF> /* rects */, |
| + gfx::RectF /* active_rect */) |
| +#endif |