Remove several references to BrowserPlugin from content
Since BrowserPlugin has been removed, references to BrowserPlugin are now either dead code or misnomers due to also being used in the OOPIF based guest view implementation. To help reduce confusion, we remove noticeably dead code from BrowserPlugin related classes in content, remove BrowserPlugin related delegates or delegate methods no longer used by content, and move delegate methods still called by code outside content to the derived guest view classes. Bug: 533069 Change-Id: I049ba6595fe86a44078051a12d341ee5b99a8c23 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2401031 Commit-Queue: Kevin McNee <mcnee@chromium.org> Reviewed-by: James MacLean <wjmaclean@chromium.org> Reviewed-by: Sean Topping <seantopping@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org> Cr-Commit-Position: refs/heads/master@{#810711}
This commit is contained in:
WATCHLISTS
chrome/renderer
chromecast/renderer
components/guest_view
browser
common
renderer
content
browser
browser_plugin
find_request_manager.ccrenderer_host
render_frame_host_delegate.ccrender_frame_host_delegate.hrender_widget_host_impl.ccrender_widget_host_view_aura.hrender_widget_host_view_child_frame.cc
speech
web_contents
common
public
browser
browser_plugin_guest_delegate.ccbrowser_plugin_guest_delegate.hbrowser_plugin_guest_manager.ccbrowser_plugin_guest_manager.hguest_host.h
renderer
BUILD.gnbrowser_plugin_delegate.ccbrowser_plugin_delegate.hcontent_renderer_client.cccontent_renderer_client.h
test
renderer
extensions
browser
api
guest_view
guest_view
renderer
guest_view
mime_handler_view
shell
@ -1076,7 +1076,6 @@
|
||||
'chrome/renderer/resources/extensions/web_view|'\
|
||||
'components/guest_view|'\
|
||||
'content/browser/browser_plugin|'\
|
||||
'content/renderer/browser_plugin|'\
|
||||
'extensions/browser/api/guest_view|'\
|
||||
'extensions/browser/guest_view|'\
|
||||
'extensions/common/guest_view|'\
|
||||
|
@ -1445,20 +1445,6 @@ bool ChromeContentRendererClient::IsPluginAllowedToUseCameraDeviceAPI(
|
||||
return false;
|
||||
}
|
||||
|
||||
content::BrowserPluginDelegate*
|
||||
ChromeContentRendererClient::CreateBrowserPluginDelegate(
|
||||
content::RenderFrame* render_frame,
|
||||
const content::WebPluginInfo& info,
|
||||
const std::string& mime_type,
|
||||
const GURL& original_url) {
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
return ChromeExtensionsRendererClient::CreateBrowserPluginDelegate(
|
||||
render_frame, info, mime_type, original_url);
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
void ChromeContentRendererClient::RunScriptsAtDocumentStart(
|
||||
content::RenderFrame* render_frame) {
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
|
@ -62,7 +62,6 @@ class WebRtcLoggingAgentImpl;
|
||||
} // namespace chrome
|
||||
|
||||
namespace content {
|
||||
class BrowserPluginDelegate;
|
||||
struct WebPluginInfo;
|
||||
} // namespace content
|
||||
|
||||
@ -159,11 +158,6 @@ class ChromeContentRendererClient
|
||||
override;
|
||||
bool IsKeySystemsUpdateNeeded() override;
|
||||
bool IsPluginAllowedToUseCameraDeviceAPI(const GURL& url) override;
|
||||
content::BrowserPluginDelegate* CreateBrowserPluginDelegate(
|
||||
content::RenderFrame* render_frame,
|
||||
const content::WebPluginInfo& info,
|
||||
const std::string& mime_type,
|
||||
const GURL& original_url) override;
|
||||
void RunScriptsAtDocumentStart(content::RenderFrame* render_frame) override;
|
||||
void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame) override;
|
||||
void RunScriptsAtDocumentIdle(content::RenderFrame* render_frame) override;
|
||||
|
@ -332,7 +332,7 @@ ChromeExtensionsRendererClient::GetExtensionDispatcherForTest() {
|
||||
}
|
||||
|
||||
// static
|
||||
content::BrowserPluginDelegate*
|
||||
guest_view::GuestViewContainer*
|
||||
ChromeExtensionsRendererClient::CreateBrowserPluginDelegate(
|
||||
content::RenderFrame* render_frame,
|
||||
const content::WebPluginInfo& info,
|
||||
|
@ -24,11 +24,14 @@ class WebURL;
|
||||
}
|
||||
|
||||
namespace content {
|
||||
class BrowserPluginDelegate;
|
||||
class RenderFrame;
|
||||
struct WebPluginInfo;
|
||||
}
|
||||
|
||||
namespace guest_view {
|
||||
class GuestViewContainer;
|
||||
}
|
||||
|
||||
namespace extensions {
|
||||
class Dispatcher;
|
||||
class ExtensionsGuestViewContainerDispatcher;
|
||||
@ -97,11 +100,13 @@ class ChromeExtensionsRendererClient
|
||||
std::unique_ptr<extensions::Dispatcher> extension_dispatcher);
|
||||
extensions::Dispatcher* GetExtensionDispatcherForTest();
|
||||
|
||||
static content::BrowserPluginDelegate* CreateBrowserPluginDelegate(
|
||||
// TODO(533069): Remove since BrowserPlugin has been removed.
|
||||
static guest_view::GuestViewContainer* CreateBrowserPluginDelegate(
|
||||
content::RenderFrame* render_frame,
|
||||
const content::WebPluginInfo& info,
|
||||
const std::string& mime_type,
|
||||
const GURL& original_url);
|
||||
|
||||
static void DidBlockMimeHandlerViewForDisallowedPlugin(
|
||||
const blink::WebElement& plugin_element);
|
||||
static bool MaybeCreateMimeHandlerView(
|
||||
|
@ -59,7 +59,6 @@
|
||||
#include "extensions/common/extension_urls.h" // nogncheck
|
||||
#include "extensions/renderer/dispatcher.h" // nogncheck
|
||||
#include "extensions/renderer/extension_frame_helper.h" // nogncheck
|
||||
#include "extensions/renderer/guest_view/extensions_guest_view_container.h" // nogncheck
|
||||
#include "extensions/renderer/guest_view/extensions_guest_view_container_dispatcher.h" // nogncheck
|
||||
#endif
|
||||
|
||||
@ -222,20 +221,6 @@ void CastContentRendererClient::RenderFrameCreated(
|
||||
render_frame->GetRoutingID())));
|
||||
}
|
||||
|
||||
content::BrowserPluginDelegate*
|
||||
CastContentRendererClient::CreateBrowserPluginDelegate(
|
||||
content::RenderFrame* render_frame,
|
||||
const content::WebPluginInfo& info,
|
||||
const std::string& mime_type,
|
||||
const GURL& original_url) {
|
||||
#if BUILDFLAG(ENABLE_CHROMECAST_EXTENSIONS)
|
||||
if (mime_type == content::kBrowserPluginMimeType) {
|
||||
return new extensions::ExtensionsGuestViewContainer(render_frame);
|
||||
}
|
||||
#endif
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CastContentRendererClient::RunScriptsAtDocumentStart(
|
||||
content::RenderFrame* render_frame) {
|
||||
#if BUILDFLAG(ENABLE_CHROMECAST_EXTENSIONS)
|
||||
|
@ -55,11 +55,6 @@ class CastContentRendererClient
|
||||
void RenderThreadStarted() override;
|
||||
void RenderViewCreated(content::RenderView* render_view) override;
|
||||
void RenderFrameCreated(content::RenderFrame* render_frame) override;
|
||||
content::BrowserPluginDelegate* CreateBrowserPluginDelegate(
|
||||
content::RenderFrame* render_frame,
|
||||
const content::WebPluginInfo& info,
|
||||
const std::string& mime_type,
|
||||
const GURL& original_url) override;
|
||||
void RunScriptsAtDocumentStart(content::RenderFrame* render_frame) override;
|
||||
void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame) override;
|
||||
void AddSupportedKeySystems(
|
||||
|
@ -177,8 +177,7 @@ GuestViewBase::GuestViewBase(WebContents* owner_web_contents)
|
||||
is_being_destroyed_(false),
|
||||
guest_host_(nullptr),
|
||||
auto_size_enabled_(false),
|
||||
is_full_page_plugin_(false),
|
||||
guest_proxy_routing_id_(MSG_ROUTING_NONE) {
|
||||
is_full_page_plugin_(false) {
|
||||
SetOwnerHost();
|
||||
}
|
||||
|
||||
@ -246,14 +245,6 @@ void GuestViewBase::InitWithWebContents(
|
||||
DidInitialize(create_params);
|
||||
}
|
||||
|
||||
void GuestViewBase::LoadURLWithParams(
|
||||
const content::NavigationController::LoadURLParams& load_params) {
|
||||
int guest_proxy_routing_id = host()->LoadURLWithParams(load_params);
|
||||
DCHECK(guest_proxy_routing_id_ == MSG_ROUTING_NONE ||
|
||||
guest_proxy_routing_id == guest_proxy_routing_id_);
|
||||
guest_proxy_routing_id_ = guest_proxy_routing_id;
|
||||
}
|
||||
|
||||
void GuestViewBase::DispatchOnResizeEvent(const gfx::Size& old_size,
|
||||
const gfx::Size& new_size) {
|
||||
if (new_size == old_size)
|
||||
@ -408,10 +399,6 @@ void GuestViewBase::DidAttach(int guest_proxy_routing_id) {
|
||||
// Clear this flag here, as functions called below may check attached().
|
||||
attach_in_progress_ = false;
|
||||
|
||||
DCHECK(guest_proxy_routing_id_ == MSG_ROUTING_NONE ||
|
||||
guest_proxy_routing_id == guest_proxy_routing_id_);
|
||||
guest_proxy_routing_id_ = guest_proxy_routing_id;
|
||||
|
||||
opener_lifetime_observer_.reset();
|
||||
|
||||
SetUpSizing(*attach_params());
|
||||
@ -936,4 +923,8 @@ void GuestViewBase::SetOwnerHost() {
|
||||
: std::string();
|
||||
}
|
||||
|
||||
bool GuestViewBase::CanBeEmbeddedInsideCrossProcessFrames() {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace guest_view
|
||||
|
@ -145,10 +145,6 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
|
||||
return owner_web_contents_;
|
||||
}
|
||||
|
||||
content::GuestHost* host() const {
|
||||
return guest_host_;
|
||||
}
|
||||
|
||||
// Returns the parameters associated with the element hosting this GuestView
|
||||
// passed in from JavaScript.
|
||||
base::DictionaryValue* attach_params() const { return attach_params_.get(); }
|
||||
@ -192,10 +188,6 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
|
||||
// Whether the guest view is inside a plugin document.
|
||||
bool is_full_page_plugin() const { return is_full_page_plugin_; }
|
||||
|
||||
// Returns the routing ID of the guest proxy in the owner's renderer process.
|
||||
// This value is only valid after attachment or first navigation.
|
||||
int proxy_routing_id() const { return guest_proxy_routing_id_; }
|
||||
|
||||
// Destroy this guest.
|
||||
void Destroy(bool also_delete);
|
||||
|
||||
@ -208,9 +200,11 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
|
||||
void SetAttachParams(const base::DictionaryValue& params);
|
||||
void SetOpener(GuestViewBase* opener);
|
||||
|
||||
// BrowserPluginGuestDelegate implementation.
|
||||
content::RenderWidgetHost* GetOwnerRenderWidgetHost() override;
|
||||
content::SiteInstance* GetOwnerSiteInstance() override;
|
||||
// Returns the RenderWidgetHost corresponding to the owner frame.
|
||||
virtual content::RenderWidgetHost* GetOwnerRenderWidgetHost();
|
||||
|
||||
// The SiteInstance of the owner frame.
|
||||
virtual content::SiteInstance* GetOwnerSiteInstance();
|
||||
|
||||
// Starts the attaching process for a (frame-based) GuestView.
|
||||
// |embedder_frame| is a frame in the embedder WebContents (owned by a
|
||||
@ -220,6 +214,10 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
|
||||
int32_t element_instance_id,
|
||||
bool is_full_page_plugin);
|
||||
|
||||
// Returns true if the corresponding guest is allowed to be embedded inside an
|
||||
// <iframe> which is cross process.
|
||||
virtual bool CanBeEmbeddedInsideCrossProcessFrames();
|
||||
|
||||
protected:
|
||||
explicit GuestViewBase(content::WebContents* owner_web_contents);
|
||||
|
||||
@ -319,9 +317,6 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
|
||||
// to destruction.
|
||||
virtual void WillDestroy() {}
|
||||
|
||||
void LoadURLWithParams(
|
||||
const content::NavigationController::LoadURLParams& load_params);
|
||||
|
||||
// Convert sizes in pixels from logical to physical numbers of pixels.
|
||||
// Note that a size can consist of a fractional number of logical pixels
|
||||
// (hence |logical_pixels| is represented as a double), but will always
|
||||
@ -342,17 +337,19 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
|
||||
class OwnerContentsObserver;
|
||||
class OpenerLifetimeObserver;
|
||||
|
||||
// BrowserPluginGuestDelegate implementation.
|
||||
content::WebContents* CreateNewGuestWindow(
|
||||
const content::WebContents::CreateParams& create_params) final;
|
||||
void DidAttach(int guest_proxy_routing_id) final;
|
||||
void DidDetach() final;
|
||||
content::WebContents* GetOwnerWebContents() final;
|
||||
void SetGuestHost(content::GuestHost* guest_host) final;
|
||||
// TODO(533069): Remove since BrowserPlugin has been removed.
|
||||
void DidAttach(int guest_proxy_routing_id);
|
||||
void DidDetach();
|
||||
void WillAttach(content::WebContents* embedder_web_contents,
|
||||
int browser_plugin_instance_id,
|
||||
bool is_full_page_plugin,
|
||||
base::OnceClosure completion_callback) final;
|
||||
base::OnceClosure completion_callback);
|
||||
|
||||
// BrowserPluginGuestDelegate implementation.
|
||||
content::WebContents* CreateNewGuestWindow(
|
||||
const content::WebContents::CreateParams& create_params) final;
|
||||
content::WebContents* GetOwnerWebContents() final;
|
||||
void SetGuestHost(content::GuestHost* guest_host) final;
|
||||
|
||||
// WebContentsDelegate implementation.
|
||||
void ActivateContents(content::WebContents* contents) final;
|
||||
@ -497,9 +494,6 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
|
||||
// Whether the guest view is inside a plugin document.
|
||||
bool is_full_page_plugin_;
|
||||
|
||||
// The routing ID of the proxy to the guest in the owner's renderer process.
|
||||
int guest_proxy_routing_id_;
|
||||
|
||||
// This is used to ensure pending tasks will not fire after this object is
|
||||
// destroyed.
|
||||
base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_{this};
|
||||
|
@ -121,10 +121,10 @@ class GuestViewManager : public content::BrowserPluginGuestManager,
|
||||
content::SiteInstance* GetGuestSiteInstance(
|
||||
const GURL& guest_site);
|
||||
|
||||
content::WebContents* GetGuestByInstanceID(int owner_process_id,
|
||||
int element_instance_id);
|
||||
|
||||
// BrowserPluginGuestManager implementation.
|
||||
content::WebContents* GetGuestByInstanceID(
|
||||
int owner_process_id,
|
||||
int element_instance_id) override;
|
||||
bool ForEachGuest(content::WebContents* owner_web_contents,
|
||||
const GuestCallback& callback) override;
|
||||
content::WebContents* GetFullPageGuest(
|
||||
|
@ -21,7 +21,6 @@ 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";
|
||||
|
@ -24,7 +24,6 @@ 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[];
|
||||
|
@ -186,7 +186,7 @@ void GuestViewContainer::RunDestructionCallback(bool embedder_frame_destroyed) {
|
||||
}
|
||||
|
||||
void GuestViewContainer::OnHandleCallback(const IPC::Message& message) {
|
||||
base::WeakPtr<content::BrowserPluginDelegate> weak_ptr(GetWeakPtr());
|
||||
base::WeakPtr<GuestViewContainer> weak_ptr(weak_ptr_factory_.GetWeakPtr());
|
||||
|
||||
// Handle the callback for the current request with a pending response.
|
||||
HandlePendingResponseCallback(message);
|
||||
@ -274,8 +274,4 @@ void GuestViewContainer::CallElementResizeCallback(
|
||||
.FromMaybe(v8::Local<v8::Value>());
|
||||
}
|
||||
|
||||
base::WeakPtr<content::BrowserPluginDelegate> GuestViewContainer::GetWeakPtr() {
|
||||
return weak_ptr_factory_.GetWeakPtr();
|
||||
}
|
||||
|
||||
} // namespace guest_view
|
||||
|
@ -9,10 +9,13 @@
|
||||
|
||||
#include "base/containers/circular_deque.h"
|
||||
#include "base/macros.h"
|
||||
#include "content/public/renderer/browser_plugin_delegate.h"
|
||||
#include "ipc/ipc_message.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
namespace gfx {
|
||||
class Size;
|
||||
}
|
||||
|
||||
namespace content {
|
||||
class RenderFrame;
|
||||
}
|
||||
@ -21,7 +24,7 @@ namespace guest_view {
|
||||
|
||||
class GuestViewRequest;
|
||||
|
||||
class GuestViewContainer : public content::BrowserPluginDelegate {
|
||||
class GuestViewContainer {
|
||||
public:
|
||||
explicit GuestViewContainer(content::RenderFrame* render_frame);
|
||||
|
||||
@ -64,13 +67,13 @@ class GuestViewContainer : public content::BrowserPluginDelegate {
|
||||
// Note that this should be called exactly once.
|
||||
virtual void OnDestroy(bool embedder_frame_destroyed) {}
|
||||
|
||||
// BrowserPluginGuestDelegate public implementation.
|
||||
void SetElementInstanceID(int element_instance_id) final;
|
||||
void DidResizeElement(const gfx::Size& new_size) override;
|
||||
base::WeakPtr<BrowserPluginDelegate> GetWeakPtr() final;
|
||||
void SetElementInstanceID(int element_instance_id);
|
||||
|
||||
// TODO(533069): Remove since BrowserPlugin has been removed.
|
||||
void DidResizeElement(const gfx::Size& new_size);
|
||||
|
||||
protected:
|
||||
~GuestViewContainer() override;
|
||||
virtual ~GuestViewContainer();
|
||||
|
||||
bool ready_;
|
||||
|
||||
@ -88,9 +91,9 @@ class GuestViewContainer : public content::BrowserPluginDelegate {
|
||||
void RunDestructionCallback(bool embedder_frame_destroyed);
|
||||
void CallElementResizeCallback(const gfx::Size& new_size);
|
||||
|
||||
// BrowserPluginDelegate implementation.
|
||||
void Ready() final;
|
||||
void DidDestroyElement() final;
|
||||
// TODO(533069): Remove since BrowserPlugin has been removed.
|
||||
void Ready();
|
||||
void DidDestroyElement();
|
||||
|
||||
int element_instance_id_;
|
||||
content::RenderFrame* render_frame_;
|
||||
|
@ -84,8 +84,6 @@ class CONTENT_EXPORT BrowserPluginEmbedder {
|
||||
|
||||
void ClearGuestDragStateIfApplicable();
|
||||
|
||||
static bool DidSendScreenRectsCallback(WebContents* guest_web_contents);
|
||||
|
||||
// Closes modal dialogs in |guest_web_contents|.
|
||||
static bool CancelDialogs(WebContents* guest_web_contents);
|
||||
|
||||
@ -111,8 +109,6 @@ class CONTENT_EXPORT BrowserPluginEmbedder {
|
||||
// Keeps track of "dragend" state.
|
||||
bool guest_drag_ending_;
|
||||
|
||||
base::WeakPtrFactory<BrowserPluginEmbedder> weak_ptr_factory_{this};
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder);
|
||||
};
|
||||
|
||||
|
@ -34,8 +34,6 @@ BrowserPluginGuest::BrowserPluginGuest(WebContentsImpl* web_contents,
|
||||
BrowserPluginGuestDelegate* delegate)
|
||||
: WebContentsObserver(web_contents),
|
||||
owner_web_contents_(nullptr),
|
||||
attached_(false),
|
||||
focused_(false),
|
||||
initialized_(false),
|
||||
last_drag_status_(blink::kWebDragStatusUnknown),
|
||||
seen_embedder_system_drag_ended_(false),
|
||||
@ -46,17 +44,10 @@ BrowserPluginGuest::BrowserPluginGuest(WebContentsImpl* web_contents,
|
||||
RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.Create"));
|
||||
}
|
||||
|
||||
int BrowserPluginGuest::LoadURLWithParams(
|
||||
const NavigationController::LoadURLParams& load_params) {
|
||||
GetWebContents()->GetController().LoadURLWithParams(load_params);
|
||||
return MSG_ROUTING_NONE;
|
||||
}
|
||||
|
||||
void BrowserPluginGuest::WillDestroy() {
|
||||
// It is important that the WebContents is notified before detaching.
|
||||
GetWebContents()->BrowserPluginGuestWillDetach();
|
||||
|
||||
attached_ = false;
|
||||
owner_web_contents_ = nullptr;
|
||||
}
|
||||
|
||||
@ -80,7 +71,6 @@ void BrowserPluginGuest::SetFocus(bool focused,
|
||||
RenderWidgetHostView* rwhv = web_contents()->GetRenderWidgetHostView();
|
||||
RenderWidgetHost* rwh = rwhv ? rwhv->GetRenderWidgetHost() : nullptr;
|
||||
|
||||
focused_ = focused;
|
||||
if (!rwh)
|
||||
return;
|
||||
|
||||
@ -104,10 +94,7 @@ WebContentsImpl* BrowserPluginGuest::CreateNewGuestWindow(
|
||||
}
|
||||
|
||||
void BrowserPluginGuest::InitInternal(WebContentsImpl* owner_web_contents) {
|
||||
focused_ = false;
|
||||
SetFocus(focused_, blink::mojom::FocusType::kNone);
|
||||
|
||||
frame_rect_ = gfx::Rect();
|
||||
SetFocus(false, blink::mojom::FocusType::kNone);
|
||||
|
||||
if (owner_web_contents_ != owner_web_contents) {
|
||||
// Once a BrowserPluginGuest has an embedder WebContents, it's considered to
|
||||
@ -164,12 +151,7 @@ WebContentsImpl* BrowserPluginGuest::GetWebContents() const {
|
||||
|
||||
gfx::Point BrowserPluginGuest::GetScreenCoordinates(
|
||||
const gfx::Point& relative_position) const {
|
||||
if (!attached_)
|
||||
return relative_position;
|
||||
|
||||
gfx::Point screen_pos(relative_position);
|
||||
screen_pos += frame_rect_.OffsetFromOrigin();
|
||||
return screen_pos;
|
||||
return relative_position;
|
||||
}
|
||||
|
||||
void BrowserPluginGuest::DragSourceEndedAt(float client_x,
|
||||
|
@ -89,8 +89,6 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost,
|
||||
WebContentsImpl* CreateNewGuestWindow(
|
||||
const WebContents::CreateParams& params);
|
||||
|
||||
bool focused() const { return focused_; }
|
||||
|
||||
// WebContentsObserver implementation.
|
||||
void DidStartNavigation(NavigationHandle* navigation_handle) override;
|
||||
void DidFinishNavigation(NavigationHandle* navigation_handle) override;
|
||||
@ -112,8 +110,6 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost,
|
||||
#endif
|
||||
|
||||
// GuestHost implementation.
|
||||
int LoadURLWithParams(
|
||||
const NavigationController::LoadURLParams& load_params) override;
|
||||
void WillDestroy() override;
|
||||
|
||||
// Exposes the protected web_contents() from WebContentsObserver.
|
||||
@ -148,12 +144,6 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost,
|
||||
|
||||
WebContentsImpl* owner_web_contents_;
|
||||
|
||||
// Indicates whether this guest has been attached to a container.
|
||||
bool attached_;
|
||||
|
||||
gfx::Rect frame_rect_;
|
||||
bool focused_;
|
||||
|
||||
// BrowserPluginGuest::Init can only be called once. This flag allows it to
|
||||
// exit early if it's already been called.
|
||||
bool initialized_;
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/containers/queue.h"
|
||||
#include "content/browser/browser_plugin/browser_plugin_guest.h"
|
||||
#include "content/browser/find_in_page_client.h"
|
||||
#include "content/browser/renderer_host/render_frame_host_impl.h"
|
||||
#include "content/browser/web_contents/web_contents_impl.h"
|
||||
|
@ -70,12 +70,6 @@ ui::AXMode RenderFrameHostDelegate::GetAccessibilityMode() {
|
||||
return ui::AXMode();
|
||||
}
|
||||
|
||||
RenderFrameHost* RenderFrameHostDelegate::GetGuestByInstanceID(
|
||||
RenderFrameHost* render_frame_host,
|
||||
int browser_plugin_instance_id) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
device::mojom::GeolocationContext*
|
||||
RenderFrameHostDelegate::GetGeolocationContext() {
|
||||
return nullptr;
|
||||
|
@ -269,12 +269,6 @@ class CONTENT_EXPORT RenderFrameHostDelegate {
|
||||
virtual void AccessibilityLocationChangesReceived(
|
||||
const std::vector<AXLocationChangeNotificationDetails>& details) {}
|
||||
|
||||
// Find a guest RenderFrameHost by its parent |render_frame_host| and
|
||||
// |browser_plugin_instance_id|.
|
||||
virtual RenderFrameHost* GetGuestByInstanceID(
|
||||
RenderFrameHost* render_frame_host,
|
||||
int browser_plugin_instance_id);
|
||||
|
||||
// Gets the GeolocationContext associated with this delegate.
|
||||
virtual device::mojom::GeolocationContext* GetGeolocationContext();
|
||||
|
||||
|
@ -45,7 +45,6 @@
|
||||
#include "content/browser/accessibility/browser_accessibility_state_impl.h"
|
||||
#include "content/browser/bad_message.h"
|
||||
#include "content/browser/browser_main_loop.h"
|
||||
#include "content/browser/browser_plugin/browser_plugin_guest.h"
|
||||
#include "content/browser/child_process_security_policy_impl.h"
|
||||
#include "content/browser/compositor/surface_utils.h"
|
||||
#include "content/browser/file_system/browser_file_system_helper.h"
|
||||
|
@ -584,7 +584,6 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
|
||||
blink::mojom::FrameWidgetInputHandler*
|
||||
GetFrameWidgetInputHandlerForFocusedWidget();
|
||||
|
||||
// NOTE: this is null if |is_mus_browser_plugin_guest_| is true.
|
||||
aura::Window* window_;
|
||||
|
||||
std::unique_ptr<DelegatedFrameHostClient> delegated_frame_host_client_;
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "components/viz/common/surfaces/parent_local_surface_id_allocator.h"
|
||||
#include "components/viz/host/host_frame_sink_manager.h"
|
||||
#include "content/browser/accessibility/browser_accessibility_manager.h"
|
||||
#include "content/browser/browser_plugin/browser_plugin_guest.h"
|
||||
#include "content/browser/compositor/surface_utils.h"
|
||||
#include "content/browser/gpu/compositor_util.h"
|
||||
#include "content/browser/renderer_host/cursor_manager.h"
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "base/bind.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "content/browser/browser_plugin/browser_plugin_guest.h"
|
||||
#include "content/browser/renderer_host/frame_tree_node.h"
|
||||
#include "content/browser/renderer_host/render_frame_host_manager.h"
|
||||
#include "content/browser/speech/speech_recognition_manager_impl.h"
|
||||
|
@ -100,7 +100,6 @@
|
||||
#include "content/browser/web_package/save_as_web_bundle_job.h"
|
||||
#include "content/browser/webui/web_ui_controller_factory_registry.h"
|
||||
#include "content/browser/webui/web_ui_impl.h"
|
||||
#include "content/common/browser_plugin/browser_plugin_constants.h"
|
||||
#include "content/common/content_switches_internal.h"
|
||||
#include "content/common/drag_messages.h"
|
||||
#include "content/common/frame_messages.h"
|
||||
@ -113,7 +112,6 @@
|
||||
#include "content/public/browser/accessibility_tree_formatter.h"
|
||||
#include "content/public/browser/ax_event_notification_details.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "content/public/browser/browser_plugin_guest_manager.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/content_browser_client.h"
|
||||
@ -4179,23 +4177,6 @@ void WebContentsImpl::RecordAccessibilityEvents(
|
||||
}
|
||||
}
|
||||
|
||||
RenderFrameHost* WebContentsImpl::GetGuestByInstanceID(
|
||||
RenderFrameHost* render_frame_host,
|
||||
int browser_plugin_instance_id) {
|
||||
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::GetGuestByInstanceID");
|
||||
BrowserPluginGuestManager* guest_manager =
|
||||
GetBrowserContext()->GetGuestManager();
|
||||
if (!guest_manager)
|
||||
return nullptr;
|
||||
|
||||
WebContents* guest = guest_manager->GetGuestByInstanceID(
|
||||
render_frame_host->GetProcess()->GetID(), browser_plugin_instance_id);
|
||||
if (!guest)
|
||||
return nullptr;
|
||||
|
||||
return guest->GetMainFrame();
|
||||
}
|
||||
|
||||
device::mojom::GeolocationContext* WebContentsImpl::GetGeolocationContext() {
|
||||
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::GetGeolocationContext");
|
||||
if (delegate_) {
|
||||
|
@ -615,9 +615,6 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
void RecordAccessibilityEvents(
|
||||
bool start_recording,
|
||||
base::Optional<AccessibilityEventCallback> callback) override;
|
||||
RenderFrameHost* GetGuestByInstanceID(
|
||||
RenderFrameHost* render_frame_host,
|
||||
int browser_plugin_instance_id) override;
|
||||
device::mojom::GeolocationContext* GetGeolocationContext() override;
|
||||
device::mojom::WakeLockContext* GetWakeLockContext() override;
|
||||
#if defined(OS_ANDROID)
|
||||
|
@ -67,8 +67,6 @@ source_set("common") {
|
||||
"ax_serialization_utils.h",
|
||||
"background_fetch/background_fetch_types.cc",
|
||||
"background_fetch/background_fetch_types.h",
|
||||
"browser_plugin/browser_plugin_constants.cc",
|
||||
"browser_plugin/browser_plugin_constants.h",
|
||||
"child_process_host_impl.cc",
|
||||
"child_process_host_impl.h",
|
||||
"common_param_traits.cc",
|
||||
|
@ -1,6 +0,0 @@
|
||||
file://components/guest_view/OWNERS
|
||||
|
||||
per-file *_messages*.h=set noparent
|
||||
per-file *_messages*.h=file://ipc/SECURITY_OWNERS
|
||||
|
||||
# COMPONENT: Platform>Apps>BrowserTag
|
@ -1,16 +0,0 @@
|
||||
// Copyright 2013 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 "content/common/browser_plugin/browser_plugin_constants.h"
|
||||
|
||||
namespace content {
|
||||
|
||||
namespace browser_plugin {
|
||||
|
||||
// Other.
|
||||
const int kInstanceIDNone = 0;
|
||||
|
||||
} // namespace browser_plugin
|
||||
|
||||
} // namespace content
|
@ -1,19 +0,0 @@
|
||||
// Copyright 2013 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.
|
||||
|
||||
#ifndef CONTENT_COMMON_BROWSER_PLUGIN_BROWSER_PLUGIN_CONSTANTS_H_
|
||||
#define CONTENT_COMMON_BROWSER_PLUGIN_BROWSER_PLUGIN_CONSTANTS_H_
|
||||
|
||||
namespace content {
|
||||
|
||||
namespace browser_plugin {
|
||||
|
||||
// Other.
|
||||
extern const int kInstanceIDNone;
|
||||
|
||||
} // namespace browser_plugin
|
||||
|
||||
} // namespace content
|
||||
|
||||
#endif // CONTENT_COMMON_BROWSER_PLUGIN_BROWSER_PLUGIN_CONSTANTS_H_
|
@ -16,21 +16,4 @@ WebContents* BrowserPluginGuestDelegate::GetOwnerWebContents() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool BrowserPluginGuestDelegate::CanBeEmbeddedInsideCrossProcessFrames() {
|
||||
return false;
|
||||
}
|
||||
|
||||
RenderWidgetHost* BrowserPluginGuestDelegate::GetOwnerRenderWidgetHost() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SiteInstance* BrowserPluginGuestDelegate::GetOwnerSiteInstance() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RenderFrameHost* BrowserPluginGuestDelegate::GetEmbedderFrame() {
|
||||
NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace content
|
||||
|
@ -5,21 +5,12 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_
|
||||
|
||||
#include "base/callback_forward.h"
|
||||
#include "base/process/kill.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
|
||||
namespace gfx {
|
||||
class Size;
|
||||
} // namespace gfx
|
||||
|
||||
namespace content {
|
||||
|
||||
class GuestHost;
|
||||
class RenderFrameHost;
|
||||
class RenderWidgetHost;
|
||||
class SiteInstance;
|
||||
|
||||
// Objects implement this interface to get notified about changes in the guest
|
||||
// WebContents and to provide necessary functionality.
|
||||
@ -27,52 +18,15 @@ class CONTENT_EXPORT BrowserPluginGuestDelegate {
|
||||
public:
|
||||
virtual ~BrowserPluginGuestDelegate() {}
|
||||
|
||||
// Notification that the embedder will begin attachment. This is called
|
||||
// prior to resuming resource loads. |element_instance_id| uniquely identifies
|
||||
// the element that will serve as a container for the guest.
|
||||
// Once the content embedder has completed setting up state for attachment, it
|
||||
// must call the |completion_callback| to complete attachment.
|
||||
virtual void WillAttach(content::WebContents* embedder_web_contents,
|
||||
int element_instance_id,
|
||||
bool is_full_page_plugin,
|
||||
base::OnceClosure completion_callback) {}
|
||||
|
||||
virtual WebContents* CreateNewGuestWindow(
|
||||
const WebContents::CreateParams& create_params);
|
||||
|
||||
// Notification that the embedder has completed attachment. The
|
||||
// |guest_proxy_routing_id| is the routing ID for the RenderView in the
|
||||
// embedder that will serve as a contentWindow proxy for the guest.
|
||||
virtual void DidAttach(int guest_proxy_routing_id) {}
|
||||
|
||||
// Notification that the guest has detached from its container.
|
||||
virtual void DidDetach() {}
|
||||
|
||||
// Notification that a valid |url| was dropped over the guest.
|
||||
virtual void DidDropLink(const GURL& url) {}
|
||||
|
||||
// Notification that the BrowserPlugin has resized.
|
||||
virtual void ElementSizeChanged(const gfx::Size& size) {}
|
||||
|
||||
// Returns the WebContents that currently owns this guest.
|
||||
virtual WebContents* GetOwnerWebContents();
|
||||
|
||||
// Provides the delegate with an interface with which to communicate with the
|
||||
// content module.
|
||||
virtual void SetGuestHost(GuestHost* guest_host) {}
|
||||
|
||||
// Returns the RenderWidgetHost corresponding to the owner frame.
|
||||
virtual RenderWidgetHost* GetOwnerRenderWidgetHost();
|
||||
|
||||
// The site instance of the owner frame.
|
||||
virtual SiteInstance* GetOwnerSiteInstance();
|
||||
|
||||
// Returns true if the corresponding guest is allowed to be embedded inside an
|
||||
// <iframe> which is cross process.
|
||||
virtual bool CanBeEmbeddedInsideCrossProcessFrames();
|
||||
|
||||
// Returns the embedder frame for this guest.
|
||||
virtual RenderFrameHost* GetEmbedderFrame();
|
||||
};
|
||||
|
||||
} // namespace content
|
||||
|
@ -6,12 +6,6 @@
|
||||
|
||||
namespace content {
|
||||
|
||||
WebContents* BrowserPluginGuestManager::GetGuestByInstanceID(
|
||||
int owner_process_id,
|
||||
int browser_plugin_instance_id) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool BrowserPluginGuestManager::ForEachGuest(WebContents* embedder_web_contents,
|
||||
const GuestCallback& callback) {
|
||||
return false;
|
||||
|
@ -18,11 +18,6 @@ class CONTENT_EXPORT BrowserPluginGuestManager {
|
||||
public:
|
||||
virtual ~BrowserPluginGuestManager() {}
|
||||
|
||||
// Requests a guest WebContents associated with the provided
|
||||
// <owner_process_id, browser_plugin_instance_id> tuple.
|
||||
virtual WebContents* GetGuestByInstanceID(int owner_process_id,
|
||||
int browser_plugin_instance_id);
|
||||
|
||||
// Iterates over all WebContents belonging to a given |embedder_web_contents|,
|
||||
// calling |callback| for each. If one of the callbacks returns true, then
|
||||
// the iteration exits early.
|
||||
|
@ -5,12 +5,8 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_GUEST_HOST_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_GUEST_HOST_H_
|
||||
|
||||
#include "ui/gfx/geometry/size.h"
|
||||
|
||||
namespace content {
|
||||
|
||||
class WebContents;
|
||||
|
||||
// A GuestHost is the content API for a guest WebContents.
|
||||
// Guests are top-level frames that can be embedded within other pages.
|
||||
// The content module manages routing of input events and compositing, but all
|
||||
@ -22,11 +18,6 @@ class WebContents;
|
||||
// its API can only be accessed by a BrowserPluginGuestDelegate.
|
||||
class GuestHost {
|
||||
public:
|
||||
// Loads a URL using the specified |load_params| and returns a routing ID for
|
||||
// a proxy for the guest.
|
||||
virtual int LoadURLWithParams(
|
||||
const NavigationController::LoadURLParams& load_params) = 0;
|
||||
|
||||
// Called when the GuestHost is about to be destroyed.
|
||||
virtual void WillDestroy() = 0;
|
||||
};
|
||||
|
@ -32,8 +32,6 @@ target(link_target_type, "renderer_sources") {
|
||||
visibility = [ "//content/*" ]
|
||||
|
||||
sources = [
|
||||
"browser_plugin_delegate.cc",
|
||||
"browser_plugin_delegate.h",
|
||||
"chrome_object_extensions_utils.cc",
|
||||
"chrome_object_extensions_utils.h",
|
||||
"content_renderer_client.cc",
|
||||
|
@ -1,16 +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 "content/public/renderer/browser_plugin_delegate.h"
|
||||
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
namespace content {
|
||||
|
||||
v8::Local<v8::Object> BrowserPluginDelegate::V8ScriptableObject(
|
||||
v8::Isolate* isolate) {
|
||||
return v8::Local<v8::Object>();
|
||||
}
|
||||
|
||||
} // namespace content
|
@ -1,60 +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.
|
||||
|
||||
#ifndef CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_DELEGATE_H_
|
||||
#define CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_DELEGATE_H_
|
||||
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
|
||||
namespace gfx {
|
||||
class Size;
|
||||
}
|
||||
|
||||
namespace v8 {
|
||||
class Isolate;
|
||||
class Object;
|
||||
template<typename T> class Local;
|
||||
} // namespace v8
|
||||
|
||||
namespace content {
|
||||
|
||||
// A delegate for BrowserPlugin which gets notified about the plugin load.
|
||||
// Implementations can provide additional steps necessary to change the load
|
||||
// behavior of the plugin.
|
||||
class CONTENT_EXPORT BrowserPluginDelegate {
|
||||
public:
|
||||
// Called when the BrowserPlugin's geometry has been computed for the first
|
||||
// time.
|
||||
virtual void Ready() {}
|
||||
|
||||
// Called when plugin document has finished loading.
|
||||
virtual void PluginDidFinishLoading() {}
|
||||
|
||||
// Called when plugin document receives data.
|
||||
virtual void PluginDidReceiveData(const char* data, int data_length) {}
|
||||
|
||||
// Sets the instance ID that idenfies the plugin within current render
|
||||
// process.
|
||||
virtual void SetElementInstanceID(int element_instance_id) {}
|
||||
|
||||
// Called when the plugin resizes.
|
||||
virtual void DidResizeElement(const gfx::Size& new_size) {}
|
||||
|
||||
// Called when the plugin is about to be destroyed.
|
||||
virtual void DidDestroyElement() {}
|
||||
|
||||
// Returns a scriptable object for the plugin.
|
||||
virtual v8::Local<v8::Object> V8ScriptableObject(v8::Isolate* isolate);
|
||||
|
||||
// Returns a weak pointer to this delegate.
|
||||
virtual base::WeakPtr<BrowserPluginDelegate> GetWeakPtr() = 0;
|
||||
|
||||
protected:
|
||||
virtual ~BrowserPluginDelegate() {}
|
||||
};
|
||||
|
||||
} // namespace content
|
||||
|
||||
#endif // CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_DELEGATE_H_
|
@ -205,14 +205,6 @@ bool ContentRendererClient::AllowScriptExtensionForServiceWorker(
|
||||
return false;
|
||||
}
|
||||
|
||||
BrowserPluginDelegate* ContentRendererClient::CreateBrowserPluginDelegate(
|
||||
RenderFrame* render_frame,
|
||||
const WebPluginInfo& info,
|
||||
const std::string& mime_type,
|
||||
const GURL& original_url) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool ContentRendererClient::IsExcludedHeaderForServiceWorkerFetchEvent(
|
||||
const std::string& header_name) {
|
||||
return false;
|
||||
|
@ -68,10 +68,8 @@ class BinderMap;
|
||||
}
|
||||
|
||||
namespace content {
|
||||
class BrowserPluginDelegate;
|
||||
class RenderFrame;
|
||||
class RenderView;
|
||||
struct WebPluginInfo;
|
||||
|
||||
// Embedder API for participating in renderer logic.
|
||||
class CONTENT_EXPORT ContentRendererClient {
|
||||
@ -129,13 +127,6 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
RenderFrame* render_frame,
|
||||
const base::FilePath& plugin_path);
|
||||
|
||||
// Creates a delegate for browser plugin.
|
||||
virtual BrowserPluginDelegate* CreateBrowserPluginDelegate(
|
||||
RenderFrame* render_frame,
|
||||
const WebPluginInfo& info,
|
||||
const std::string& mime_type,
|
||||
const GURL& original_url);
|
||||
|
||||
// Returns true if the embedder has an error page to show for the given http
|
||||
// status code.
|
||||
virtual bool HasErrorPage(int http_status_code);
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include "components/viz/client/frame_evictor.h"
|
||||
#include "content/browser/accessibility/browser_accessibility.h"
|
||||
#include "content/browser/accessibility/browser_accessibility_manager.h"
|
||||
#include "content/browser/browser_plugin/browser_plugin_guest.h"
|
||||
#include "content/browser/file_system/file_system_manager_impl.h"
|
||||
#include "content/browser/renderer_host/cross_process_frame_connector.h"
|
||||
#include "content/browser/renderer_host/frame_tree_node.h"
|
||||
@ -60,7 +59,6 @@
|
||||
#include "content/common/input_messages.h"
|
||||
#include "content/common/widget_messages.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "content/public/browser/browser_plugin_guest_manager.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/child_process_termination_info.h"
|
||||
@ -2137,14 +2135,6 @@ void UiaGetPropertyValueVtArrayVtUnknownValidate(
|
||||
}
|
||||
#endif
|
||||
|
||||
bool IsWebContentsBrowserPluginFocused(content::WebContents* web_contents) {
|
||||
WebContentsImpl* web_contents_impl =
|
||||
static_cast<WebContentsImpl*>(web_contents);
|
||||
BrowserPluginGuest* browser_plugin_guest =
|
||||
web_contents_impl->GetBrowserPluginGuest();
|
||||
return browser_plugin_guest ? browser_plugin_guest->focused() : false;
|
||||
}
|
||||
|
||||
RenderWidgetHost* GetMouseLockWidget(WebContents* web_contents) {
|
||||
return static_cast<WebContentsImpl*>(web_contents)->GetMouseLockWidget();
|
||||
}
|
||||
|
@ -966,10 +966,6 @@ void UiaGetPropertyValueVtArrayVtUnknownValidate(
|
||||
const std::vector<std::string>& expected_names);
|
||||
#endif
|
||||
|
||||
// Find out if the BrowserPlugin for a guest WebContents is focused. Returns
|
||||
// false if the WebContents isn't a guest with a BrowserPlugin.
|
||||
bool IsWebContentsBrowserPluginFocused(content::WebContents* web_contents);
|
||||
|
||||
// Returns the RenderWidgetHost that holds the mouse lock.
|
||||
RenderWidgetHost* GetMouseLockWidget(WebContents* web_contents);
|
||||
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "content/browser/renderer_host/render_frame_host_impl.h"
|
||||
#include "content/common/content_navigation_policy.h"
|
||||
#include "content/public/browser/browser_child_process_host_iterator.h"
|
||||
#include "content/public/browser/browser_plugin_guest_delegate.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/notification_service.h"
|
||||
|
@ -77,7 +77,6 @@
|
||||
#include "content/public/common/untrustworthy_context_menu_params.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "content/public/common/url_utils.h"
|
||||
#include "content/public/renderer/browser_plugin_delegate.h"
|
||||
#include "content/public/renderer/content_renderer_client.h"
|
||||
#include "content/public/renderer/context_menu_client.h"
|
||||
#include "content/public/renderer/document_state.h"
|
||||
|
@ -64,15 +64,12 @@ ExtensionFunction::ResponseAction GuestViewInternalCreateGuestFunction::Run() {
|
||||
void GuestViewInternalCreateGuestFunction::CreateGuestCallback(
|
||||
content::WebContents* guest_web_contents) {
|
||||
int guest_instance_id = 0;
|
||||
int content_window_id = MSG_ROUTING_NONE;
|
||||
if (guest_web_contents) {
|
||||
GuestViewBase* guest = GuestViewBase::FromWebContents(guest_web_contents);
|
||||
guest_instance_id = guest->guest_instance_id();
|
||||
content_window_id = guest->proxy_routing_id();
|
||||
}
|
||||
auto return_params = std::make_unique<base::DictionaryValue>();
|
||||
return_params->SetInteger(guest_view::kID, guest_instance_id);
|
||||
return_params->SetInteger(guest_view::kContentWindowID, content_window_id);
|
||||
|
||||
Respond(OneArgument(std::move(return_params)));
|
||||
}
|
||||
|
@ -77,12 +77,12 @@ class MimeHandlerViewGuest
|
||||
|
||||
static const char Type[];
|
||||
|
||||
// BrowserPluginGuestDelegate overrides.
|
||||
// GuestViewBase overrides.
|
||||
bool CanBeEmbeddedInsideCrossProcessFrames() override;
|
||||
content::RenderWidgetHost* GetOwnerRenderWidgetHost() override;
|
||||
content::SiteInstance* GetOwnerSiteInstance() override;
|
||||
content::RenderFrameHost* GetEmbedderFrame() override;
|
||||
|
||||
content::RenderFrameHost* GetEmbedderFrame();
|
||||
void SetEmbedderFrame(int process_id, int routing_id);
|
||||
|
||||
void SetBeforeUnloadController(
|
||||
|
@ -1331,7 +1331,7 @@ bool WebViewGuest::LoadDataWithBaseURL(const std::string& data_url,
|
||||
content::NavigationController::UA_OVERRIDE_INHERIT;
|
||||
|
||||
// Navigate to the data URL.
|
||||
GuestViewBase::LoadURLWithParams(load_params);
|
||||
web_contents()->GetController().LoadURLWithParams(load_params);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1514,7 +1514,7 @@ void WebViewGuest::LoadURLWithParams(
|
||||
load_url_params.override_user_agent =
|
||||
content::NavigationController::UA_OVERRIDE_TRUE;
|
||||
}
|
||||
GuestViewBase::LoadURLWithParams(load_url_params);
|
||||
web_contents()->GetController().LoadURLWithParams(load_url_params);
|
||||
|
||||
src_ = validated_url;
|
||||
}
|
||||
|
@ -183,11 +183,14 @@ class WebViewGuest : public guest_view::GuestView<WebViewGuest> {
|
||||
bool last_unlocked_by_target,
|
||||
base::OnceCallback<void(bool)> callback);
|
||||
|
||||
// TODO(533069): This appears to be dead code following BrowserPlugin removal.
|
||||
// Investigate removing this.
|
||||
void DidDropLink(const GURL& url);
|
||||
|
||||
// GuestViewBase implementation.
|
||||
void CreateWebContents(const base::DictionaryValue& create_params,
|
||||
WebContentsCreatedCallback callback) final;
|
||||
void DidAttachToEmbedder() final;
|
||||
void DidDropLink(const GURL& url) final;
|
||||
void DidInitialize(const base::DictionaryValue& create_params) final;
|
||||
void EmbedderFullscreenToggled(bool entered_fullscreen) final;
|
||||
void FindReply(content::WebContents* source,
|
||||
|
@ -84,11 +84,11 @@ class MimeHandlerViewContainer : public blink::WebAssociatedURLLoaderClient,
|
||||
bool OnMessage(const IPC::Message& message) override;
|
||||
void OnReady() override;
|
||||
|
||||
// BrowserPluginDelegate implementation.
|
||||
void PluginDidFinishLoading() override;
|
||||
void PluginDidReceiveData(const char* data, int data_length) override;
|
||||
void DidResizeElement(const gfx::Size& new_size) override;
|
||||
v8::Local<v8::Object> V8ScriptableObject(v8::Isolate*) override;
|
||||
// TODO(533069): Remove since BrowserPlugin has been removed.
|
||||
void PluginDidFinishLoading();
|
||||
void PluginDidReceiveData(const char* data, int data_length);
|
||||
void DidResizeElement(const gfx::Size& new_size);
|
||||
v8::Local<v8::Object> V8ScriptableObject(v8::Isolate*);
|
||||
|
||||
// GuestViewContainer overrides.
|
||||
void OnRenderFrameDestroyed() override;
|
||||
|
@ -13,9 +13,7 @@
|
||||
#include "extensions/common/extensions_client.h"
|
||||
#include "extensions/renderer/dispatcher.h"
|
||||
#include "extensions/renderer/extension_frame_helper.h"
|
||||
#include "extensions/renderer/guest_view/extensions_guest_view_container.h"
|
||||
#include "extensions/renderer/guest_view/extensions_guest_view_container_dispatcher.h"
|
||||
#include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h"
|
||||
#include "extensions/shell/common/shell_extensions_client.h"
|
||||
#include "extensions/shell/renderer/shell_extensions_renderer_client.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
@ -108,20 +106,6 @@ bool ShellContentRendererClient::IsExternalPepperPlugin(
|
||||
#endif
|
||||
}
|
||||
|
||||
content::BrowserPluginDelegate*
|
||||
ShellContentRendererClient::CreateBrowserPluginDelegate(
|
||||
content::RenderFrame* render_frame,
|
||||
const content::WebPluginInfo& info,
|
||||
const std::string& mime_type,
|
||||
const GURL& original_url) {
|
||||
if (mime_type == content::kBrowserPluginMimeType) {
|
||||
return new extensions::ExtensionsGuestViewContainer(render_frame);
|
||||
} else {
|
||||
return new extensions::MimeHandlerViewContainer(render_frame, info,
|
||||
mime_type, original_url);
|
||||
}
|
||||
}
|
||||
|
||||
void ShellContentRendererClient::RunScriptsAtDocumentStart(
|
||||
content::RenderFrame* render_frame) {
|
||||
extensions_renderer_client_->GetDispatcher()->RunScriptsAtDocumentStart(
|
||||
|
@ -44,11 +44,6 @@ class ShellContentRendererClient : public content::ContentRendererClient {
|
||||
GURL* new_url,
|
||||
bool* force_ignore_site_for_cookies) override;
|
||||
bool IsExternalPepperPlugin(const std::string& module_name) override;
|
||||
content::BrowserPluginDelegate* CreateBrowserPluginDelegate(
|
||||
content::RenderFrame* render_frame,
|
||||
const content::WebPluginInfo& info,
|
||||
const std::string& mime_type,
|
||||
const GURL& original_url) override;
|
||||
void RunScriptsAtDocumentStart(content::RenderFrame* render_frame) override;
|
||||
void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame) override;
|
||||
|
||||
|
Reference in New Issue
Block a user