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

Side by Side Diff: extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc

Issue 2861373004: Add blink::WebInputEvent::IsPinchGestureEventType(). (Closed)
Patch Set: rebase Created 3 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 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 "extensions/browser/guest_view/mime_handler_view/mime_handler_view_gues t.h" 5 #include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_gues t.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "components/guest_view/common/guest_view_constants.h" 10 #include "components/guest_view/common/guest_view_constants.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 const content::ContextMenuParams& params) { 234 const content::ContextMenuParams& params) {
235 if (delegate_) 235 if (delegate_)
236 return delegate_->HandleContextMenu(web_contents(), params); 236 return delegate_->HandleContextMenu(web_contents(), params);
237 237
238 return false; 238 return false;
239 } 239 }
240 240
241 bool MimeHandlerViewGuest::PreHandleGestureEvent( 241 bool MimeHandlerViewGuest::PreHandleGestureEvent(
242 WebContents* source, 242 WebContents* source,
243 const blink::WebGestureEvent& event) { 243 const blink::WebGestureEvent& event) {
244 if (event.GetType() == blink::WebGestureEvent::kGesturePinchBegin || 244 if (blink::WebInputEvent::IsPinchGestureEventType(event.GetType())) {
245 event.GetType() == blink::WebGestureEvent::kGesturePinchUpdate ||
246 event.GetType() == blink::WebGestureEvent::kGesturePinchEnd) {
247 // If we're an embedded plugin we drop pinch-gestures to avoid zooming the 245 // If we're an embedded plugin we drop pinch-gestures to avoid zooming the
248 // guest. 246 // guest.
249 return !is_full_page_plugin(); 247 return !is_full_page_plugin();
250 } 248 }
251 return false; 249 return false;
252 } 250 }
253 251
254 content::JavaScriptDialogManager* 252 content::JavaScriptDialogManager*
255 MimeHandlerViewGuest::GetJavaScriptDialogManager( 253 MimeHandlerViewGuest::GetJavaScriptDialogManager(
256 WebContents* source) { 254 WebContents* source) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 } 295 }
298 } 296 }
299 297
300 base::WeakPtr<StreamContainer> MimeHandlerViewGuest::GetStream() const { 298 base::WeakPtr<StreamContainer> MimeHandlerViewGuest::GetStream() const {
301 if (!stream_) 299 if (!stream_)
302 return base::WeakPtr<StreamContainer>(); 300 return base::WeakPtr<StreamContainer>();
303 return stream_->GetWeakPtr(); 301 return stream_->GetWeakPtr();
304 } 302 }
305 303
306 } // namespace extensions 304 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/app_window/app_web_contents_helper.cc ('k') | third_party/WebKit/Source/web/DevToolsEmulator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698