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

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

Issue 10693064: Make file chooser work when DevTools window is docked to the inspected tab (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/debugger/devtools_window.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
11 #include "base/stringprintf.h" 11 #include "base/stringprintf.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/debugger/devtools_window.h" 15 #include "chrome/browser/debugger/devtools_window.h"
16 #include "chrome/browser/extensions/extension_service.h" 16 #include "chrome/browser/extensions/extension_service.h"
17 #include "chrome/browser/file_select_helper.h"
17 #include "chrome/browser/prefs/pref_service.h" 18 #include "chrome/browser/prefs/pref_service.h"
18 #include "chrome/browser/prefs/scoped_user_pref_update.h" 19 #include "chrome/browser/prefs/scoped_user_pref_update.h"
19 #include "chrome/browser/profiles/profile.h" 20 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/sessions/restore_tab_helper.h" 21 #include "chrome/browser/sessions/restore_tab_helper.h"
21 #include "chrome/browser/themes/theme_service.h" 22 #include "chrome/browser/themes/theme_service.h"
22 #include "chrome/browser/themes/theme_service_factory.h" 23 #include "chrome/browser/themes/theme_service_factory.h"
23 #include "chrome/browser/ui/browser.h" 24 #include "chrome/browser/ui/browser.h"
24 #include "chrome/browser/ui/browser_list.h" 25 #include "chrome/browser/ui/browser_list.h"
25 #include "chrome/browser/ui/browser_tabstrip.h" 26 #include "chrome/browser/ui/browser_tabstrip.h"
26 #include "chrome/browser/ui/browser_window.h" 27 #include "chrome/browser/ui/browser_window.h"
(...skipping 23 matching lines...) Expand all
50 typedef std::vector<DevToolsWindow*> DevToolsWindowList; 51 typedef std::vector<DevToolsWindow*> DevToolsWindowList;
51 namespace { 52 namespace {
52 base::LazyInstance<DevToolsWindowList>::Leaky 53 base::LazyInstance<DevToolsWindowList>::Leaky
53 g_instances = LAZY_INSTANCE_INITIALIZER; 54 g_instances = LAZY_INSTANCE_INITIALIZER;
54 } // namespace 55 } // namespace
55 56
56 using content::DevToolsAgentHost; 57 using content::DevToolsAgentHost;
57 using content::DevToolsAgentHostRegistry; 58 using content::DevToolsAgentHostRegistry;
58 using content::DevToolsClientHost; 59 using content::DevToolsClientHost;
59 using content::DevToolsManager; 60 using content::DevToolsManager;
61 using content::FileChooserParams;
60 using content::NativeWebKeyboardEvent; 62 using content::NativeWebKeyboardEvent;
61 using content::NavigationController; 63 using content::NavigationController;
62 using content::NavigationEntry; 64 using content::NavigationEntry;
63 using content::OpenURLParams; 65 using content::OpenURLParams;
64 using content::RenderViewHost; 66 using content::RenderViewHost;
65 using content::WebContents; 67 using content::WebContents;
66 68
67 const char DevToolsWindow::kDevToolsApp[] = "DevToolsApp"; 69 const char DevToolsWindow::kDevToolsApp[] = "DevToolsApp";
68 70
69 const char kDockSideBottom[] = "bottom"; 71 const char kDockSideBottom[] = "bottom";
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 CallClientFunction("InspectorFrontendAPI.appendedToURL", &url_value); 746 CallClientFunction("InspectorFrontendAPI.appendedToURL", &url_value);
745 } 747 }
746 748
747 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { 749 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() {
748 if (inspected_tab_ && inspected_tab_->web_contents()->GetDelegate()) { 750 if (inspected_tab_ && inspected_tab_->web_contents()->GetDelegate()) {
749 return inspected_tab_->web_contents()->GetDelegate()-> 751 return inspected_tab_->web_contents()->GetDelegate()->
750 GetJavaScriptDialogCreator(); 752 GetJavaScriptDialogCreator();
751 } 753 }
752 return content::WebContentsDelegate::GetJavaScriptDialogCreator(); 754 return content::WebContentsDelegate::GetJavaScriptDialogCreator();
753 } 755 }
756
757 void DevToolsWindow::RunFileChooser(WebContents* web_contents,
758 const FileChooserParams& params) {
759 FileSelectHelper::RunFileChooser(web_contents, params);
760 }
761
OLDNEW
« no previous file with comments | « chrome/browser/debugger/devtools_window.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698