| OLD | NEW |
| 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 "chrome/browser/devtools/devtools_window.h" | 5 #include "chrome/browser/devtools/devtools_window.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1020 : content::WebContentsDelegate::GetJavaScriptDialogManager(source); | 1020 : content::WebContentsDelegate::GetJavaScriptDialogManager(source); |
| 1021 } | 1021 } |
| 1022 | 1022 |
| 1023 content::ColorChooser* DevToolsWindow::OpenColorChooser( | 1023 content::ColorChooser* DevToolsWindow::OpenColorChooser( |
| 1024 WebContents* web_contents, | 1024 WebContents* web_contents, |
| 1025 SkColor initial_color, | 1025 SkColor initial_color, |
| 1026 const std::vector<content::ColorSuggestion>& suggestions) { | 1026 const std::vector<content::ColorSuggestion>& suggestions) { |
| 1027 return chrome::ShowColorChooser(web_contents, initial_color); | 1027 return chrome::ShowColorChooser(web_contents, initial_color); |
| 1028 } | 1028 } |
| 1029 | 1029 |
| 1030 void DevToolsWindow::RunFileChooser(WebContents* web_contents, | 1030 void DevToolsWindow::RunFileChooser(content::RenderFrameHost* render_frame_host, |
| 1031 const content::FileChooserParams& params) { | 1031 const content::FileChooserParams& params) { |
| 1032 FileSelectHelper::RunFileChooser(web_contents, params); | 1032 FileSelectHelper::RunFileChooser(render_frame_host, params); |
| 1033 } | 1033 } |
| 1034 | 1034 |
| 1035 bool DevToolsWindow::PreHandleGestureEvent( | 1035 bool DevToolsWindow::PreHandleGestureEvent( |
| 1036 WebContents* source, | 1036 WebContents* source, |
| 1037 const blink::WebGestureEvent& event) { | 1037 const blink::WebGestureEvent& event) { |
| 1038 // Disable pinch zooming. | 1038 // Disable pinch zooming. |
| 1039 return event.type == blink::WebGestureEvent::GesturePinchBegin || | 1039 return event.type == blink::WebGestureEvent::GesturePinchBegin || |
| 1040 event.type == blink::WebGestureEvent::GesturePinchUpdate || | 1040 event.type == blink::WebGestureEvent::GesturePinchUpdate || |
| 1041 event.type == blink::WebGestureEvent::GesturePinchEnd; | 1041 event.type == blink::WebGestureEvent::GesturePinchEnd; |
| 1042 } | 1042 } |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1299 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) { | 1299 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) { |
| 1300 // Only route reload via front-end if the agent is attached. | 1300 // Only route reload via front-end if the agent is attached. |
| 1301 WebContents* wc = GetInspectedWebContents(); | 1301 WebContents* wc = GetInspectedWebContents(); |
| 1302 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING) | 1302 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING) |
| 1303 return false; | 1303 return false; |
| 1304 base::FundamentalValue bypass_cache_value(bypass_cache); | 1304 base::FundamentalValue bypass_cache_value(bypass_cache); |
| 1305 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage", | 1305 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage", |
| 1306 &bypass_cache_value, nullptr, nullptr); | 1306 &bypass_cache_value, nullptr, nullptr); |
| 1307 return true; | 1307 return true; |
| 1308 } | 1308 } |
| OLD | NEW |