OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 #include "cc/surfaces/surface_id.h" |
| 6 #include "cc/surfaces/surface_sequence.h" |
| 7 #include "components/framelet/browser/resource_usage_reporter.h" |
| 8 #include "content/public/common/common_param_traits.h" |
| 9 #include "ipc/ipc_message_macros.h" |
| 10 #include "third_party/WebKit/public/platform/WebFocusType.h" |
| 11 #include "ui/gfx/geometry/size.h" |
| 12 #include "ui/gfx/ipc/gfx_param_traits.h" |
| 13 #include "url/gurl.h" |
| 14 |
| 15 #define IPC_MESSAGE_START ChromeGuestViewMsgStart |
| 16 |
| 17 // TODO(fsamuel): This is a hack. These ParamTraits should be defined in |
| 18 // content/public/common/common_param_traits.h |
| 19 |
| 20 #ifndef CONTENT_COMMON_CC_MESSAGES_H_ |
| 21 #define CONTENT_COMMON_CC_MESSAGES_H_ |
| 22 |
| 23 IPC_STRUCT_TRAITS_BEGIN(cc::SurfaceId) |
| 24 IPC_STRUCT_TRAITS_MEMBER(id) |
| 25 IPC_STRUCT_TRAITS_END() |
| 26 |
| 27 IPC_STRUCT_TRAITS_BEGIN(cc::SurfaceSequence) |
| 28 IPC_STRUCT_TRAITS_MEMBER(id_namespace) |
| 29 IPC_STRUCT_TRAITS_MEMBER(sequence) |
| 30 IPC_STRUCT_TRAITS_END() |
| 31 |
| 32 #endif |
| 33 |
| 34 IPC_ENUM_TRAITS_MAX_VALUE(framelet::ResourceUsageLevel, |
| 35 framelet::ResourceUsageLevel::MAX_VALUE) |
| 36 |
| 37 // TODO(fsamuel): This is a hack. This ParamTrait should be defined somewhere |
| 38 // that is accessible from both within and outside of content. |
| 39 |
| 40 IPC_MESSAGE_CONTROL1(ChromeGuestViewMsg_CreateFrameletACK, |
| 41 int /* element_instance_id*/); |
| 42 |
| 43 IPC_MESSAGE_CONTROL3(ChromeGuestViewHostMsg_CreateFramelet, |
| 44 int /* render_frame_id */, |
| 45 int /* element_instance_id */, |
| 46 base::DictionaryValue /* create_params */) |
| 47 |
| 48 IPC_MESSAGE_CONTROL2(ChromeGuestViewMsg_CreateFramelet_ACK, |
| 49 int /* element_instance_id */, |
| 50 int /* guest_instance_id */); |
| 51 |
| 52 IPC_MESSAGE_CONTROL4(ChromeGuestViewHostMsg_AttachFramelet, |
| 53 int /* render_frame_id */, |
| 54 int /* element_instance_id */, |
| 55 int /* guest_instance_id */, |
| 56 base::DictionaryValue /* attach_params */) |
| 57 |
| 58 IPC_MESSAGE_CONTROL2(ChromeGuestViewHostMsg_ResizeFramelet, |
| 59 int /* element_instance_id */, |
| 60 gfx::Size /* new_size */) |
| 61 |
| 62 IPC_MESSAGE_CONTROL3(ChromeGuestViewHostMsg_SetFocus, |
| 63 int /* element_instance_id */, |
| 64 bool /* focused */, |
| 65 blink::WebFocusType /* focus_type */) |
| 66 |
| 67 IPC_MESSAGE_CONTROL2(ChromeGuestViewHostMsg_SetContainerVisible, |
| 68 int /* element_instance_id */, |
| 69 bool /* visible */) |
| 70 |
| 71 IPC_MESSAGE_CONTROL1(ChromeGuestViewHostMsg_DestroyFramelet, |
| 72 int /* element_instance_id */) |
| 73 |
| 74 IPC_MESSAGE_CONTROL1(ChromeGuestViewMsg_DestroyFramelet_ACK, |
| 75 int /* element_instance_id */) |
| 76 |
| 77 IPC_MESSAGE_CONTROL5(ChromeGuestViewMsg_SetChildFrameSurface, |
| 78 int /* element_instance_id */, |
| 79 cc::SurfaceId /* surface_id */, |
| 80 gfx::Size /* frame_size */, |
| 81 float /* scale_factor */, |
| 82 cc::SurfaceSequence /* sequence */) |
| 83 |
| 84 IPC_MESSAGE_CONTROL2(ChromeGuestViewHostMsg_ForwardInputEvent, |
| 85 int /* element_instance_id */, |
| 86 IPC::WebInputEventPointer /* blink::WebInputEvent* */) |
| 87 |
| 88 // Request the JavaScript heap size from the guest. |
| 89 IPC_MESSAGE_CONTROL1(ChromeGuestViewMsg_RequestHeapSize, int /* routing_id */) |
| 90 |
| 91 // The guest returns the heap size to the browser process. |
| 92 IPC_MESSAGE_CONTROL2(ChromeGuestViewHostMsg_HeapSize, |
| 93 int /* routing_id */, |
| 94 int /* heap_size */) |
| 95 |
| 96 // The browser reports the guest's memory usage to the embedder. |
| 97 IPC_MESSAGE_CONTROL2(ChromeGuestViewMsg_ReportMemoryUsage, |
| 98 int /* element_instance_id */, |
| 99 framelet::ResourceUsageLevel /* memory_usage */) |
OLD | NEW |