| Index: components/framelet/common/framelet_messages.h
|
| diff --git a/components/framelet/common/framelet_messages.h b/components/framelet/common/framelet_messages.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..415975beca917e73f67471882a4a49c2125314d6
|
| --- /dev/null
|
| +++ b/components/framelet/common/framelet_messages.h
|
| @@ -0,0 +1,99 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "cc/surfaces/surface_id.h"
|
| +#include "cc/surfaces/surface_sequence.h"
|
| +#include "components/framelet/browser/resource_usage_reporter.h"
|
| +#include "content/public/common/common_param_traits.h"
|
| +#include "ipc/ipc_message_macros.h"
|
| +#include "third_party/WebKit/public/platform/WebFocusType.h"
|
| +#include "ui/gfx/geometry/size.h"
|
| +#include "ui/gfx/ipc/gfx_param_traits.h"
|
| +#include "url/gurl.h"
|
| +
|
| +#define IPC_MESSAGE_START ChromeGuestViewMsgStart
|
| +
|
| +// TODO(fsamuel): This is a hack. These ParamTraits should be defined in
|
| +// content/public/common/common_param_traits.h
|
| +
|
| +#ifndef CONTENT_COMMON_CC_MESSAGES_H_
|
| +#define CONTENT_COMMON_CC_MESSAGES_H_
|
| +
|
| +IPC_STRUCT_TRAITS_BEGIN(cc::SurfaceId)
|
| + IPC_STRUCT_TRAITS_MEMBER(id)
|
| +IPC_STRUCT_TRAITS_END()
|
| +
|
| +IPC_STRUCT_TRAITS_BEGIN(cc::SurfaceSequence)
|
| + IPC_STRUCT_TRAITS_MEMBER(id_namespace)
|
| + IPC_STRUCT_TRAITS_MEMBER(sequence)
|
| +IPC_STRUCT_TRAITS_END()
|
| +
|
| +#endif
|
| +
|
| +IPC_ENUM_TRAITS_MAX_VALUE(framelet::ResourceUsageLevel,
|
| + framelet::ResourceUsageLevel::MAX_VALUE)
|
| +
|
| +// TODO(fsamuel): This is a hack. This ParamTrait should be defined somewhere
|
| +// that is accessible from both within and outside of content.
|
| +
|
| +IPC_MESSAGE_CONTROL1(ChromeGuestViewMsg_CreateFrameletACK,
|
| + int /* element_instance_id*/);
|
| +
|
| +IPC_MESSAGE_CONTROL3(ChromeGuestViewHostMsg_CreateFramelet,
|
| + int /* render_frame_id */,
|
| + int /* element_instance_id */,
|
| + base::DictionaryValue /* create_params */)
|
| +
|
| +IPC_MESSAGE_CONTROL2(ChromeGuestViewMsg_CreateFramelet_ACK,
|
| + int /* element_instance_id */,
|
| + int /* guest_instance_id */);
|
| +
|
| +IPC_MESSAGE_CONTROL4(ChromeGuestViewHostMsg_AttachFramelet,
|
| + int /* render_frame_id */,
|
| + int /* element_instance_id */,
|
| + int /* guest_instance_id */,
|
| + base::DictionaryValue /* attach_params */)
|
| +
|
| +IPC_MESSAGE_CONTROL2(ChromeGuestViewHostMsg_ResizeFramelet,
|
| + int /* element_instance_id */,
|
| + gfx::Size /* new_size */)
|
| +
|
| +IPC_MESSAGE_CONTROL3(ChromeGuestViewHostMsg_SetFocus,
|
| + int /* element_instance_id */,
|
| + bool /* focused */,
|
| + blink::WebFocusType /* focus_type */)
|
| +
|
| +IPC_MESSAGE_CONTROL2(ChromeGuestViewHostMsg_SetContainerVisible,
|
| + int /* element_instance_id */,
|
| + bool /* visible */)
|
| +
|
| +IPC_MESSAGE_CONTROL1(ChromeGuestViewHostMsg_DestroyFramelet,
|
| + int /* element_instance_id */)
|
| +
|
| +IPC_MESSAGE_CONTROL1(ChromeGuestViewMsg_DestroyFramelet_ACK,
|
| + int /* element_instance_id */)
|
| +
|
| +IPC_MESSAGE_CONTROL5(ChromeGuestViewMsg_SetChildFrameSurface,
|
| + int /* element_instance_id */,
|
| + cc::SurfaceId /* surface_id */,
|
| + gfx::Size /* frame_size */,
|
| + float /* scale_factor */,
|
| + cc::SurfaceSequence /* sequence */)
|
| +
|
| +IPC_MESSAGE_CONTROL2(ChromeGuestViewHostMsg_ForwardInputEvent,
|
| + int /* element_instance_id */,
|
| + IPC::WebInputEventPointer /* blink::WebInputEvent* */)
|
| +
|
| +// Request the JavaScript heap size from the guest.
|
| +IPC_MESSAGE_CONTROL1(ChromeGuestViewMsg_RequestHeapSize, int /* routing_id */)
|
| +
|
| +// The guest returns the heap size to the browser process.
|
| +IPC_MESSAGE_CONTROL2(ChromeGuestViewHostMsg_HeapSize,
|
| + int /* routing_id */,
|
| + int /* heap_size */)
|
| +
|
| +// The browser reports the guest's memory usage to the embedder.
|
| +IPC_MESSAGE_CONTROL2(ChromeGuestViewMsg_ReportMemoryUsage,
|
| + int /* element_instance_id */,
|
| + framelet::ResourceUsageLevel /* memory_usage */)
|
|
|