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

Side by Side Diff: webkit/glue/plugins/pepper_transport.cc

Issue 4310002: Make PPAPI headers compile with C compilers (gcc on Linux & Mac and MSVS on W... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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/glue/plugins/pepper_scrollbar.cc ('k') | webkit/glue/plugins/pepper_url_loader.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "webkit/glue/plugins/pepper_transport.h" 5 #include "webkit/glue/plugins/pepper_transport.h"
6 6
7 #include "base/singleton.h" 7 #include "base/singleton.h"
8 #include "base/thread_local.h" 8 #include "base/thread_local.h"
9 #include "ppapi/c/dev/ppb_transport_dev.h" 9 #include "ppapi/c/dev/ppb_transport_dev.h"
10 #include "webkit/glue/plugins/pepper_common.h"
10 #include "webkit/glue/plugins/pepper_plugin_instance.h" 11 #include "webkit/glue/plugins/pepper_plugin_instance.h"
11 #include "webkit/glue/plugins/pepper_plugin_module.h" 12 #include "webkit/glue/plugins/pepper_plugin_module.h"
12 13
13 namespace pepper { 14 namespace pepper {
14 15
15 namespace { 16 namespace {
16 17
17 // Creates a new transport object with the specified name 18 // Creates a new transport object with the specified name
18 // using the specified protocol. 19 // using the specified protocol.
19 PP_Resource CreateTransport(PP_Module module, 20 PP_Resource CreateTransport(PP_Module module,
20 const char* name, 21 const char* name,
21 const char* proto) { 22 const char* proto) {
22 // TODO(juberti): implement me 23 // TODO(juberti): implement me
23 PP_Resource p(0); 24 PP_Resource p(0);
24 return p; 25 return p;
25 } 26 }
26 27
27 // Returns whether or not resource is Transport 28 // Returns whether or not resource is Transport
28 bool IsTransport(PP_Resource resource) { 29 PP_Bool IsTransport(PP_Resource resource) {
29 return !!Resource::GetAs<Transport>(resource); 30 return BoolToPPBool(!!Resource::GetAs<Transport>(resource));
30 } 31 }
31 32
32 // Returns whether the transport is currently writable 33 // Returns whether the transport is currently writable
33 // (i.e. can send data to the remote peer) 34 // (i.e. can send data to the remote peer)
34 bool IsWritable(PP_Resource transport) { 35 PP_Bool IsWritable(PP_Resource transport) {
35 // TODO(juberti): impelement me 36 // TODO(juberti): impelement me
36 return false; 37 return PP_FALSE;
37 } 38 }
38 39
39 40
40 // TODO(juberti): other getters/setters 41 // TODO(juberti): other getters/setters
41 // connect state 42 // connect state
42 // connect type, protocol 43 // connect type, protocol
43 // RTT 44 // RTT
44 45
45 46
46 // Establishes a connection to the remote peer. 47 // Establishes a connection to the remote peer.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 131 }
131 132
132 bool Transport::Init(const char* name, 133 bool Transport::Init(const char* name,
133 const char* proto) { 134 const char* proto) {
134 // TODO(juberti): impl 135 // TODO(juberti): impl
135 return false; 136 return false;
136 } 137 }
137 138
138 } // namespace pepper 139 } // namespace pepper
139 140
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_scrollbar.cc ('k') | webkit/glue/plugins/pepper_url_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698