Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Side by Side Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 2165523004: Force MimeHandlerView to always use BrowserPlugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using a boolean to determine whether or not BrowserPluginGuest is for MimeHandlerViewGuest Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/render_widget_host_view_guest.h" 5 #include "content/browser/frame_host/render_widget_host_view_guest.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 void RenderWidgetHostViewGuest::InitAsFullscreen( 346 void RenderWidgetHostViewGuest::InitAsFullscreen(
347 RenderWidgetHostView* reference_host_view) { 347 RenderWidgetHostView* reference_host_view) {
348 // This should never get called. 348 // This should never get called.
349 NOTREACHED(); 349 NOTREACHED();
350 } 350 }
351 351
352 gfx::NativeView RenderWidgetHostViewGuest::GetNativeView() const { 352 gfx::NativeView RenderWidgetHostViewGuest::GetNativeView() const {
353 if (!guest_) 353 if (!guest_)
354 return gfx::NativeView(); 354 return gfx::NativeView();
355 355
356 RenderWidgetHostView* rwhv = guest_->GetOwnerRenderWidgetHostView(); 356 if (guest_->IsMimeHandlerViewGuest())
357 return guest_->GetTopLevelRenderWidgetHostView()->GetNativeView();
lfg 2016/07/20 19:49:57 What's the problem when returning the OwnerRenderW
EhsanK 2016/07/20 20:49:19 When we show a PDF inside an OOPIF-<webview>, the
lfg 2016/07/20 21:05:34 In that case, shouldn't IsMimeHandlerViewGuest() r
EhsanK 2016/07/21 19:53:06 This is called from tests as well as used in sendi
358
359 RenderWidgetHostView* rwhv = GetOwnerRenderWidgetHostView();
357 if (!rwhv) 360 if (!rwhv)
358 return gfx::NativeView(); 361 return gfx::NativeView();
362
359 return rwhv->GetNativeView(); 363 return rwhv->GetNativeView();
360 } 364 }
361 365
362 gfx::NativeViewAccessible RenderWidgetHostViewGuest::GetNativeViewAccessible() { 366 gfx::NativeViewAccessible RenderWidgetHostViewGuest::GetNativeViewAccessible() {
363 if (!guest_) 367 if (!guest_)
364 return gfx::NativeViewAccessible(); 368 return gfx::NativeViewAccessible();
365 369
366 RenderWidgetHostView* rwhv = guest_->GetOwnerRenderWidgetHostView(); 370 RenderWidgetHostView* rwhv = guest_->GetOwnerRenderWidgetHostView();
367 if (!rwhv) 371 if (!rwhv)
368 return gfx::NativeViewAccessible(); 372 return gfx::NativeViewAccessible();
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 gesture_event.data.scrollUpdate.inertialPhase == 624 gesture_event.data.scrollUpdate.inertialPhase ==
621 blink::WebGestureEvent::MomentumPhase) { 625 blink::WebGestureEvent::MomentumPhase) {
622 return; 626 return;
623 } 627 }
624 host_->ForwardGestureEvent(gesture_event); 628 host_->ForwardGestureEvent(gesture_event);
625 return; 629 return;
626 } 630 }
627 } 631 }
628 632
629 } // namespace content 633 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698