OLD | NEW |
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 Loading... |
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(¶ms); | 129 chrome::Navigate(¶ms); |
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 } |
OLD | NEW |