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_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 | 804 |
805 content::JavaScriptDialogManager* DevToolsWindow::GetJavaScriptDialogManager() { | 805 content::JavaScriptDialogManager* DevToolsWindow::GetJavaScriptDialogManager() { |
806 content::WebContents* inspected_web_contents = GetInspectedWebContents(); | 806 content::WebContents* inspected_web_contents = GetInspectedWebContents(); |
807 return (inspected_web_contents && inspected_web_contents->GetDelegate()) ? | 807 return (inspected_web_contents && inspected_web_contents->GetDelegate()) ? |
808 inspected_web_contents->GetDelegate()->GetJavaScriptDialogManager() : | 808 inspected_web_contents->GetDelegate()->GetJavaScriptDialogManager() : |
809 content::WebContentsDelegate::GetJavaScriptDialogManager(); | 809 content::WebContentsDelegate::GetJavaScriptDialogManager(); |
810 } | 810 } |
811 | 811 |
812 content::ColorChooser* DevToolsWindow::OpenColorChooser( | 812 content::ColorChooser* DevToolsWindow::OpenColorChooser( |
813 content::WebContents* web_contents, | 813 content::WebContents* web_contents, |
814 SkColor initial_color) { | 814 SkColor initial_color, |
| 815 const std::vector<SkColor>& suggestions, |
| 816 const std::vector<string16>& suggestion_labels) { |
815 return chrome::ShowColorChooser(web_contents, initial_color); | 817 return chrome::ShowColorChooser(web_contents, initial_color); |
816 } | 818 } |
817 | 819 |
818 void DevToolsWindow::RunFileChooser(content::WebContents* web_contents, | 820 void DevToolsWindow::RunFileChooser(content::WebContents* web_contents, |
819 const content::FileChooserParams& params) { | 821 const content::FileChooserParams& params) { |
820 FileSelectHelper::RunFileChooser(web_contents, params); | 822 FileSelectHelper::RunFileChooser(web_contents, params); |
821 } | 823 } |
822 | 824 |
823 void DevToolsWindow::WebContentsFocused(content::WebContents* contents) { | 825 void DevToolsWindow::WebContentsFocused(content::WebContents* contents) { |
824 Browser* inspected_browser = NULL; | 826 Browser* inspected_browser = NULL; |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 | 1323 |
1322 void DevToolsWindow::Restore() { | 1324 void DevToolsWindow::Restore() { |
1323 if (dock_side_ == DEVTOOLS_DOCK_SIDE_MINIMIZED) | 1325 if (dock_side_ == DEVTOOLS_DOCK_SIDE_MINIMIZED) |
1324 SetDockSide(SideToString(dock_side_before_minimized_)); | 1326 SetDockSide(SideToString(dock_side_before_minimized_)); |
1325 } | 1327 } |
1326 | 1328 |
1327 content::WebContents* DevToolsWindow::GetInspectedWebContents() { | 1329 content::WebContents* DevToolsWindow::GetInspectedWebContents() { |
1328 return inspected_contents_observer_ ? | 1330 return inspected_contents_observer_ ? |
1329 inspected_contents_observer_->web_contents() : NULL; | 1331 inspected_contents_observer_->web_contents() : NULL; |
1330 } | 1332 } |
OLD | NEW |