Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1189)

Side by Side Diff: chrome/browser/ui/webui/inspect_ui.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/macros.h" 7 #include "base/macros.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "chrome/browser/devtools/devtools_targets_ui.h" 9 #include "chrome/browser/devtools/devtools_targets_ui.h"
10 #include "chrome/browser/devtools/devtools_ui_bindings.h" 10 #include "chrome/browser/devtools/devtools_ui_bindings.h"
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 // Fetch agent host from remote browser. 363 // Fetch agent host from remote browser.
364 scoped_refptr<content::DevToolsAgentHost> agent_host = 364 scoped_refptr<content::DevToolsAgentHost> agent_host =
365 handler->GetBrowserAgentHost(browser_id); 365 handler->GetBrowserAgentHost(browser_id);
366 if (agent_host->IsAttached()) 366 if (agent_host->IsAttached())
367 return; 367 return;
368 368
369 // Create web contents for the front-end. 369 // Create web contents for the front-end.
370 WebContents* inspect_ui = web_ui()->GetWebContents(); 370 WebContents* inspect_ui = web_ui()->GetWebContents();
371 WebContents* front_end = inspect_ui->GetDelegate()->OpenURLFromTab( 371 WebContents* front_end = inspect_ui->GetDelegate()->OpenURLFromTab(
372 inspect_ui, 372 inspect_ui,
373 content::OpenURLParams(frontend_url, 373 content::OpenURLParams(frontend_url, content::Referrer(),
374 content::Referrer(), 374 WindowOpenDisposition::NEW_FOREGROUND_TAB,
375 NEW_FOREGROUND_TAB, 375 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, false));
376 ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
377 false));
378 376
379 // Install devtools bindings. 377 // Install devtools bindings.
380 DevToolsUIBindingsEnabler* bindings_enabler = 378 DevToolsUIBindingsEnabler* bindings_enabler =
381 new DevToolsUIBindingsEnabler(front_end, frontend_url); 379 new DevToolsUIBindingsEnabler(front_end, frontend_url);
382 bindings_enabler->GetBindings()->AttachTo(agent_host); 380 bindings_enabler->GetBindings()->AttachTo(agent_host);
383 } 381 }
384 382
385 void InspectUI::InspectDevices(Browser* browser) { 383 void InspectUI::InspectDevices(Browser* browser) {
386 content::RecordAction(base::UserMetricsAction("InspectDevices")); 384 content::RecordAction(base::UserMetricsAction("InspectDevices"));
387 chrome::NavigateParams params(chrome::GetSingletonTabNavigateParams( 385 chrome::NavigateParams params(chrome::GetSingletonTabNavigateParams(
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 handler->ForceUpdate(); 565 handler->ForceUpdate();
568 } 566 }
569 567
570 void InspectUI::PopulatePortStatus(const base::Value& status) { 568 void InspectUI::PopulatePortStatus(const base::Value& status) {
571 web_ui()->CallJavascriptFunctionUnsafe("populatePortStatus", status); 569 web_ui()->CallJavascriptFunctionUnsafe("populatePortStatus", status);
572 } 570 }
573 571
574 void InspectUI::ShowIncognitoWarning() { 572 void InspectUI::ShowIncognitoWarning() {
575 web_ui()->CallJavascriptFunctionUnsafe("showIncognitoWarning"); 573 web_ui()->CallJavascriptFunctionUnsafe("showIncognitoWarning");
576 } 574 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc ('k') | chrome/browser/ui/webui/inspect_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698