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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 if (agent_host->IsAttached()) | 342 if (agent_host->IsAttached()) |
343 return; | 343 return; |
344 | 344 |
345 // Create web contents for the front-end. | 345 // Create web contents for the front-end. |
346 WebContents* inspect_ui = web_ui()->GetWebContents(); | 346 WebContents* inspect_ui = web_ui()->GetWebContents(); |
347 WebContents* front_end = inspect_ui->GetDelegate()->OpenURLFromTab( | 347 WebContents* front_end = inspect_ui->GetDelegate()->OpenURLFromTab( |
348 inspect_ui, | 348 inspect_ui, |
349 content::OpenURLParams(frontend_url, | 349 content::OpenURLParams(frontend_url, |
350 content::Referrer(), | 350 content::Referrer(), |
351 NEW_FOREGROUND_TAB, | 351 NEW_FOREGROUND_TAB, |
352 content::PAGE_TRANSITION_AUTO_TOPLEVEL, | 352 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, |
353 false)); | 353 false)); |
354 | 354 |
355 // Install devtools bindings. | 355 // Install devtools bindings. |
356 DevToolsUIBindingsEnabler* bindings_enabler = | 356 DevToolsUIBindingsEnabler* bindings_enabler = |
357 new DevToolsUIBindingsEnabler(front_end, frontend_url); | 357 new DevToolsUIBindingsEnabler(front_end, frontend_url); |
358 bindings_enabler->GetBindings()->AttachTo(agent_host); | 358 bindings_enabler->GetBindings()->AttachTo(agent_host); |
359 } | 359 } |
360 | 360 |
361 void InspectUI::InspectDevices(Browser* browser) { | 361 void InspectUI::InspectDevices(Browser* browser) { |
362 content::RecordAction(base::UserMetricsAction("InspectDevices")); | 362 content::RecordAction(base::UserMetricsAction("InspectDevices")); |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 handler->ForceUpdate(); | 551 handler->ForceUpdate(); |
552 } | 552 } |
553 | 553 |
554 void InspectUI::PopulatePortStatus(const base::Value& status) { | 554 void InspectUI::PopulatePortStatus(const base::Value& status) { |
555 web_ui()->CallJavascriptFunction("populatePortStatus", status); | 555 web_ui()->CallJavascriptFunction("populatePortStatus", status); |
556 } | 556 } |
557 | 557 |
558 void InspectUI::ShowIncognitoWarning() { | 558 void InspectUI::ShowIncognitoWarning() { |
559 web_ui()->CallJavascriptFunction("showIncognitoWarning"); | 559 web_ui()->CallJavascriptFunction("showIncognitoWarning"); |
560 } | 560 } |
OLD | NEW |