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

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

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Fix nits Created 3 years, 11 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 const content::ContextMenuParams& params) { 238 const content::ContextMenuParams& params) {
239 if (delegate_) 239 if (delegate_)
240 return delegate_->HandleContextMenu(web_contents(), params); 240 return delegate_->HandleContextMenu(web_contents(), params);
241 241
242 return false; 242 return false;
243 } 243 }
244 244
245 bool MimeHandlerViewGuest::PreHandleGestureEvent( 245 bool MimeHandlerViewGuest::PreHandleGestureEvent(
246 WebContents* source, 246 WebContents* source,
247 const blink::WebGestureEvent& event) { 247 const blink::WebGestureEvent& event) {
248 if (event.type == blink::WebGestureEvent::GesturePinchBegin || 248 if (event.type() == blink::WebGestureEvent::GesturePinchBegin ||
249 event.type == blink::WebGestureEvent::GesturePinchUpdate || 249 event.type() == blink::WebGestureEvent::GesturePinchUpdate ||
250 event.type == blink::WebGestureEvent::GesturePinchEnd) { 250 event.type() == blink::WebGestureEvent::GesturePinchEnd) {
251 // If we're an embedded plugin we drop pinch-gestures to avoid zooming the 251 // If we're an embedded plugin we drop pinch-gestures to avoid zooming the
252 // guest. 252 // guest.
253 return !is_full_page_plugin(); 253 return !is_full_page_plugin();
254 } 254 }
255 return false; 255 return false;
256 } 256 }
257 257
258 content::JavaScriptDialogManager* 258 content::JavaScriptDialogManager*
259 MimeHandlerViewGuest::GetJavaScriptDialogManager( 259 MimeHandlerViewGuest::GetJavaScriptDialogManager(
260 WebContents* source) { 260 WebContents* source) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 301 }
302 } 302 }
303 303
304 base::WeakPtr<StreamContainer> MimeHandlerViewGuest::GetStream() const { 304 base::WeakPtr<StreamContainer> MimeHandlerViewGuest::GetStream() const {
305 if (!stream_) 305 if (!stream_)
306 return base::WeakPtr<StreamContainer>(); 306 return base::WeakPtr<StreamContainer>();
307 return stream_->GetWeakPtr(); 307 return stream_->GetWeakPtr();
308 } 308 }
309 309
310 } // namespace extensions 310 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/app_window/app_web_contents_helper.cc ('k') | extensions/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698