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

Side by Side Diff: chrome/browser/devtools/devtools_window.cc

Issue 2059533002: Change WebContentsDelegate::RunFileChooser to be frame based. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes based on reviews. Created 4 years, 6 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 (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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_window.h ('k') | chrome/browser/extensions/extension_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698