| Index: components/guest_view/browser/guest_view_base.cc
|
| diff --git a/components/guest_view/browser/guest_view_base.cc b/components/guest_view/browser/guest_view_base.cc
|
| index 5b4fa13b9365623b7129a8547586eb5ddeaf4225..d5442071836865e829f754da485d33966eb43c2b 100644
|
| --- a/components/guest_view/browser/guest_view_base.cc
|
| +++ b/components/guest_view/browser/guest_view_base.cc
|
| @@ -50,7 +50,7 @@ SetSizeParams::~SetSizeParams() {
|
| class GuestViewBase::OwnerContentsObserver : public WebContentsObserver {
|
| public:
|
| OwnerContentsObserver(GuestViewBase* guest,
|
| - content::WebContents* embedder_web_contents)
|
| + WebContents* embedder_web_contents)
|
| : WebContentsObserver(embedder_web_contents),
|
| is_fullscreen_(false),
|
| destroyed_(false),
|
| @@ -140,12 +140,11 @@ class GuestViewBase::OpenerLifetimeObserver : public WebContentsObserver {
|
| DISALLOW_COPY_AND_ASSIGN(OpenerLifetimeObserver);
|
| };
|
|
|
| -GuestViewBase::GuestViewBase(content::WebContents* owner_web_contents)
|
| +GuestViewBase::GuestViewBase(WebContents* owner_web_contents)
|
| : owner_web_contents_(owner_web_contents),
|
| browser_context_(owner_web_contents->GetBrowserContext()),
|
| - guest_instance_id_(
|
| - GuestViewManager::FromBrowserContext(browser_context_)->
|
| - GetNextInstanceID()),
|
| + guest_instance_id_(GuestViewManager::FromBrowserContext(browser_context_)
|
| + ->GetNextInstanceID()),
|
| view_instance_id_(kInstanceIDNone),
|
| element_instance_id_(kInstanceIDNone),
|
| initialized_(false),
|
| @@ -185,7 +184,7 @@ void GuestViewBase::Init(const base::DictionaryValue& create_params,
|
|
|
| void GuestViewBase::InitWithWebContents(
|
| const base::DictionaryValue& create_params,
|
| - content::WebContents* guest_web_contents) {
|
| + WebContents* guest_web_contents) {
|
| DCHECK(guest_web_contents);
|
|
|
| // Create a ZoomController to allow the guest's contents to be zoomed.
|
| @@ -336,10 +335,9 @@ GuestViewBase* GuestViewBase::From(int owner_process_id,
|
| if (!host)
|
| return nullptr;
|
|
|
| - content::WebContents* guest_web_contents =
|
| - GuestViewManager::FromBrowserContext(
|
| - host->GetBrowserContext())->
|
| - GetGuestByInstanceIDSafely(guest_instance_id, owner_process_id);
|
| + WebContents* guest_web_contents =
|
| + GuestViewManager::FromBrowserContext(host->GetBrowserContext())
|
| + ->GetGuestByInstanceIDSafely(guest_instance_id, owner_process_id);
|
| if (!guest_web_contents)
|
| return nullptr;
|
|
|
| @@ -370,8 +368,8 @@ bool GuestViewBase::ZoomPropagatesFromEmbedderToGuest() const {
|
| return true;
|
| }
|
|
|
| -content::WebContents* GuestViewBase::CreateNewGuestWindow(
|
| - const content::WebContents::CreateParams& create_params) {
|
| +WebContents* GuestViewBase::CreateNewGuestWindow(
|
| + const WebContents::CreateParams& create_params) {
|
| auto guest_manager = GuestViewManager::FromBrowserContext(browser_context());
|
| return guest_manager->CreateGuestWithWebContentsParams(
|
| GetViewType(),
|
| @@ -495,7 +493,7 @@ void GuestViewBase::SetGuestHost(content::GuestHost* guest_host) {
|
| guest_host_ = guest_host;
|
| }
|
|
|
| -void GuestViewBase::WillAttach(content::WebContents* embedder_web_contents,
|
| +void GuestViewBase::WillAttach(WebContents* embedder_web_contents,
|
| int element_instance_id,
|
| bool is_full_page_plugin,
|
| const base::Closure& callback) {
|
| @@ -601,7 +599,7 @@ void GuestViewBase::DeactivateContents(WebContents* web_contents) {
|
| embedder_web_contents());
|
| }
|
|
|
| -void GuestViewBase::ContentsMouseEvent(content::WebContents* source,
|
| +void GuestViewBase::ContentsMouseEvent(WebContents* source,
|
| const gfx::Point& location,
|
| bool motion) {
|
| if (!attached() || !embedder_web_contents()->GetDelegate())
|
| @@ -628,7 +626,7 @@ void GuestViewBase::HandleKeyboardEvent(
|
| HandleKeyboardEvent(embedder_web_contents(), event);
|
| }
|
|
|
| -void GuestViewBase::LoadingStateChanged(content::WebContents* source,
|
| +void GuestViewBase::LoadingStateChanged(WebContents* source,
|
| bool to_different_document) {
|
| if (!attached() || !embedder_web_contents()->GetDelegate())
|
| return;
|
| @@ -661,16 +659,15 @@ bool GuestViewBase::ShouldFocusPageAfterCrash() {
|
| return false;
|
| }
|
|
|
| -bool GuestViewBase::PreHandleGestureEvent(content::WebContents* source,
|
| - const blink::WebGestureEvent& event) {
|
| +bool GuestViewBase::PreHandleGestureEvent(WebContents* source,
|
| + const blink::WebGestureEvent& event) {
|
| return event.type == blink::WebGestureEvent::GesturePinchBegin ||
|
| event.type == blink::WebGestureEvent::GesturePinchUpdate ||
|
| event.type == blink::WebGestureEvent::GesturePinchEnd;
|
| }
|
|
|
| -void GuestViewBase::UpdatePreferredSize(
|
| - content::WebContents* target_web_contents,
|
| - const gfx::Size& pref_size) {
|
| +void GuestViewBase::UpdatePreferredSize(WebContents* target_web_contents,
|
| + const gfx::Size& pref_size) {
|
| // In theory it's not necessary to check IsPreferredSizeModeEnabled() because
|
| // there will only be events if it was enabled in the first place. However,
|
| // something else may have turned on preferred size mode, so double check.
|
| @@ -680,8 +677,7 @@ void GuestViewBase::UpdatePreferredSize(
|
| }
|
| }
|
|
|
| -void GuestViewBase::UpdateTargetURL(content::WebContents* source,
|
| - const GURL& url) {
|
| +void GuestViewBase::UpdateTargetURL(WebContents* source, const GURL& url) {
|
| if (!attached() || !embedder_web_contents()->GetDelegate())
|
| return;
|
|
|
| @@ -747,7 +743,7 @@ void GuestViewBase::SendQueuedEvents() {
|
| void GuestViewBase::CompleteInit(
|
| scoped_ptr<base::DictionaryValue> create_params,
|
| const WebContentsCreatedCallback& callback,
|
| - content::WebContents* guest_web_contents) {
|
| + WebContents* guest_web_contents) {
|
| if (!guest_web_contents) {
|
| // The derived class did not create a WebContents so this class serves no
|
| // purpose. Let's self-destruct.
|
|
|