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

Side by Side Diff: extensions/browser/api/sockets_tcp/tcp_socket_event_dispatcher.h

Issue 183893041: Move sockets APIs out of src/chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename api targets Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_BROWSER_EXTENSIONS_API_SOCKETS_TCP_TCP_SOCKET_EVENT_DISPATCHER_H_ 5 #ifndef EXTENSIONS_BROWSER_API_SOCKETS_TCP_TCP_SOCKET_EVENT_DISPATCHER_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_SOCKETS_TCP_TCP_SOCKET_EVENT_DISPATCHER_H_ 6 #define EXTENSIONS_BROWSER_API_SOCKETS_TCP_TCP_SOCKET_EVENT_DISPATCHER_H_
7 7
8 #include "chrome/browser/extensions/api/sockets_tcp/sockets_tcp_api.h"
9 #include "extensions/browser/api/api_resource_manager.h" 8 #include "extensions/browser/api/api_resource_manager.h"
9 #include "extensions/browser/api/sockets_tcp/sockets_tcp_api.h"
10 10
11 namespace content { 11 namespace content {
12 class BrowserContext; 12 class BrowserContext;
13 } 13 }
14 14
15 namespace extensions { 15 namespace extensions {
16 struct Event; 16 struct Event;
17 class ResumableTCPSocket; 17 class ResumableTCPSocket;
18 } 18 }
19 19
20 namespace extensions { 20 namespace extensions {
21 namespace api { 21 namespace core_api {
22 22
23 // Dispatch events related to "sockets.tcp" sockets from callback on native 23 // Dispatch events related to "sockets.tcp" sockets from callback on native
24 // socket instances. There is one instance per profile. 24 // socket instances. There is one instance per profile.
25 class TCPSocketEventDispatcher 25 class TCPSocketEventDispatcher
26 : public BrowserContextKeyedAPI, 26 : public BrowserContextKeyedAPI,
27 public base::SupportsWeakPtr<TCPSocketEventDispatcher> { 27 public base::SupportsWeakPtr<TCPSocketEventDispatcher> {
28 public: 28 public:
29 explicit TCPSocketEventDispatcher(content::BrowserContext* context); 29 explicit TCPSocketEventDispatcher(content::BrowserContext* context);
30 virtual ~TCPSocketEventDispatcher(); 30 virtual ~TCPSocketEventDispatcher();
31 31
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 static void DispatchEvent(void* browser_context_id, 81 static void DispatchEvent(void* browser_context_id,
82 const std::string& extension_id, 82 const std::string& extension_id,
83 scoped_ptr<Event> event); 83 scoped_ptr<Event> event);
84 84
85 // Usually IO thread (except for unit testing). 85 // Usually IO thread (except for unit testing).
86 content::BrowserThread::ID thread_id_; 86 content::BrowserThread::ID thread_id_;
87 content::BrowserContext* const browser_context_; 87 content::BrowserContext* const browser_context_;
88 scoped_refptr<SocketData> sockets_; 88 scoped_refptr<SocketData> sockets_;
89 }; 89 };
90 90
91 } // namespace api 91 } // namespace core_api
92 } // namespace extensions 92 } // namespace extensions
93 93
94 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKETS_TCP_TCP_SOCKET_EVENT_DISPATCHER _H_ 94 #endif // EXTENSIONS_BROWSER_API_SOCKETS_TCP_TCP_SOCKET_EVENT_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698