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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 293043003: <webview>: Move PreHandleGestureEvent in chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser_plugin/browser_plugin_guest.h" 5 #include "content/browser/browser_plugin/browser_plugin_guest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 MEDIA_DEVICE_INVALID_STATE, 1126 MEDIA_DEVICE_INVALID_STATE,
1127 scoped_ptr<MediaStreamUI>()); 1127 scoped_ptr<MediaStreamUI>());
1128 return; 1128 return;
1129 } 1129 }
1130 1130
1131 delegate_->RequestMediaAccessPermission(request, callback); 1131 delegate_->RequestMediaAccessPermission(request, callback);
1132 } 1132 }
1133 1133
1134 bool BrowserPluginGuest::PreHandleGestureEvent( 1134 bool BrowserPluginGuest::PreHandleGestureEvent(
1135 WebContents* source, const blink::WebGestureEvent& event) { 1135 WebContents* source, const blink::WebGestureEvent& event) {
1136 return event.type == blink::WebGestureEvent::GesturePinchBegin || 1136 if (!delegate_)
1137 event.type == blink::WebGestureEvent::GesturePinchUpdate || 1137 return false;
1138 event.type == blink::WebGestureEvent::GesturePinchEnd; 1138
1139 return delegate_->PreHandleGestureEvent(source, event);
1139 } 1140 }
1140 1141
1141 void BrowserPluginGuest::OnUpdateRect( 1142 void BrowserPluginGuest::OnUpdateRect(
1142 const ViewHostMsg_UpdateRect_Params& params) { 1143 const ViewHostMsg_UpdateRect_Params& params) {
1143 BrowserPluginMsg_UpdateRect_Params relay_params; 1144 BrowserPluginMsg_UpdateRect_Params relay_params;
1144 relay_params.view_size = params.view_size; 1145 relay_params.view_size = params.view_size;
1145 relay_params.scale_factor = params.scale_factor; 1146 relay_params.scale_factor = params.scale_factor;
1146 relay_params.is_resize_ack = ViewHostMsg_UpdateRect_Flags::is_resize_ack( 1147 relay_params.is_resize_ack = ViewHostMsg_UpdateRect_Flags::is_resize_ack(
1147 params.flags); 1148 params.flags);
1148 1149
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 void BrowserPluginGuest::OnImeCompositionRangeChanged( 1183 void BrowserPluginGuest::OnImeCompositionRangeChanged(
1183 const gfx::Range& range, 1184 const gfx::Range& range,
1184 const std::vector<gfx::Rect>& character_bounds) { 1185 const std::vector<gfx::Rect>& character_bounds) {
1185 static_cast<RenderWidgetHostViewBase*>( 1186 static_cast<RenderWidgetHostViewBase*>(
1186 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( 1187 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged(
1187 range, character_bounds); 1188 range, character_bounds);
1188 } 1189 }
1189 #endif 1190 #endif
1190 1191
1191 } // namespace content 1192 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698