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

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

Issue 2015373002: Fix webview crash on attempt to scroll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } // namespace 67 } // namespace
68 68
69 RenderWidgetHostViewGuest::RenderWidgetHostViewGuest( 69 RenderWidgetHostViewGuest::RenderWidgetHostViewGuest(
70 RenderWidgetHost* widget_host, 70 RenderWidgetHost* widget_host,
71 BrowserPluginGuest* guest, 71 BrowserPluginGuest* guest,
72 base::WeakPtr<RenderWidgetHostViewBase> platform_view) 72 base::WeakPtr<RenderWidgetHostViewBase> platform_view)
73 : RenderWidgetHostViewChildFrame(widget_host), 73 : RenderWidgetHostViewChildFrame(widget_host),
74 // |guest| is NULL during test. 74 // |guest| is NULL during test.
75 guest_(guest ? guest->AsWeakPtr() : base::WeakPtr<BrowserPluginGuest>()), 75 guest_(guest ? guest->AsWeakPtr() : base::WeakPtr<BrowserPluginGuest>()),
76 platform_view_(platform_view) { 76 platform_view_(platform_view) {
77 UpdateScreenInfo(GetNativeView());
khmel 2016/05/27 20:49:26 Direct reason of crash current_device_scale_factor
wjmaclean 2016/05/30 14:00:51 This looks fine, though I recall noting recently t
khmel 2016/06/02 00:10:22 It is hard to put it to RWHVCF CTOR because RWHVCF
wjmaclean 2016/06/02 12:17:52 We're going to be removing the NOTREACHED() in RWH
77 } 78 }
78 79
79 RenderWidgetHostViewGuest::~RenderWidgetHostViewGuest() {} 80 RenderWidgetHostViewGuest::~RenderWidgetHostViewGuest() {}
80 81
81 bool RenderWidgetHostViewGuest::OnMessageReceivedFromEmbedder( 82 bool RenderWidgetHostViewGuest::OnMessageReceivedFromEmbedder(
82 const IPC::Message& message, 83 const IPC::Message& message,
83 RenderWidgetHostImpl* embedder) { 84 RenderWidgetHostImpl* embedder) {
84 bool handled = true; 85 bool handled = true;
85 IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(RenderWidgetHostViewGuest, message, 86 IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(RenderWidgetHostViewGuest, message,
86 embedder) 87 embedder)
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && 600 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate &&
600 gesture_event.data.scrollUpdate.inertial) { 601 gesture_event.data.scrollUpdate.inertial) {
601 return; 602 return;
602 } 603 }
603 host_->ForwardGestureEvent(gesture_event); 604 host_->ForwardGestureEvent(gesture_event);
604 return; 605 return;
605 } 606 }
606 } 607 }
607 608
608 } // namespace content 609 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698