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

Side by Side Diff: webkit/plugins/ppapi/ppb_flash_impl.h

Issue 6578007: PPB_Flash cleanup part 1: move the net connector stuff to its own files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/ppapi/proxy
Patch Set: merged ToT Created 9 years, 10 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
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.cc ('k') | webkit/plugins/ppapi/ppb_flash_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 WEBKIT_PLUGINS_PPAPI_PPB_FLASH_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_FLASH_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_FLASH_IMPL_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FLASH_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/ref_counted.h"
10 #include "build/build_config.h" 9 #include "build/build_config.h"
11 #include "ppapi/c/pp_point.h" 10 #include "ppapi/c/pp_point.h"
12 #include "ppapi/c/pp_rect.h" 11 #include "ppapi/c/pp_rect.h"
13 #include "ppapi/c/private/ppb_flash.h" 12 #include "ppapi/c/private/ppb_flash.h"
14 #include "webkit/plugins/ppapi/callbacks.h"
15 #include "webkit/plugins/ppapi/resource.h"
16 13
17 namespace webkit { 14 namespace webkit {
18 namespace ppapi { 15 namespace ppapi {
19 16
20 class PPB_Flash_Impl { 17 class PPB_Flash_Impl {
21 public: 18 public:
22 // Returns a pointer to the interface implementing PPB_Flash that is 19 // Returns a pointer to the interface implementing PPB_Flash that is
23 // exposed to the plugin. 20 // exposed to the plugin.
24 static const PPB_Flash* GetInterface(); 21 static const PPB_Flash* GetInterface();
25 22
(...skipping 10 matching lines...) Expand all
36 #if defined(OS_LINUX) 33 #if defined(OS_LINUX)
37 ; 34 ;
38 #else 35 #else
39 { return PP_FALSE; } 36 { return PP_FALSE; }
40 #endif 37 #endif
41 38
42 private: 39 private:
43 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Impl); 40 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Impl);
44 }; 41 };
45 42
46 class PPB_Flash_NetConnector_Impl : public Resource {
47 public:
48 explicit PPB_Flash_NetConnector_Impl(PluginInstance* instance);
49 virtual ~PPB_Flash_NetConnector_Impl();
50
51 static const PPB_Flash_NetConnector* GetInterface();
52
53 // Resource override.
54 virtual PPB_Flash_NetConnector_Impl* AsPPB_Flash_NetConnector_Impl();
55
56 // PPB_Flash_NetConnector implementation.
57 int32_t ConnectTcp(const char* host,
58 uint16_t port,
59 PP_FileHandle* socket_out,
60 PP_Flash_NetAddress* local_addr_out,
61 PP_Flash_NetAddress* remote_addr_out,
62 PP_CompletionCallback callback);
63 int32_t ConnectTcpAddress(const PP_Flash_NetAddress* addr,
64 PP_FileHandle* socket_out,
65 PP_Flash_NetAddress* local_addr_out,
66 PP_Flash_NetAddress* remote_addr_out,
67 PP_CompletionCallback callback);
68
69 // Called to complete |ConnectTcp()| and |ConnectTcpAddress()|.
70 void CompleteConnectTcp(PP_FileHandle socket,
71 const PP_Flash_NetAddress& local_addr,
72 const PP_Flash_NetAddress& remote_addr);
73
74 private:
75 // Any pending callback (for |ConnectTcp()| or |ConnectTcpAddress()|).
76 scoped_refptr<TrackedCompletionCallback> callback_;
77
78 // Output buffers to be filled in when the callback is completed successfully
79 // (|{local,remote}_addr_out| are optional and may be null).
80 PP_FileHandle* socket_out_;
81 PP_Flash_NetAddress* local_addr_out_;
82 PP_Flash_NetAddress* remote_addr_out_;
83
84 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_NetConnector_Impl);
85 };
86
87 } // namespace ppapi 43 } // namespace ppapi
88 } // namespace webkit 44 } // namespace webkit
89 45
90 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FLASH_IMPL_H_ 46 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FLASH_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.cc ('k') | webkit/plugins/ppapi/ppb_flash_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698