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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Created 4 years 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 if (rwhv) { 1250 if (rwhv) {
1251 validation_message_bubble_->SetPositionRelativeToAnchor( 1251 validation_message_bubble_->SetPositionRelativeToAnchor(
1252 rwhv->GetRenderWidgetHost(), anchor_in_root_view); 1252 rwhv->GetRenderWidgetHost(), anchor_in_root_view);
1253 } 1253 }
1254 } 1254 }
1255 1255
1256 bool Browser::PreHandleGestureEvent(content::WebContents* source, 1256 bool Browser::PreHandleGestureEvent(content::WebContents* source,
1257 const blink::WebGestureEvent& event) { 1257 const blink::WebGestureEvent& event) {
1258 // Disable pinch zooming in undocked dev tools window due to poor UX. 1258 // Disable pinch zooming in undocked dev tools window due to poor UX.
1259 if (app_name() == DevToolsWindow::kDevToolsApp) 1259 if (app_name() == DevToolsWindow::kDevToolsApp)
1260 return event.type == blink::WebGestureEvent::GesturePinchBegin || 1260 return event.type() == blink::WebGestureEvent::GesturePinchBegin ||
1261 event.type == blink::WebGestureEvent::GesturePinchUpdate || 1261 event.type() == blink::WebGestureEvent::GesturePinchUpdate ||
1262 event.type == blink::WebGestureEvent::GesturePinchEnd; 1262 event.type() == blink::WebGestureEvent::GesturePinchEnd;
1263 1263
1264 return false; 1264 return false;
1265 } 1265 }
1266 1266
1267 bool Browser::CanDragEnter(content::WebContents* source, 1267 bool Browser::CanDragEnter(content::WebContents* source,
1268 const content::DropData& data, 1268 const content::DropData& data,
1269 blink::WebDragOperationsMask operations_allowed) { 1269 blink::WebDragOperationsMask operations_allowed) {
1270 // Disallow drag-and-drop navigation for Settings windows which do not support 1270 // Disallow drag-and-drop navigation for Settings windows which do not support
1271 // external navigation. 1271 // external navigation.
1272 if ((operations_allowed & blink::WebDragOperationLink) && 1272 if ((operations_allowed & blink::WebDragOperationLink) &&
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after
2600 // new window later, thus we need to navigate the window now. 2600 // new window later, thus we need to navigate the window now.
2601 if (contents) { 2601 if (contents) {
2602 contents->web_contents()->GetController().LoadURL( 2602 contents->web_contents()->GetController().LoadURL(
2603 target_url, content::Referrer(), ui::PAGE_TRANSITION_LINK, 2603 target_url, content::Referrer(), ui::PAGE_TRANSITION_LINK,
2604 std::string()); // No extra headers. 2604 std::string()); // No extra headers.
2605 } 2605 }
2606 } 2606 }
2607 2607
2608 return contents != NULL; 2608 return contents != NULL;
2609 } 2609 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698