diff options
author | fsamuel <fsamuel@chromium.org> | 2015-05-04 18:00:39 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-05 01:01:10 +0000 |
commit | 8dfa19acbffebaeafd38e8c3f4ef136c3fc83734 (patch) | |
tree | 9c62f75554ab826e9a49d0f2ee390b7d6cb2df1b /extensions/common/guest_view | |
parent | ec5b7687d06564998e7f1b96465878a391edc723 (diff) | |
download | chromium_src-8dfa19acbffebaeafd38e8c3f4ef136c3fc83734.zip chromium_src-8dfa19acbffebaeafd38e8c3f4ef136c3fc83734.tar.gz chromium_src-8dfa19acbffebaeafd38e8c3f4ef136c3fc83734.tar.bz2 |
Move GuestView layer in browser to components
In addition to moving the browser-side of the GuestView layer into components, this CL also:
1. Replaces some loops to the top level web contents with GuestViewBase::GetTopLevelWebContents.
2. Installs the ExtensionsGuestViewMessageFilter in appshell.
3. Move some files out of extensions/common/guest_view to components/guest_view/common
BUG=444869
Review URL: https://codereview.chromium.org/1102173002
Cr-Commit-Position: refs/heads/master@{#328243}
Diffstat (limited to 'extensions/common/guest_view')
-rw-r--r-- | extensions/common/guest_view/guest_view_constants.cc | 45 | ||||
-rw-r--r-- | extensions/common/guest_view/guest_view_constants.h | 50 | ||||
-rw-r--r-- | extensions/common/guest_view/guest_view_messages.h | 35 |
3 files changed, 0 insertions, 130 deletions
diff --git a/extensions/common/guest_view/guest_view_constants.cc b/extensions/common/guest_view/guest_view_constants.cc deleted file mode 100644 index f5acd35..0000000 --- a/extensions/common/guest_view/guest_view_constants.cc +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2014 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 "extensions/common/guest_view/guest_view_constants.h" - -namespace guestview { - -// Sizing attributes/parameters. -const char kAttributeAutoSize[] = "autosize"; -const char kAttributeMaxHeight[] = "maxheight"; -const char kAttributeMaxWidth[] = "maxwidth"; -const char kAttributeMinHeight[] = "minheight"; -const char kAttributeMinWidth[] = "minwidth"; -const char kElementWidth[] = "elementWidth"; -const char kElementHeight[] = "elementHeight"; -const char kElementSizeIsLogical[] = "elementSizeIsLogical"; - -// Events. -const char kEventResize[] = "guestViewInternal.onResize"; - -// Parameters/properties on events. -const char kCode[] = "code"; -const char kContentWindowID[] = "contentWindowId"; -const char kID[] = "id"; -const char kIsTopLevel[] = "isTopLevel"; -const char kNewWidth[] = "newWidth"; -const char kNewHeight[] = "newHeight"; -const char kOldWidth[] = "oldWidth"; -const char kOldHeight[] = "oldHeight"; -const char kReason[] = "reason"; -const char kUrl[] = "url"; -const char kUserGesture[] = "userGesture"; - -// Initialization parameters. -const char kParameterApi[] = "api"; -const char kParameterInstanceId[] = "instanceId"; - -// Other. -const char kGuestViewManagerKeyName[] = "guest_view_manager"; -const int kInstanceIDNone = 0; -const int kDefaultWidth = 300; -const int kDefaultHeight = 300; - -} // namespace guestview diff --git a/extensions/common/guest_view/guest_view_constants.h b/extensions/common/guest_view/guest_view_constants.h deleted file mode 100644 index 8fe8ff1..0000000 --- a/extensions/common/guest_view/guest_view_constants.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2014 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. - -// Constants used for the WebView API. - -#ifndef EXTENSIONS_COMMON_GUEST_VIEW_GUEST_VIEW_CONSTANTS_H_ -#define EXTENSIONS_COMMON_GUEST_VIEW_GUEST_VIEW_CONSTANTS_H_ - -namespace guestview { - -// Sizing attributes/parameters. -extern const char kAttributeAutoSize[]; -extern const char kAttributeMaxHeight[]; -extern const char kAttributeMaxWidth[]; -extern const char kAttributeMinHeight[]; -extern const char kAttributeMinWidth[]; -extern const char kElementWidth[]; -extern const char kElementHeight[]; -extern const char kElementSizeIsLogical[]; - -// Events. -extern const char kEventResize[]; - -// Parameters/properties on events. -extern const char kCode[]; -extern const char kContentWindowID[]; -extern const char kID[]; -extern const char kIsTopLevel[]; -extern const char kNewWidth[]; -extern const char kNewHeight[]; -extern const char kOldWidth[]; -extern const char kOldHeight[]; -extern const char kReason[]; -extern const char kUrl[]; -extern const char kUserGesture[]; - -// Initialization parameters. -extern const char kParameterApi[]; -extern const char kParameterInstanceId[]; - -// Other. -extern const char kGuestViewManagerKeyName[]; -extern const int kInstanceIDNone; -extern const int kDefaultWidth; -extern const int kDefaultHeight; - -} // namespace guestview - -#endif // EXTENSIONS_COMMON_GUEST_VIEW_GUEST_VIEW_CONSTANTS_H_ diff --git a/extensions/common/guest_view/guest_view_messages.h b/extensions/common/guest_view/guest_view_messages.h deleted file mode 100644 index 9772b6f..0000000 --- a/extensions/common/guest_view/guest_view_messages.h +++ /dev/null @@ -1,35 +0,0 @@ -// 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. - -// IPC messages for GuestViews. -// Multiply-included message file, hence no include guard. - -#include "base/values.h" -#include "ipc/ipc_message_macros.h" - -#define IPC_MESSAGE_START GuestViewMsgStart - -// Messages sent from the browser to the renderer. - -// Once a RenderView proxy has been created for the guest in the embedder render -// process, this IPC informs the embedder of the proxy's routing ID. -IPC_MESSAGE_CONTROL2(GuestViewMsg_GuestAttached, - int /* element_instance_id */, - int /* source_routing_id */) - -// This IPC tells the browser process to detach the provided -// |element_instance_id| from a GuestViewBase if it is attached to one. -// In other words, routing of input and graphics will no longer flow through -// the container associated with the provided ID. -IPC_MESSAGE_CONTROL1(GuestViewMsg_GuestDetached, - int /* element_instance_id*/) - -// Messages sent from the renderer to the browser. - -// Sent by the renderer to set initialization parameters of a Browser Plugin -// that is identified by |element_instance_id|. -IPC_MESSAGE_CONTROL3(GuestViewHostMsg_AttachGuest, - int /* element_instance_id */, - int /* guest_instance_id */, - base::DictionaryValue /* attach_params */) |