| OLD | NEW |
| 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 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1255 if (rwhv) { | 1255 if (rwhv) { |
| 1256 validation_message_bubble_->SetPositionRelativeToAnchor( | 1256 validation_message_bubble_->SetPositionRelativeToAnchor( |
| 1257 rwhv->GetRenderWidgetHost(), anchor_in_root_view); | 1257 rwhv->GetRenderWidgetHost(), anchor_in_root_view); |
| 1258 } | 1258 } |
| 1259 } | 1259 } |
| 1260 | 1260 |
| 1261 bool Browser::PreHandleGestureEvent(content::WebContents* source, | 1261 bool Browser::PreHandleGestureEvent(content::WebContents* source, |
| 1262 const blink::WebGestureEvent& event) { | 1262 const blink::WebGestureEvent& event) { |
| 1263 // Disable pinch zooming in undocked dev tools window due to poor UX. | 1263 // Disable pinch zooming in undocked dev tools window due to poor UX. |
| 1264 if (app_name() == DevToolsWindow::kDevToolsApp) | 1264 if (app_name() == DevToolsWindow::kDevToolsApp) |
| 1265 return event.type == blink::WebGestureEvent::GesturePinchBegin || | 1265 return event.type() == blink::WebGestureEvent::GesturePinchBegin || |
| 1266 event.type == blink::WebGestureEvent::GesturePinchUpdate || | 1266 event.type() == blink::WebGestureEvent::GesturePinchUpdate || |
| 1267 event.type == blink::WebGestureEvent::GesturePinchEnd; | 1267 event.type() == blink::WebGestureEvent::GesturePinchEnd; |
| 1268 | 1268 |
| 1269 return false; | 1269 return false; |
| 1270 } | 1270 } |
| 1271 | 1271 |
| 1272 bool Browser::CanDragEnter(content::WebContents* source, | 1272 bool Browser::CanDragEnter(content::WebContents* source, |
| 1273 const content::DropData& data, | 1273 const content::DropData& data, |
| 1274 blink::WebDragOperationsMask operations_allowed) { | 1274 blink::WebDragOperationsMask operations_allowed) { |
| 1275 // Disallow drag-and-drop navigation for Settings windows which do not support | 1275 // Disallow drag-and-drop navigation for Settings windows which do not support |
| 1276 // external navigation. | 1276 // external navigation. |
| 1277 if ((operations_allowed & blink::WebDragOperationLink) && | 1277 if ((operations_allowed & blink::WebDragOperationLink) && |
| (...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2585 // new window later, thus we need to navigate the window now. | 2585 // new window later, thus we need to navigate the window now. |
| 2586 if (contents) { | 2586 if (contents) { |
| 2587 contents->web_contents()->GetController().LoadURL( | 2587 contents->web_contents()->GetController().LoadURL( |
| 2588 target_url, content::Referrer(), ui::PAGE_TRANSITION_LINK, | 2588 target_url, content::Referrer(), ui::PAGE_TRANSITION_LINK, |
| 2589 std::string()); // No extra headers. | 2589 std::string()); // No extra headers. |
| 2590 } | 2590 } |
| 2591 } | 2591 } |
| 2592 | 2592 |
| 2593 return contents != NULL; | 2593 return contents != NULL; |
| 2594 } | 2594 } |
| OLD | NEW |