summaryrefslogtreecommitdiffstats
path: root/extensions/renderer/guest_view
diff options
context:
space:
mode:
authorfsamuel <fsamuel@chromium.org>2015-05-04 18:00:39 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-05 01:01:10 +0000
commit8dfa19acbffebaeafd38e8c3f4ef136c3fc83734 (patch)
tree9c62f75554ab826e9a49d0f2ee390b7d6cb2df1b /extensions/renderer/guest_view
parentec5b7687d06564998e7f1b96465878a391edc723 (diff)
downloadchromium_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/renderer/guest_view')
-rw-r--r--extensions/renderer/guest_view/extensions_guest_view_container.cc6
-rw-r--r--extensions/renderer/guest_view/guest_view_container.cc8
-rw-r--r--extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc4
-rw-r--r--extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc8
4 files changed, 13 insertions, 13 deletions
diff --git a/extensions/renderer/guest_view/extensions_guest_view_container.cc b/extensions/renderer/guest_view/extensions_guest_view_container.cc
index f453030..5b43598 100644
--- a/extensions/renderer/guest_view/extensions_guest_view_container.cc
+++ b/extensions/renderer/guest_view/extensions_guest_view_container.cc
@@ -4,10 +4,10 @@
#include "extensions/renderer/guest_view/extensions_guest_view_container.h"
+#include "components/guest_view/common/guest_view_constants.h"
+#include "components/guest_view/common/guest_view_messages.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h"
-#include "extensions/common/guest_view/guest_view_constants.h"
-#include "extensions/common/guest_view/guest_view_messages.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h"
#include "third_party/WebKit/public/web/WebView.h"
@@ -142,7 +142,7 @@ ExtensionsGuestViewContainer::ExtensionsGuestViewContainer(
}
ExtensionsGuestViewContainer::~ExtensionsGuestViewContainer() {
- if (element_instance_id() != guestview::kInstanceIDNone)
+ if (element_instance_id() != guest_view::kInstanceIDNone)
g_guest_view_container_map.Get().erase(element_instance_id());
if (pending_response_.get())
diff --git a/extensions/renderer/guest_view/guest_view_container.cc b/extensions/renderer/guest_view/guest_view_container.cc
index 787e439..8a44d5a 100644
--- a/extensions/renderer/guest_view/guest_view_container.cc
+++ b/extensions/renderer/guest_view/guest_view_container.cc
@@ -4,12 +4,12 @@
#include "extensions/renderer/guest_view/guest_view_container.h"
+#include "components/guest_view/common/guest_view_constants.h"
+#include "components/guest_view/common/guest_view_messages.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_frame_observer.h"
#include "content/public/renderer/render_view.h"
#include "extensions/common/guest_view/extensions_guest_view_messages.h"
-#include "extensions/common/guest_view/guest_view_constants.h"
-#include "extensions/common/guest_view/guest_view_messages.h"
namespace extensions {
@@ -39,7 +39,7 @@ void GuestViewContainer::RenderFrameLifetimeObserver::OnDestruct() {
}
GuestViewContainer::GuestViewContainer(content::RenderFrame* render_frame)
- : element_instance_id_(guestview::kInstanceIDNone),
+ : element_instance_id_(guest_view::kInstanceIDNone),
render_frame_(render_frame) {
render_frame_lifetime_observer_.reset(
new RenderFrameLifetimeObserver(this, render_frame_));
@@ -66,7 +66,7 @@ void GuestViewContainer::RenderFrameDestroyed() {
}
void GuestViewContainer::SetElementInstanceID(int element_instance_id) {
- DCHECK_EQ(element_instance_id_, guestview::kInstanceIDNone);
+ DCHECK_EQ(element_instance_id_, guest_view::kInstanceIDNone);
element_instance_id_ = element_instance_id;
}
diff --git a/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc b/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc
index 2310d3d..9f8d952 100644
--- a/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc
+++ b/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc
@@ -7,11 +7,11 @@
#include <string>
#include "base/bind.h"
+#include "components/guest_view/common/guest_view_constants.h"
#include "content/public/child/v8_value_converter.h"
#include "content/public/renderer/render_view.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_messages.h"
-#include "extensions/common/guest_view/guest_view_constants.h"
#include "extensions/renderer/guest_view/extensions_guest_view_container.h"
#include "extensions/renderer/script_context.h"
#include "third_party/WebKit/public/web/WebFrame.h"
@@ -87,7 +87,7 @@ void GuestViewInternalCustomBindings::AttachGuest(
// Add flag to |params| to indicate that the element size is specified in
// logical units.
- params->SetBoolean(guestview::kElementSizeIsLogical, true);
+ params->SetBoolean(guest_view::kElementSizeIsLogical, true);
linked_ptr<ExtensionsGuestViewContainer::Request> request(
new ExtensionsGuestViewContainer::AttachRequest(
diff --git a/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc b/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
index c8b6afa..67add24 100644
--- a/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
+++ b/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
@@ -7,14 +7,14 @@
#include <map>
#include <set>
+#include "components/guest_view/common/guest_view_constants.h"
+#include "components/guest_view/common/guest_view_messages.h"
#include "content/public/child/v8_value_converter.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h"
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_constants.h"
#include "extensions/common/extension_messages.h"
#include "extensions/common/guest_view/extensions_guest_view_messages.h"
-#include "extensions/common/guest_view/guest_view_constants.h"
-#include "extensions/common/guest_view/guest_view_messages.h"
#include "gin/arguments.h"
#include "gin/dictionary.h"
#include "gin/handle.h"
@@ -264,7 +264,7 @@ void MimeHandlerViewContainer::PostMessageFromValue(
void MimeHandlerViewContainer::OnCreateMimeHandlerViewGuestACK(
int element_instance_id) {
- DCHECK_NE(this->element_instance_id(), guestview::kInstanceIDNone);
+ DCHECK_NE(this->element_instance_id(), guest_view::kInstanceIDNone);
DCHECK_EQ(this->element_instance_id(), element_instance_id);
if (!render_frame())
@@ -307,7 +307,7 @@ void MimeHandlerViewContainer::CreateMimeHandlerViewGuest() {
// The loader has completed loading |view_id_| so we can dispose it.
loader_.reset();
- DCHECK_NE(element_instance_id(), guestview::kInstanceIDNone);
+ DCHECK_NE(element_instance_id(), guest_view::kInstanceIDNone);
if (!render_frame())
return;