OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/debugger/devtools_http_protocol_handler.h" | 5 #include "content/browser/debugger/devtools_http_protocol_handler.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 id_to_tabcontents_; | 129 id_to_tabcontents_; |
130 typedef std::map<TabContents*, int> TabContentsToIdMap; | 130 typedef std::map<TabContents*, int> TabContentsToIdMap; |
131 static base::LazyInstance<TabContentsToIdMap, | 131 static base::LazyInstance<TabContentsToIdMap, |
132 base::LeakyLazyInstanceTraits<TabContentsToIdMap> > | 132 base::LeakyLazyInstanceTraits<TabContentsToIdMap> > |
133 tabcontents_to_id_; | 133 tabcontents_to_id_; |
134 }; | 134 }; |
135 | 135 |
136 base::LazyInstance< | 136 base::LazyInstance< |
137 TabContentsIDHelper::IdToTabContentsMap, | 137 TabContentsIDHelper::IdToTabContentsMap, |
138 base::LeakyLazyInstanceTraits<TabContentsIDHelper::IdToTabContentsMap> > | 138 base::LeakyLazyInstanceTraits<TabContentsIDHelper::IdToTabContentsMap> > |
139 TabContentsIDHelper::id_to_tabcontents_(base::LINKER_INITIALIZED); | 139 TabContentsIDHelper::id_to_tabcontents_ = LAZY_INSTANCE_INITIALIZER; |
140 base::LazyInstance< | 140 base::LazyInstance< |
141 TabContentsIDHelper::TabContentsToIdMap, | 141 TabContentsIDHelper::TabContentsToIdMap, |
142 base::LeakyLazyInstanceTraits<TabContentsIDHelper::TabContentsToIdMap> > | 142 base::LeakyLazyInstanceTraits<TabContentsIDHelper::TabContentsToIdMap> > |
143 TabContentsIDHelper::tabcontents_to_id_(base::LINKER_INITIALIZED); | 143 TabContentsIDHelper::tabcontents_to_id_ = LAZY_INSTANCE_INITIALIZER; |
144 | 144 |
145 } // namespace | 145 } // namespace |
146 | 146 |
147 // static | 147 // static |
148 scoped_refptr<DevToolsHttpProtocolHandler> DevToolsHttpProtocolHandler::Start( | 148 scoped_refptr<DevToolsHttpProtocolHandler> DevToolsHttpProtocolHandler::Start( |
149 const std::string& ip, | 149 const std::string& ip, |
150 int port, | 150 int port, |
151 const std::string& frontend_url, | 151 const std::string& frontend_url, |
152 Delegate* delegate) { | 152 Delegate* delegate) { |
153 scoped_refptr<DevToolsHttpProtocolHandler> http_handler = | 153 scoped_refptr<DevToolsHttpProtocolHandler> http_handler = |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 } | 549 } |
550 | 550 |
551 void DevToolsHttpProtocolHandler::AcceptWebSocket( | 551 void DevToolsHttpProtocolHandler::AcceptWebSocket( |
552 int connection_id, | 552 int connection_id, |
553 const net::HttpServerRequestInfo& request) { | 553 const net::HttpServerRequestInfo& request) { |
554 BrowserThread::PostTask( | 554 BrowserThread::PostTask( |
555 BrowserThread::IO, FROM_HERE, | 555 BrowserThread::IO, FROM_HERE, |
556 base::Bind(&net::HttpServer::AcceptWebSocket, server_.get(), | 556 base::Bind(&net::HttpServer::AcceptWebSocket, server_.get(), |
557 connection_id, request)); | 557 connection_id, request)); |
558 } | 558 } |
OLD | NEW |