| 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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 | 811 |
| 812 content::JavaScriptDialogManager* DevToolsWindow::GetJavaScriptDialogManager() { | 812 content::JavaScriptDialogManager* DevToolsWindow::GetJavaScriptDialogManager() { |
| 813 content::WebContents* inspected_web_contents = GetInspectedWebContents(); | 813 content::WebContents* inspected_web_contents = GetInspectedWebContents(); |
| 814 return (inspected_web_contents && inspected_web_contents->GetDelegate()) ? | 814 return (inspected_web_contents && inspected_web_contents->GetDelegate()) ? |
| 815 inspected_web_contents->GetDelegate()->GetJavaScriptDialogManager() : | 815 inspected_web_contents->GetDelegate()->GetJavaScriptDialogManager() : |
| 816 content::WebContentsDelegate::GetJavaScriptDialogManager(); | 816 content::WebContentsDelegate::GetJavaScriptDialogManager(); |
| 817 } | 817 } |
| 818 | 818 |
| 819 content::ColorChooser* DevToolsWindow::OpenColorChooser( | 819 content::ColorChooser* DevToolsWindow::OpenColorChooser( |
| 820 content::WebContents* web_contents, | 820 content::WebContents* web_contents, |
| 821 SkColor initial_color) { | 821 SkColor initial_color, |
| 822 const std::vector<SkColor>& suggestions, |
| 823 const std::vector<string16>& suggestion_labels) { |
| 822 return chrome::ShowColorChooser(web_contents, initial_color); | 824 return chrome::ShowColorChooser(web_contents, initial_color); |
| 823 } | 825 } |
| 824 | 826 |
| 825 void DevToolsWindow::RunFileChooser(content::WebContents* web_contents, | 827 void DevToolsWindow::RunFileChooser(content::WebContents* web_contents, |
| 826 const content::FileChooserParams& params) { | 828 const content::FileChooserParams& params) { |
| 827 FileSelectHelper::RunFileChooser(web_contents, params); | 829 FileSelectHelper::RunFileChooser(web_contents, params); |
| 828 } | 830 } |
| 829 | 831 |
| 830 void DevToolsWindow::WebContentsFocused(content::WebContents* contents) { | 832 void DevToolsWindow::WebContentsFocused(content::WebContents* contents) { |
| 831 Browser* inspected_browser = NULL; | 833 Browser* inspected_browser = NULL; |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1328 | 1330 |
| 1329 void DevToolsWindow::Restore() { | 1331 void DevToolsWindow::Restore() { |
| 1330 if (dock_side_ == DEVTOOLS_DOCK_SIDE_MINIMIZED) | 1332 if (dock_side_ == DEVTOOLS_DOCK_SIDE_MINIMIZED) |
| 1331 SetDockSide(SideToString(dock_side_before_minimized_)); | 1333 SetDockSide(SideToString(dock_side_before_minimized_)); |
| 1332 } | 1334 } |
| 1333 | 1335 |
| 1334 content::WebContents* DevToolsWindow::GetInspectedWebContents() { | 1336 content::WebContents* DevToolsWindow::GetInspectedWebContents() { |
| 1335 return inspected_contents_observer_ ? | 1337 return inspected_contents_observer_ ? |
| 1336 inspected_contents_observer_->web_contents() : NULL; | 1338 inspected_contents_observer_->web_contents() : NULL; |
| 1337 } | 1339 } |
| OLD | NEW |