Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: content/common/view_messages.h

Issue 10905058: Upstream the Android port find-in-page feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // IPC messages for page rendering. 5 // IPC messages for page rendering.
6 // Multiply-included message file, hence no include guard. 6 // Multiply-included message file, hence no include guard.
7 7
8 #include "base/process.h" 8 #include "base/process.h"
9 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "webkit/glue/webcookie.h" 44 #include "webkit/glue/webcookie.h"
45 #include "webkit/glue/webmenuitem.h" 45 #include "webkit/glue/webmenuitem.h"
46 #include "webkit/glue/webpreferences.h" 46 #include "webkit/glue/webpreferences.h"
47 #include "webkit/plugins/npapi/webplugin.h" 47 #include "webkit/plugins/npapi/webplugin.h"
48 48
49 #if defined(OS_MACOSX) 49 #if defined(OS_MACOSX)
50 #include "content/common/mac/font_descriptor.h" 50 #include "content/common/mac/font_descriptor.h"
51 #endif 51 #endif
52 52
53 #if defined(OS_ANDROID) 53 #if defined(OS_ANDROID)
54 #include "ui/gfx/rect_f.h"
54 #include "webkit/media/android/media_metadata_android.h" 55 #include "webkit/media/android/media_metadata_android.h"
55 #endif 56 #endif
56 57
57 #undef IPC_MESSAGE_EXPORT 58 #undef IPC_MESSAGE_EXPORT
58 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 59 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
59 60
60 #define IPC_MESSAGE_START ViewMsgStart 61 #define IPC_MESSAGE_START ViewMsgStart
61 62
62 IPC_ENUM_TRAITS(AccessibilityMode) 63 IPC_ENUM_TRAITS(AccessibilityMode)
63 IPC_ENUM_TRAITS(ChannelLayout) 64 IPC_ENUM_TRAITS(ChannelLayout)
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 // guest RenderView. The embedder_channel_name and embedder_container_id 780 // guest RenderView. The embedder_channel_name and embedder_container_id
780 // together uniquely identify a browser plugin instance. 781 // together uniquely identify a browser plugin instance.
781 IPC_STRUCT_MEMBER(int, embedder_container_id) 782 IPC_STRUCT_MEMBER(int, embedder_container_id)
782 783
783 // The accessibility mode of the renderer. 784 // The accessibility mode of the renderer.
784 IPC_STRUCT_MEMBER(AccessibilityMode, accessibility_mode) 785 IPC_STRUCT_MEMBER(AccessibilityMode, accessibility_mode)
785 IPC_STRUCT_END() 786 IPC_STRUCT_END()
786 787
787 // Messages sent from the browser to the renderer. 788 // Messages sent from the browser to the renderer.
788 789
790 #if defined(OS_ANDROID)
jam 2012/09/04 16:39:09 this isn't the right order to put this message (Vi
Leandro GraciĆ” Gil 2012/09/04 18:25:50 Done.
791 // Response to ViewMsg_GetFindMatchRects.
792 //
793 // |version| will contain the current version number of the renderer's find
794 // match list (incremented whenever they change), which should be passed in the
795 // next call to ViewMsg_GetFindMatchRects.
796 //
797 // |rects| will either contain a list of the enclosing rects of all matches
798 // found by the most recent Find operation, or will be empty if |version| is not
799 // greater than the |current_version| passed to ViewMsg_GetFindMatchRects (hence
800 // your locally cached rects should still be valid). The rect coords will be
801 // custom normalized fractions of the document size. The rects will be sorted by
802 // frame traversal order starting in the main frame, then by dom order.
803 //
804 // |active_rect| will contain the bounding box of the active find-in-page match
805 // marker, in similarly normalized coords (or an empty rect if there isn't one).
806 IPC_MESSAGE_ROUTED3(ViewHostMsg_GetFindMatchRects_Reply,
807 int /* version */,
808 std::vector<gfx::RectF> /* rects */,
809 gfx::RectF /* active_rect */)
810 #endif
811
789 // Sent to the RenderView when a new tab is swapped into an existing 812 // Sent to the RenderView when a new tab is swapped into an existing
790 // tab and the histories need to be merged. The existing tab has a history of 813 // tab and the histories need to be merged. The existing tab has a history of
791 // |merged_history_length| which precedes the history of the new tab. All 814 // |merged_history_length| which precedes the history of the new tab. All
792 // page_ids >= |minimum_page_id| in the new tab are appended to the history. 815 // page_ids >= |minimum_page_id| in the new tab are appended to the history.
793 // 816 //
794 // For example, suppose the history of page_ids in the new tab's RenderView 817 // For example, suppose the history of page_ids in the new tab's RenderView
795 // is [4 7 8]. This is merged into an existing tab with 3 history items, and 818 // is [4 7 8]. This is merged into an existing tab with 3 history items, and
796 // all pages in the new tab with page_id >= 7 are to be preserved. 819 // all pages in the new tab with page_id >= 7 are to be preserved.
797 // The resulting page history is [-1 -1 -1 7 8]. 820 // The resulting page history is [-1 -1 -1 7 8].
798 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryLengthAndPrune, 821 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryLengthAndPrune,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile, 860 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile,
838 std::vector<char> /* profile */) 861 std::vector<char> /* profile */)
839 862
840 // Tells the renderer to create a new view. 863 // Tells the renderer to create a new view.
841 // This message is slightly different, the view it takes (via 864 // This message is slightly different, the view it takes (via
842 // ViewMsg_New_Params) is the view to create, the message itself is sent as a 865 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
843 // non-view control message. 866 // non-view control message.
844 IPC_MESSAGE_CONTROL1(ViewMsg_New, 867 IPC_MESSAGE_CONTROL1(ViewMsg_New,
845 ViewMsg_New_Params) 868 ViewMsg_New_Params)
846 869
870 #if defined(OS_ANDROID)
871 // Sent when the user clicks on the find result bar to activate a find result.
872 // The point (x,y) is in fractions of the content document's width and height.
873 IPC_MESSAGE_ROUTED3(ViewMsg_ActivateNearestFindResult,
874 int /* request_id */,
875 float /* x */,
876 float /* y */)
877
878 // Sent when the browser wants the bounding boxes of the current find matches.
879 //
880 // If match rects are already cached on the browser side, |current_version|
881 // should be the version number from the ViewHostMsg_GetFindMatchRects_Reply
882 // they came in, so the renderer can tell if it needs to send updated rects.
883 // Otherwise just pass -1 to always receive the list of rects.
884 //
885 // There must be an active search string (it is probably most useful to call
886 // this immediately after a ViewHostMsg_Find_Reply message arrives with
887 // final_update set to true).
888 IPC_MESSAGE_ROUTED1(ViewMsg_GetFindMatchRects,
889 int /* current_version */)
890 #endif
891
847 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget. 892 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
848 // similar to the new command, but used when the renderer created a view 893 // similar to the new command, but used when the renderer created a view
849 // first, and we need to update it. 894 // first, and we need to update it.
850 IPC_MESSAGE_ROUTED1(ViewMsg_CreatingNew_ACK, 895 IPC_MESSAGE_ROUTED1(ViewMsg_CreatingNew_ACK,
851 gfx::NativeViewId /* parent_hwnd */) 896 gfx::NativeViewId /* parent_hwnd */)
852 897
853 // Sends updated preferences to the renderer. 898 // Sends updated preferences to the renderer.
854 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs, 899 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs,
855 content::RendererPreferences) 900 content::RendererPreferences)
856 901
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
2273 // * id - (integer) the frame identifier in this RenderView 2318 // * id - (integer) the frame identifier in this RenderView
2274 // * name - (string) the name of the frame, if one has been assigned 2319 // * name - (string) the name of the frame, if one has been assigned
2275 // * subtree - an array of the same type of objects for each frame that is a 2320 // * subtree - an array of the same type of objects for each frame that is a
2276 // direct child of the current frame. This property can be omitted if 2321 // direct child of the current frame. This property can be omitted if
2277 // there are no direct child frames, so less data is transferred. 2322 // there are no direct child frames, so less data is transferred.
2278 // 2323 //
2279 // This message must be sent on any events that modify the tree structure or 2324 // This message must be sent on any events that modify the tree structure or
2280 // the names of any frames. 2325 // the names of any frames.
2281 IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameTreeUpdated, 2326 IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameTreeUpdated,
2282 std::string /* json encoded frame tree */) 2327 std::string /* json encoded frame tree */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698