| 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 inspect_ui, | 336 inspect_ui, |
| 337 content::OpenURLParams(frontend_url, | 337 content::OpenURLParams(frontend_url, |
| 338 content::Referrer(), | 338 content::Referrer(), |
| 339 NEW_FOREGROUND_TAB, | 339 NEW_FOREGROUND_TAB, |
| 340 content::PAGE_TRANSITION_AUTO_TOPLEVEL, | 340 content::PAGE_TRANSITION_AUTO_TOPLEVEL, |
| 341 false)); | 341 false)); |
| 342 | 342 |
| 343 // Install devtools bindings. | 343 // Install devtools bindings. |
| 344 DevToolsUIBindingsEnabler* bindings_enabler = | 344 DevToolsUIBindingsEnabler* bindings_enabler = |
| 345 new DevToolsUIBindingsEnabler(front_end, frontend_url); | 345 new DevToolsUIBindingsEnabler(front_end, frontend_url); |
| 346 bindings_enabler->GetBindings()->AttachTo(agent_host.get()); | 346 bindings_enabler->GetBindings()->AttachTo(agent_host); |
| 347 } | 347 } |
| 348 | 348 |
| 349 void InspectUI::InspectDevices(Browser* browser) { | 349 void InspectUI::InspectDevices(Browser* browser) { |
| 350 content::RecordAction(base::UserMetricsAction("InspectDevices")); | 350 content::RecordAction(base::UserMetricsAction("InspectDevices")); |
| 351 chrome::NavigateParams params(chrome::GetSingletonTabNavigateParams( | 351 chrome::NavigateParams params(chrome::GetSingletonTabNavigateParams( |
| 352 browser, GURL(chrome::kChromeUIInspectURL))); | 352 browser, GURL(chrome::kChromeUIInspectURL))); |
| 353 params.path_behavior = chrome::NavigateParams::IGNORE_AND_NAVIGATE; | 353 params.path_behavior = chrome::NavigateParams::IGNORE_AND_NAVIGATE; |
| 354 ShowSingletonTabOverwritingNTP(browser, params); | 354 ShowSingletonTabOverwritingNTP(browser, params); |
| 355 } | 355 } |
| 356 | 356 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 targets); | 530 targets); |
| 531 } | 531 } |
| 532 | 532 |
| 533 void InspectUI::PopulatePortStatus(const base::Value& status) { | 533 void InspectUI::PopulatePortStatus(const base::Value& status) { |
| 534 web_ui()->CallJavascriptFunction("populatePortStatus", status); | 534 web_ui()->CallJavascriptFunction("populatePortStatus", status); |
| 535 } | 535 } |
| 536 | 536 |
| 537 void InspectUI::ShowIncognitoWarning() { | 537 void InspectUI::ShowIncognitoWarning() { |
| 538 web_ui()->CallJavascriptFunction("showIncognitoWarning"); | 538 web_ui()->CallJavascriptFunction("showIncognitoWarning"); |
| 539 } | 539 } |
| OLD | NEW |