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

Side by Side Diff: content/browser/renderer_host/pepper/content_browser_pepper_host_factory.h

Issue 22923014: TCPSockets are switched to the new Pepper proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync. Created 7 years, 4 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 (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_PEPPER_CONTENT_BROWSER_PEPPER_HOST_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_PEPPER_CONTENT_BROWSER_PEPPER_HOST_FACTORY_H_
6 #define CONTENT_BROWSER_PEPPER_CONTENT_BROWSER_PEPPER_HOST_FACTORY_H_ 6 #define CONTENT_BROWSER_PEPPER_CONTENT_BROWSER_PEPPER_HOST_FACTORY_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" 10 #include "content/browser/renderer_host/pepper/ssl_context_helper.h"
11 #include "ppapi/host/host_factory.h" 11 #include "ppapi/host/host_factory.h"
12 12
13 namespace net {
14 class StreamSocket;
15 }
16
13 namespace ppapi { 17 namespace ppapi {
14 class PpapiPermissions; 18 class PpapiPermissions;
15 } 19 }
16 20
17 namespace content { 21 namespace content {
18 22
19 class BrowserPpapiHostImpl; 23 class BrowserPpapiHostImpl;
20 24
21 class ContentBrowserPepperHostFactory : public ppapi::host::HostFactory { 25 class ContentBrowserPepperHostFactory : public ppapi::host::HostFactory {
22 public: 26 public:
23 // Non-owning pointer to the filter must outlive this class. 27 // Non-owning pointer to the filter must outlive this class.
24 ContentBrowserPepperHostFactory( 28 ContentBrowserPepperHostFactory(BrowserPpapiHostImpl* host);
yzshen1 2013/08/16 20:40:42 explicit?
ygorshenin1 2013/08/19 14:33:35 Done.
25 BrowserPpapiHostImpl* host, 29
26 // TODO (ygorshenin@): remove this once TCP sockets are
27 // converted to the new design.
28 const scoped_refptr<PepperMessageFilter>& pepper_message_filter);
29 virtual ~ContentBrowserPepperHostFactory(); 30 virtual ~ContentBrowserPepperHostFactory();
30 31
31 virtual scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost( 32 virtual scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost(
32 ppapi::host::PpapiHost* host, 33 ppapi::host::PpapiHost* host,
33 const ppapi::proxy::ResourceMessageCallParams& params, 34 const ppapi::proxy::ResourceMessageCallParams& params,
34 PP_Instance instance, 35 PP_Instance instance,
35 const IPC::Message& message) OVERRIDE; 36 const IPC::Message& message) OVERRIDE;
36 37
38 // Creates PepperTCPSocketMessageFilter from |socket| in already
39 // connected state and puts it into a list of pending resource
40 // hosts. In the case of success returns id of the corresponding
41 // pending resource host, zero otherwise.
yzshen1 2013/08/16 20:40:42 - Please take about the ownership of |socket|. - I
ygorshenin1 2013/08/19 14:33:35 Done.
42 int AddAcceptedTCPSocket(PP_Instance instance,
43 bool private_api,
44 net::StreamSocket* socket);
45
37 private: 46 private:
38 const ppapi::PpapiPermissions& GetPermissions() const; 47 const ppapi::PpapiPermissions& GetPermissions() const;
39 48
40 // Non-owning pointer. 49 // Non-owning pointer.
41 BrowserPpapiHostImpl* host_; 50 BrowserPpapiHostImpl* host_;
42 51
43 scoped_refptr<PepperMessageFilter> pepper_message_filter_; 52 scoped_refptr<SSLContextHelper> ssl_context_helper_;
yzshen1 2013/08/16 20:40:42 Maybe we could make it part of BrowserPpapiHostImp
ygorshenin1 2013/08/19 14:33:35 Done.
44 53
45 DISALLOW_COPY_AND_ASSIGN(ContentBrowserPepperHostFactory); 54 DISALLOW_COPY_AND_ASSIGN(ContentBrowserPepperHostFactory);
46 }; 55 };
47 56
48 } // namespace content 57 } // namespace content
49 58
50 #endif // CONTENT_BROWSER_PEPPER_CONTENT_BROWSER_PEPPER_HOST_FACTORY_H_ 59 #endif // CONTENT_BROWSER_PEPPER_CONTENT_BROWSER_PEPPER_HOST_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698