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

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

Issue 2417693002: Allow MimeHandlerViewGuest be embedded inside OOPIFs (Closed)
Patch Set: Rebase and nits Created 4 years, 2 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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 // GestureScrollBegin/End are always consumed by the guest, so we only 594 // GestureScrollBegin/End are always consumed by the guest, so we only
595 // forward GestureScrollUpdate. 595 // forward GestureScrollUpdate.
596 if (event.type == blink::WebInputEvent::GestureScrollUpdate && not_consumed) 596 if (event.type == blink::WebInputEvent::GestureScrollUpdate && not_consumed)
597 guest_->ResendEventToEmbedder(event); 597 guest_->ResendEventToEmbedder(event);
598 } 598 }
599 599
600 bool RenderWidgetHostViewGuest::IsRenderWidgetHostViewGuest() { 600 bool RenderWidgetHostViewGuest::IsRenderWidgetHostViewGuest() {
601 return true; 601 return true;
602 } 602 }
603 603
604 RenderWidgetHostViewBase* RenderWidgetHostViewGuest::GetOuterView() {
605 return GetOwnerRenderWidgetHostView();
606 }
607
604 void RenderWidgetHostViewGuest::OnHandleInputEvent( 608 void RenderWidgetHostViewGuest::OnHandleInputEvent(
605 RenderWidgetHostImpl* embedder, 609 RenderWidgetHostImpl* embedder,
606 int browser_plugin_instance_id, 610 int browser_plugin_instance_id,
607 const blink::WebInputEvent* event) { 611 const blink::WebInputEvent* event) {
608 // WebMouseWheelEvents go into a queue, and may not be forwarded to the 612 // WebMouseWheelEvents go into a queue, and may not be forwarded to the
609 // renderer until after this method goes out of scope. Therefore we need to 613 // renderer until after this method goes out of scope. Therefore we need to
610 // explicitly remove the additional device scale factor from the coordinates 614 // explicitly remove the additional device scale factor from the coordinates
611 // before allowing the event to be queued. 615 // before allowing the event to be queued.
612 if (IsUseZoomForDSFEnabled() && 616 if (IsUseZoomForDSFEnabled() &&
613 event->type == blink::WebInputEvent::MouseWheel) { 617 event->type == blink::WebInputEvent::MouseWheel) {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 gesture_event.data.scrollUpdate.inertialPhase == 693 gesture_event.data.scrollUpdate.inertialPhase ==
690 blink::WebGestureEvent::MomentumPhase) { 694 blink::WebGestureEvent::MomentumPhase) {
691 return; 695 return;
692 } 696 }
693 host_->ForwardGestureEvent(gesture_event); 697 host_->ForwardGestureEvent(gesture_event);
694 return; 698 return;
695 } 699 }
696 } 700 }
697 701
698 } // namespace content 702 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698