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

Side by Side Diff: content/browser/devtools/devtools_browser_target.cc

Issue 497223003: Revert of Replace StreamListenSocket with StreamSocket in HttpServer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 "content/browser/devtools/devtools_browser_target.h" 5 #include "content/browser/devtools/devtools_browser_target.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/message_loop/message_loop_proxy.h" 11 #include "base/message_loop/message_loop_proxy.h"
12 #include "base/stl_util.h" 12 #include "base/stl_util.h"
13 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
16 #include "net/server/http_server.h" 16 #include "net/server/http_server.h"
17 17
18 namespace content { 18 namespace content {
19 19
20 DevToolsBrowserTarget::DevToolsBrowserTarget(net::HttpServer* http_server, 20 DevToolsBrowserTarget::DevToolsBrowserTarget(
21 int connection_id) 21 net::HttpServer* http_server,
22 int connection_id)
22 : message_loop_proxy_(base::MessageLoopProxy::current()), 23 : message_loop_proxy_(base::MessageLoopProxy::current()),
23 http_server_(http_server), 24 http_server_(http_server),
24 connection_id_(connection_id), 25 connection_id_(connection_id),
25 weak_factory_(this) { 26 weak_factory_(this) {
26 } 27 }
27 28
28 void DevToolsBrowserTarget::RegisterDomainHandler( 29 void DevToolsBrowserTarget::RegisterDomainHandler(
29 const std::string& domain, 30 const std::string& domain,
30 DevToolsProtocol::Handler* handler, 31 DevToolsProtocol::Handler* handler,
31 bool handle_on_ui_thread) { 32 bool handle_on_ui_thread) {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 171 }
171 172
172 void DevToolsBrowserTarget::RespondFromUIThread(const std::string& message) { 173 void DevToolsBrowserTarget::RespondFromUIThread(const std::string& message) {
173 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 174 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
174 message_loop_proxy_->PostTask( 175 message_loop_proxy_->PostTask(
175 FROM_HERE, 176 FROM_HERE,
176 base::Bind(&DevToolsBrowserTarget::Respond, this, message)); 177 base::Bind(&DevToolsBrowserTarget::Respond, this, message));
177 } 178 }
178 179
179 } // namespace content 180 } // namespace content
OLDNEW
« no previous file with comments | « cloud_print/gcp20/prototype/privet_http_server.cc ('k') | content/browser/devtools/devtools_http_handler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698