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

Side by Side Diff: chrome/browser/devtools/chrome_devtools_manager_delegate.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/devtools/chrome_devtools_manager_delegate.h" 5 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/devtools/devtools_network_protocol_handler.h" 9 #include "chrome/browser/devtools/devtools_network_protocol_handler.h"
10 #include "chrome/browser/devtools/devtools_window.h" 10 #include "chrome/browser/devtools/devtools_window.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 host->GetLastCommittedURL().host()); 118 host->GetLastCommittedURL().host());
119 if (extension) 119 if (extension)
120 return extension->name(); 120 return extension->name();
121 return ""; 121 return "";
122 } 122 }
123 123
124 scoped_refptr<content::DevToolsAgentHost> 124 scoped_refptr<content::DevToolsAgentHost>
125 ChromeDevToolsManagerDelegate::CreateNewTarget(const GURL& url) { 125 ChromeDevToolsManagerDelegate::CreateNewTarget(const GURL& url) {
126 chrome::NavigateParams params(ProfileManager::GetLastUsedProfile(), 126 chrome::NavigateParams params(ProfileManager::GetLastUsedProfile(),
127 url, ui::PAGE_TRANSITION_AUTO_TOPLEVEL); 127 url, ui::PAGE_TRANSITION_AUTO_TOPLEVEL);
128 params.disposition = NEW_FOREGROUND_TAB; 128 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB;
129 chrome::Navigate(&params); 129 chrome::Navigate(&params);
130 if (!params.target_contents) 130 if (!params.target_contents)
131 return nullptr; 131 return nullptr;
132 return content::DevToolsAgentHost::GetOrCreateFor(params.target_contents); 132 return content::DevToolsAgentHost::GetOrCreateFor(params.target_contents);
133 } 133 }
134 134
135 void ChromeDevToolsManagerDelegate::DevToolsAgentStateChanged( 135 void ChromeDevToolsManagerDelegate::DevToolsAgentStateChanged(
136 content::DevToolsAgentHost* agent_host, 136 content::DevToolsAgentHost* agent_host,
137 bool attached) { 137 bool attached) {
138 network_protocol_handler_->DevToolsAgentStateChanged(agent_host, attached); 138 network_protocol_handler_->DevToolsAgentStateChanged(agent_host, attached);
139 } 139 }
OLDNEW
« no previous file with comments | « chrome/browser/data_saver/data_saver_browsertest.cc ('k') | chrome/browser/devtools/devtools_sanity_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698