| 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/ui/webui/inspect_ui.h" | 5 #include "chrome/browser/ui/webui/inspect_ui.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "chrome/browser/devtools/devtools_target_impl.h" | 9 #include "chrome/browser/devtools/devtools_target_impl.h" |
| 10 #include "chrome/browser/devtools/devtools_targets_ui.h" | 10 #include "chrome/browser/devtools/devtools_targets_ui.h" |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 NEW_FOREGROUND_TAB, | 288 NEW_FOREGROUND_TAB, |
| 289 content::PAGE_TRANSITION_AUTO_TOPLEVEL, | 289 content::PAGE_TRANSITION_AUTO_TOPLEVEL, |
| 290 false)); | 290 false)); |
| 291 | 291 |
| 292 // Install devtools bindings. | 292 // Install devtools bindings. |
| 293 DevToolsUIBindings* bindings = new DevToolsUIBindings(front_end, | 293 DevToolsUIBindings* bindings = new DevToolsUIBindings(front_end, |
| 294 frontend_url); | 294 frontend_url); |
| 295 | 295 |
| 296 // Engage remote debugging between front-end and agent host. | 296 // Engage remote debugging between front-end and agent host. |
| 297 content::DevToolsManager::GetInstance()->RegisterDevToolsClientHostFor( | 297 content::DevToolsManager::GetInstance()->RegisterDevToolsClientHostFor( |
| 298 agent_host, bindings->frontend_host()); | 298 agent_host, bindings); |
| 299 } | 299 } |
| 300 | 300 |
| 301 void InspectUI::InspectDevices(Browser* browser) { | 301 void InspectUI::InspectDevices(Browser* browser) { |
| 302 content::RecordAction(base::UserMetricsAction("InspectDevices")); | 302 content::RecordAction(base::UserMetricsAction("InspectDevices")); |
| 303 chrome::NavigateParams params(chrome::GetSingletonTabNavigateParams( | 303 chrome::NavigateParams params(chrome::GetSingletonTabNavigateParams( |
| 304 browser, GURL(chrome::kChromeUIInspectURL))); | 304 browser, GURL(chrome::kChromeUIInspectURL))); |
| 305 params.path_behavior = chrome::NavigateParams::IGNORE_AND_NAVIGATE; | 305 params.path_behavior = chrome::NavigateParams::IGNORE_AND_NAVIGATE; |
| 306 ShowSingletonTabOverwritingNTP(browser, params); | 306 ShowSingletonTabOverwritingNTP(browser, params); |
| 307 } | 307 } |
| 308 | 308 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 targets); | 482 targets); |
| 483 } | 483 } |
| 484 | 484 |
| 485 void InspectUI::PopulatePortStatus(const base::Value& status) { | 485 void InspectUI::PopulatePortStatus(const base::Value& status) { |
| 486 web_ui()->CallJavascriptFunction("populatePortStatus", status); | 486 web_ui()->CallJavascriptFunction("populatePortStatus", status); |
| 487 } | 487 } |
| 488 | 488 |
| 489 void InspectUI::ShowIncognitoWarning() { | 489 void InspectUI::ShowIncognitoWarning() { |
| 490 web_ui()->CallJavascriptFunction("showIncognitoWarning"); | 490 web_ui()->CallJavascriptFunction("showIncognitoWarning"); |
| 491 } | 491 } |
| OLD | NEW |