| 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 #include "chrome/browser/devtools/devtools_window.h" | 4 #include "chrome/browser/devtools/devtools_window.h" |
| 5 | 5 |
| 6 #include <algorithm> | 6 #include <algorithm> |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 | 845 |
| 846 content::JavaScriptDialogManager* DevToolsWindow::GetJavaScriptDialogManager() { | 846 content::JavaScriptDialogManager* DevToolsWindow::GetJavaScriptDialogManager() { |
| 847 content::WebContents* inspected_web_contents = GetInspectedWebContents(); | 847 content::WebContents* inspected_web_contents = GetInspectedWebContents(); |
| 848 return (inspected_web_contents && inspected_web_contents->GetDelegate()) ? | 848 return (inspected_web_contents && inspected_web_contents->GetDelegate()) ? |
| 849 inspected_web_contents->GetDelegate()->GetJavaScriptDialogManager() : | 849 inspected_web_contents->GetDelegate()->GetJavaScriptDialogManager() : |
| 850 content::WebContentsDelegate::GetJavaScriptDialogManager(); | 850 content::WebContentsDelegate::GetJavaScriptDialogManager(); |
| 851 } | 851 } |
| 852 | 852 |
| 853 content::ColorChooser* DevToolsWindow::OpenColorChooser( | 853 content::ColorChooser* DevToolsWindow::OpenColorChooser( |
| 854 content::WebContents* web_contents, | 854 content::WebContents* web_contents, |
| 855 SkColor initial_color) { | 855 SkColor initial_color, |
| 856 const std::vector<SkColor>& suggestions, |
| 857 const std::vector<string16>& suggestion_labels) { |
| 856 return chrome::ShowColorChooser(web_contents, initial_color); | 858 return chrome::ShowColorChooser(web_contents, initial_color); |
| 857 } | 859 } |
| 858 | 860 |
| 859 void DevToolsWindow::RunFileChooser(content::WebContents* web_contents, | 861 void DevToolsWindow::RunFileChooser(content::WebContents* web_contents, |
| 860 const content::FileChooserParams& params) { | 862 const content::FileChooserParams& params) { |
| 861 FileSelectHelper::RunFileChooser(web_contents, params); | 863 FileSelectHelper::RunFileChooser(web_contents, params); |
| 862 } | 864 } |
| 863 | 865 |
| 864 void DevToolsWindow::WebContentsFocused(content::WebContents* contents) { | 866 void DevToolsWindow::WebContentsFocused(content::WebContents* contents) { |
| 865 Browser* inspected_browser = NULL; | 867 Browser* inspected_browser = NULL; |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1409 return inspected_contents_observer_ ? | 1411 return inspected_contents_observer_ ? |
| 1410 inspected_contents_observer_->web_contents() : NULL; | 1412 inspected_contents_observer_->web_contents() : NULL; |
| 1411 } | 1413 } |
| 1412 | 1414 |
| 1413 void DevToolsWindow::DocumentOnLoadCompletedInMainFrame() { | 1415 void DevToolsWindow::DocumentOnLoadCompletedInMainFrame() { |
| 1414 is_loaded_ = true; | 1416 is_loaded_ = true; |
| 1415 UpdateTheme(); | 1417 UpdateTheme(); |
| 1416 DoAction(); | 1418 DoAction(); |
| 1417 AddDevToolsExtensionsToClient(); | 1419 AddDevToolsExtensionsToClient(); |
| 1418 } | 1420 } |
| OLD | NEW |