summaryrefslogtreecommitdiff
path: root/chromium/components/guest_view
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-12-10 16:19:40 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-12-10 16:01:50 +0000
commit51f6c2793adab2d864b3d2b360000ef8db1d3e92 (patch)
tree835b3b4446b012c75e80177cef9fbe6972cc7dbe /chromium/components/guest_view
parent6036726eb981b6c4b42047513b9d3f4ac865daac (diff)
downloadqtwebengine-chromium-51f6c2793adab2d864b3d2b360000ef8db1d3e92.tar.gz
BASELINE: Update Chromium to 71.0.3578.93
Change-Id: I6a32086c33670e1b033f8b10e6bf1fd4da1d105d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/components/guest_view')
-rw-r--r--chromium/components/guest_view/browser/guest_view_base.cc15
-rw-r--r--chromium/components/guest_view/browser/guest_view_base.h3
-rw-r--r--chromium/components/guest_view/browser/guest_view_message_filter.cc16
-rw-r--r--chromium/components/guest_view/browser/guest_view_message_filter.h7
-rw-r--r--chromium/components/guest_view/renderer/guest_view_container_dispatcher.h2
5 files changed, 33 insertions, 10 deletions
diff --git a/chromium/components/guest_view/browser/guest_view_base.cc b/chromium/components/guest_view/browser/guest_view_base.cc
index e14d9ed9919..2c02354ef31 100644
--- a/chromium/components/guest_view/browser/guest_view_base.cc
+++ b/chromium/components/guest_view/browser/guest_view_base.cc
@@ -16,6 +16,7 @@
#include "components/guest_view/common/guest_view_messages.h"
#include "components/zoom/page_zoom.h"
#include "components/zoom/zoom_controller.h"
+#include "content/public/browser/file_select_listener.h"
#include "content/public/browser/guest_mode.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_frame_host.h"
@@ -667,13 +668,17 @@ void GuestViewBase::ResizeDueToAutoResize(WebContents* web_contents,
UpdateGuestSize(new_size, auto_size_enabled_);
}
-void GuestViewBase::RunFileChooser(content::RenderFrameHost* render_frame_host,
- const content::FileChooserParams& params) {
- if (!attached() || !embedder_web_contents()->GetDelegate())
+void GuestViewBase::RunFileChooser(
+ content::RenderFrameHost* render_frame_host,
+ std::unique_ptr<content::FileSelectListener> listener,
+ const blink::mojom::FileChooserParams& params) {
+ if (!attached() || !embedder_web_contents()->GetDelegate()) {
+ listener->FileSelectionCanceled();
return;
+ }
- embedder_web_contents()->GetDelegate()->RunFileChooser(render_frame_host,
- params);
+ embedder_web_contents()->GetDelegate()->RunFileChooser(
+ render_frame_host, std::move(listener), params);
}
bool GuestViewBase::ShouldFocusPageAfterCrash() {
diff --git a/chromium/components/guest_view/browser/guest_view_base.h b/chromium/components/guest_view/browser/guest_view_base.h
index 4e73608ba87..0fb2510219d 100644
--- a/chromium/components/guest_view/browser/guest_view_base.h
+++ b/chromium/components/guest_view/browser/guest_view_base.h
@@ -357,7 +357,8 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
void ResizeDueToAutoResize(content::WebContents* web_contents,
const gfx::Size& new_size) final;
void RunFileChooser(content::RenderFrameHost* render_frame_host,
- const content::FileChooserParams& params) final;
+ std::unique_ptr<content::FileSelectListener> listener,
+ const blink::mojom::FileChooserParams& params) final;
bool ShouldFocusPageAfterCrash() final;
void UpdatePreferredSize(content::WebContents* web_contents,
const gfx::Size& pref_size) final;
diff --git a/chromium/components/guest_view/browser/guest_view_message_filter.cc b/chromium/components/guest_view/browser/guest_view_message_filter.cc
index e7a6bf97b6f..7f80a470023 100644
--- a/chromium/components/guest_view/browser/guest_view_message_filter.cc
+++ b/chromium/components/guest_view/browser/guest_view_message_filter.cc
@@ -124,11 +124,12 @@ void GuestViewMessageFilter::OnAttachGuest(
params);
}
-void GuestViewMessageFilter::OnAttachToEmbedderFrame(
+void GuestViewMessageFilter::AttachToEmbedderFrame(
int embedder_local_render_frame_id,
int element_instance_id,
int guest_instance_id,
- const base::DictionaryValue& params) {
+ const base::DictionaryValue& params,
+ bool is_full_page_plugin) {
// We should have a GuestViewManager at this point. If we don't then the
// embedder is misbehaving.
auto* manager = GetGuestViewManagerOrKill();
@@ -181,10 +182,19 @@ void GuestViewMessageFilter::OnAttachToEmbedderFrame(
element_instance_id);
guest->WillAttach(
- embedder_web_contents, element_instance_id, false,
+ embedder_web_contents, element_instance_id, is_full_page_plugin,
std::move(perform_attach),
base::Bind(&GuestViewBase::DidAttach,
guest->weak_ptr_factory_.GetWeakPtr(), MSG_ROUTING_NONE));
}
+void GuestViewMessageFilter::OnAttachToEmbedderFrame(
+ int embedder_local_render_frame_id,
+ int element_instance_id,
+ int guest_instance_id,
+ const base::DictionaryValue& params) {
+ AttachToEmbedderFrame(embedder_local_render_frame_id, element_instance_id,
+ guest_instance_id, params,
+ false /* is_full_page_plugin */);
+}
} // namespace guest_view
diff --git a/chromium/components/guest_view/browser/guest_view_message_filter.h b/chromium/components/guest_view/browser/guest_view_message_filter.h
index 2a6dd8ffbaf..258f1e25408 100644
--- a/chromium/components/guest_view/browser/guest_view_message_filter.h
+++ b/chromium/components/guest_view/browser/guest_view_message_filter.h
@@ -66,6 +66,13 @@ class GuestViewMessageFilter : public content::BrowserMessageFilter {
// Weak pointers produced by this factory are bound to the IO thread.
base::WeakPtrFactory<GuestViewMessageFilter> weak_ptr_factory_;
+ protected:
+ void AttachToEmbedderFrame(int embedder_local_render_frame_id,
+ int element_instance_id,
+ int guest_instance_id,
+ const base::DictionaryValue& params,
+ bool is_full_page_plugin);
+
private:
friend class content::BrowserThread;
friend class base::DeleteHelper<GuestViewMessageFilter>;
diff --git a/chromium/components/guest_view/renderer/guest_view_container_dispatcher.h b/chromium/components/guest_view/renderer/guest_view_container_dispatcher.h
index 4c19da141fb..f3ed251dfe8 100644
--- a/chromium/components/guest_view/renderer/guest_view_container_dispatcher.h
+++ b/chromium/components/guest_view/renderer/guest_view_container_dispatcher.h
@@ -21,10 +21,10 @@ class GuestViewContainerDispatcher : public content::RenderThreadObserver {
// Returns true if |message| is handled for a GuestViewContainer.
virtual bool HandlesMessage(const IPC::Message& message);
- private:
// content::RenderThreadObserver implementation.
bool OnControlMessageReceived(const IPC::Message& message) override;
+ private:
DISALLOW_COPY_AND_ASSIGN(GuestViewContainerDispatcher);
};