OLD | NEW |
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 #ifndef CONTENT_BROWSER_DEBUGGER_DEVTOOLS_HTTP_HANDLER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DEBUGGER_DEVTOOLS_HTTP_HANDLER_IMPL_H_ |
6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_HTTP_HANDLER_IMPL_H_ | 6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_HTTP_HANDLER_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "content/browser/debugger/devtools_trace_handler.h" |
15 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
16 #include "content/public/browser/devtools_http_handler.h" | 17 #include "content/public/browser/devtools_http_handler.h" |
17 #include "content/public/browser/devtools_http_handler_delegate.h" | 18 #include "content/public/browser/devtools_http_handler_delegate.h" |
18 #include "content/public/browser/notification_observer.h" | 19 #include "content/public/browser/notification_observer.h" |
19 #include "content/public/browser/notification_registrar.h" | 20 #include "content/public/browser/notification_registrar.h" |
20 #include "net/server/http_server.h" | 21 #include "net/server/http_server.h" |
21 | 22 |
22 namespace base { | 23 namespace base { |
23 class DictionaryValue; | 24 class DictionaryValue; |
24 class Thread; | 25 class Thread; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 virtual void OnWebSocketRequest( | 73 virtual void OnWebSocketRequest( |
73 int connection_id, | 74 int connection_id, |
74 const net::HttpServerRequestInfo& info) OVERRIDE; | 75 const net::HttpServerRequestInfo& info) OVERRIDE; |
75 virtual void OnWebSocketMessage(int connection_id, | 76 virtual void OnWebSocketMessage(int connection_id, |
76 const std::string& data) OVERRIDE; | 77 const std::string& data) OVERRIDE; |
77 virtual void OnClose(int connection_id) OVERRIDE; | 78 virtual void OnClose(int connection_id) OVERRIDE; |
78 | 79 |
79 void OnJsonRequestUI(int connection_id, | 80 void OnJsonRequestUI(int connection_id, |
80 const net::HttpServerRequestInfo& info); | 81 const net::HttpServerRequestInfo& info); |
81 void OnThumbnailRequestUI(int connection_id, | 82 void OnThumbnailRequestUI(int connection_id, |
82 const net::HttpServerRequestInfo& info); | 83 const net::HttpServerRequestInfo& info); |
83 void OnDiscoveryPageRequestUI(int connection_id); | 84 void OnDiscoveryPageRequestUI(int connection_id); |
84 | 85 |
85 void OnWebSocketRequestUI(int connection_id, | 86 void OnWebSocketRequestUI(int connection_id, |
86 const net::HttpServerRequestInfo& info); | 87 const net::HttpServerRequestInfo& info); |
87 void OnWebSocketMessageUI(int connection_id, const std::string& data); | 88 void OnWebSocketMessageUI(int connection_id, const std::string& data); |
| 89 void OnTraceRequestUI(int connection_id, |
| 90 const net::HttpServerRequestInfo& info); |
88 void OnCloseUI(int connection_id); | 91 void OnCloseUI(int connection_id); |
89 | 92 |
90 void ResetHandlerThread(); | 93 void ResetHandlerThread(); |
91 void ResetHandlerThreadAndRelease(); | 94 void ResetHandlerThreadAndRelease(); |
92 | 95 |
93 void Init(); | 96 void Init(); |
94 void Teardown(); | 97 void Teardown(); |
95 | 98 |
96 void StartHandlerThread(); | 99 void StartHandlerThread(); |
97 void StopHandlerThread(); | 100 void StopHandlerThread(); |
(...skipping 28 matching lines...) Expand all Loading... |
126 | 129 |
127 std::string overridden_frontend_url_; | 130 std::string overridden_frontend_url_; |
128 scoped_ptr<const net::StreamListenSocketFactory> socket_factory_; | 131 scoped_ptr<const net::StreamListenSocketFactory> socket_factory_; |
129 scoped_refptr<net::HttpServer> server_; | 132 scoped_refptr<net::HttpServer> server_; |
130 typedef std::map<int, DevToolsClientHost*> ConnectionToClientHostMap; | 133 typedef std::map<int, DevToolsClientHost*> ConnectionToClientHostMap; |
131 ConnectionToClientHostMap connection_to_client_host_ui_; | 134 ConnectionToClientHostMap connection_to_client_host_ui_; |
132 scoped_ptr<DevToolsHttpHandlerDelegate> delegate_; | 135 scoped_ptr<DevToolsHttpHandlerDelegate> delegate_; |
133 RenderViewHostBinding* binding_; | 136 RenderViewHostBinding* binding_; |
134 scoped_ptr<RenderViewHostBinding> default_binding_; | 137 scoped_ptr<RenderViewHostBinding> default_binding_; |
135 NotificationRegistrar registrar_; | 138 NotificationRegistrar registrar_; |
| 139 DevToolsTraceHandler devtools_trace_handler_; |
136 DISALLOW_COPY_AND_ASSIGN(DevToolsHttpHandlerImpl); | 140 DISALLOW_COPY_AND_ASSIGN(DevToolsHttpHandlerImpl); |
137 }; | 141 }; |
138 | 142 |
139 } // namespace content | 143 } // namespace content |
140 | 144 |
141 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_HTTP_HANDLER_IMPL_H_ | 145 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_HTTP_HANDLER_IMPL_H_ |
OLD | NEW |