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 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 | 937 |
938 content::JavaScriptDialogManager* DevToolsWindow::GetJavaScriptDialogManager() { | 938 content::JavaScriptDialogManager* DevToolsWindow::GetJavaScriptDialogManager() { |
939 content::WebContents* inspected_web_contents = GetInspectedWebContents(); | 939 content::WebContents* inspected_web_contents = GetInspectedWebContents(); |
940 return (inspected_web_contents && inspected_web_contents->GetDelegate()) ? | 940 return (inspected_web_contents && inspected_web_contents->GetDelegate()) ? |
941 inspected_web_contents->GetDelegate()->GetJavaScriptDialogManager() : | 941 inspected_web_contents->GetDelegate()->GetJavaScriptDialogManager() : |
942 content::WebContentsDelegate::GetJavaScriptDialogManager(); | 942 content::WebContentsDelegate::GetJavaScriptDialogManager(); |
943 } | 943 } |
944 | 944 |
945 content::ColorChooser* DevToolsWindow::OpenColorChooser( | 945 content::ColorChooser* DevToolsWindow::OpenColorChooser( |
946 content::WebContents* web_contents, | 946 content::WebContents* web_contents, |
947 SkColor initial_color) { | 947 SkColor initial_color, |
| 948 const std::vector<content::ColorSuggestion>& suggestions) { |
948 return chrome::ShowColorChooser(web_contents, initial_color); | 949 return chrome::ShowColorChooser(web_contents, initial_color); |
949 } | 950 } |
950 | 951 |
951 void DevToolsWindow::RunFileChooser(content::WebContents* web_contents, | 952 void DevToolsWindow::RunFileChooser(content::WebContents* web_contents, |
952 const content::FileChooserParams& params) { | 953 const content::FileChooserParams& params) { |
953 FileSelectHelper::RunFileChooser(web_contents, params); | 954 FileSelectHelper::RunFileChooser(web_contents, params); |
954 } | 955 } |
955 | 956 |
956 void DevToolsWindow::WebContentsFocused(content::WebContents* contents) { | 957 void DevToolsWindow::WebContentsFocused(content::WebContents* contents) { |
957 Browser* inspected_browser = NULL; | 958 Browser* inspected_browser = NULL; |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1501 return inspected_contents_observer_ ? | 1502 return inspected_contents_observer_ ? |
1502 inspected_contents_observer_->web_contents() : NULL; | 1503 inspected_contents_observer_->web_contents() : NULL; |
1503 } | 1504 } |
1504 | 1505 |
1505 void DevToolsWindow::DocumentOnLoadCompletedInMainFrame() { | 1506 void DevToolsWindow::DocumentOnLoadCompletedInMainFrame() { |
1506 is_loaded_ = true; | 1507 is_loaded_ = true; |
1507 UpdateTheme(); | 1508 UpdateTheme(); |
1508 DoAction(); | 1509 DoAction(); |
1509 AddDevToolsExtensionsToClient(); | 1510 AddDevToolsExtensionsToClient(); |
1510 } | 1511 } |
OLD | NEW |