Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 RenderWidgetHost* widget_host, | 69 RenderWidgetHost* widget_host, |
| 70 BrowserPluginGuest* guest, | 70 BrowserPluginGuest* guest, |
| 71 base::WeakPtr<RenderWidgetHostViewBase> platform_view) | 71 base::WeakPtr<RenderWidgetHostViewBase> platform_view) |
| 72 : RenderWidgetHostViewChildFrame(widget_host), | 72 : RenderWidgetHostViewChildFrame(widget_host), |
| 73 // |guest| is NULL during test. | 73 // |guest| is NULL during test. |
| 74 guest_(guest ? guest->AsWeakPtr() : base::WeakPtr<BrowserPluginGuest>()), | 74 guest_(guest ? guest->AsWeakPtr() : base::WeakPtr<BrowserPluginGuest>()), |
| 75 platform_view_(platform_view) { | 75 platform_view_(platform_view) { |
| 76 gfx::NativeView view = GetNativeView(); | 76 gfx::NativeView view = GetNativeView(); |
| 77 if (view) | 77 if (view) |
| 78 UpdateScreenInfo(view); | 78 UpdateScreenInfo(view); |
| 79 Init(); | |
|
clamy
2016/10/05 12:35:53
nit: For the sake of consistency, I think it'd be
dtapuska
2016/10/05 14:25:00
Done.
| |
| 79 } | 80 } |
| 80 | 81 |
| 81 RenderWidgetHostViewGuest::~RenderWidgetHostViewGuest() {} | 82 RenderWidgetHostViewGuest::~RenderWidgetHostViewGuest() {} |
| 82 | 83 |
| 83 bool RenderWidgetHostViewGuest::OnMessageReceivedFromEmbedder( | 84 bool RenderWidgetHostViewGuest::OnMessageReceivedFromEmbedder( |
| 84 const IPC::Message& message, | 85 const IPC::Message& message, |
| 85 RenderWidgetHostImpl* embedder) { | 86 RenderWidgetHostImpl* embedder) { |
| 86 bool handled = true; | 87 bool handled = true; |
| 87 IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(RenderWidgetHostViewGuest, message, | 88 IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(RenderWidgetHostViewGuest, message, |
| 88 embedder) | 89 embedder) |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 677 gesture_event.data.scrollUpdate.inertialPhase == | 678 gesture_event.data.scrollUpdate.inertialPhase == |
| 678 blink::WebGestureEvent::MomentumPhase) { | 679 blink::WebGestureEvent::MomentumPhase) { |
| 679 return; | 680 return; |
| 680 } | 681 } |
| 681 host_->ForwardGestureEvent(gesture_event); | 682 host_->ForwardGestureEvent(gesture_event); |
| 682 return; | 683 return; |
| 683 } | 684 } |
| 684 } | 685 } |
| 685 | 686 |
| 686 } // namespace content | 687 } // namespace content |
| OLD | NEW |