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 "sky/framework/inspector/server/inspector_frontend_impl.h" | 5 #include "sky/services/inspector/inspector_frontend_impl.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "net/server/http_server.h" | 8 #include "net/server/http_server.h" |
9 #include "net/socket/tcp_server_socket.h" | 9 #include "net/socket/tcp_server_socket.h" |
10 | 10 |
11 namespace sky { | 11 namespace sky { |
12 namespace inspector { | 12 namespace inspector { |
13 namespace { | 13 namespace { |
14 const int kNotConnected = -1; | 14 const int kNotConnected = -1; |
15 static base::LazyInstance<std::map<int, InspectorFronendImpl*>> g_servers = | 15 static base::LazyInstance<std::map<int, InspectorFronendImpl*>> g_servers = |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 } | 88 } |
89 | 89 |
90 void InspectorFronendImpl::SendMessage(const mojo::String& message) { | 90 void InspectorFronendImpl::SendMessage(const mojo::String& message) { |
91 if (connection_id_ == kNotConnected) | 91 if (connection_id_ == kNotConnected) |
92 return; | 92 return; |
93 web_server_->SendOverWebSocket(connection_id_, message); | 93 web_server_->SendOverWebSocket(connection_id_, message); |
94 } | 94 } |
95 | 95 |
96 } // namespace inspector | 96 } // namespace inspector |
97 } // namespace sky | 97 } // namespace sky |
OLD | NEW |