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

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

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export AssertLockHeld Created 8 years, 6 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/ppb_audio_input_impl.cc ('k') | webkit/plugins/ppapi/ppb_broker_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) 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 WEBKIT_PLUGINS_PPAPI_PPB_BROKER_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_BROKER_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_BROKER_IMPL_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_BROKER_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 14 matching lines...) Expand all
25 NON_EXPORTED_BASE(public ::ppapi::thunk::PPB_Broker_API), 25 NON_EXPORTED_BASE(public ::ppapi::thunk::PPB_Broker_API),
26 public base::SupportsWeakPtr<PPB_Broker_Impl> { 26 public base::SupportsWeakPtr<PPB_Broker_Impl> {
27 public: 27 public:
28 explicit PPB_Broker_Impl(PP_Instance instance); 28 explicit PPB_Broker_Impl(PP_Instance instance);
29 virtual ~PPB_Broker_Impl(); 29 virtual ~PPB_Broker_Impl();
30 30
31 // Resource override. 31 // Resource override.
32 virtual ::ppapi::thunk::PPB_Broker_API* AsPPB_Broker_API() OVERRIDE; 32 virtual ::ppapi::thunk::PPB_Broker_API* AsPPB_Broker_API() OVERRIDE;
33 33
34 // PPB_BrokerTrusted implementation. 34 // PPB_BrokerTrusted implementation.
35 virtual int32_t Connect(PP_CompletionCallback connect_callback) OVERRIDE; 35 virtual int32_t Connect(
36 scoped_refptr< ::ppapi::TrackedCallback> connect_callback) OVERRIDE;
36 virtual int32_t GetHandle(int32_t* handle) OVERRIDE; 37 virtual int32_t GetHandle(int32_t* handle) OVERRIDE;
37 38
38 void BrokerConnected(int32_t handle, int32_t result); 39 void BrokerConnected(int32_t handle, int32_t result);
39 40
40 private: 41 private:
41 // PluginDelegate ppapi broker object. 42 // PluginDelegate ppapi broker object.
42 // We don't own this pointer but are responsible for calling Disconnect on it. 43 // We don't own this pointer but are responsible for calling Disconnect on it.
43 PluginDelegate::Broker* broker_; 44 PluginDelegate::Broker* broker_;
44 45
45 // Callback invoked from BrokerConnected. 46 // Callback invoked from BrokerConnected.
46 scoped_refptr< ::ppapi::TrackedCallback> connect_callback_; 47 scoped_refptr< ::ppapi::TrackedCallback> connect_callback_;
47 48
48 // Pipe handle for the plugin instance to use to communicate with the broker. 49 // Pipe handle for the plugin instance to use to communicate with the broker.
49 // Never owned by this object. 50 // Never owned by this object.
50 int32_t pipe_handle_; 51 int32_t pipe_handle_;
51 52
52 DISALLOW_COPY_AND_ASSIGN(PPB_Broker_Impl); 53 DISALLOW_COPY_AND_ASSIGN(PPB_Broker_Impl);
53 }; 54 };
54 55
55 } // namespace ppapi 56 } // namespace ppapi
56 } // namespace webkit 57 } // namespace webkit
57 58
58 #endif // WEBKIT_PLUGINS_PPAPI_PPB_BROKER_IMPL_H_ 59 #endif // WEBKIT_PLUGINS_PPAPI_PPB_BROKER_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_audio_input_impl.cc ('k') | webkit/plugins/ppapi/ppb_broker_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698