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

Side by Side Diff: ppapi/proxy/plugin_dispatcher.h

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up for review. Created 8 years, 8 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 PPAPI_PROXY_PLUGIN_DISPATCHER_H_ 5 #ifndef PPAPI_PROXY_PLUGIN_DISPATCHER_H_
6 #define PPAPI_PROXY_PLUGIN_DISPATCHER_H_ 6 #define PPAPI_PROXY_PLUGIN_DISPATCHER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/hash_tables.h" 12 #include "base/hash_tables.h"
13 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
15 #include "base/process.h" 16 #include "base/process.h"
16 #include "build/build_config.h" 17 #include "build/build_config.h"
17 #include "ppapi/c/dev/ppb_console_dev.h" 18 #include "ppapi/c/dev/ppb_console_dev.h"
18 #include "ppapi/c/pp_rect.h" 19 #include "ppapi/c/pp_rect.h"
19 #include "ppapi/c/pp_instance.h" 20 #include "ppapi/c/pp_instance.h"
20 #include "ppapi/proxy/dispatcher.h" 21 #include "ppapi/proxy/dispatcher.h"
21 #include "ppapi/shared_impl/function_group_base.h" 22 #include "ppapi/shared_impl/function_group_base.h"
22 #include "ppapi/shared_impl/ppapi_preferences.h" 23 #include "ppapi/shared_impl/ppapi_preferences.h"
23 #include "ppapi/shared_impl/ppb_view_shared.h" 24 #include "ppapi/shared_impl/ppb_view_shared.h"
25 #include "ppapi/shared_impl/tracked_callback.h"
24 26
25 namespace ppapi { 27 namespace ppapi {
26 28
27 struct Preferences; 29 struct Preferences;
28 class Resource; 30 class Resource;
29 31
30 namespace proxy { 32 namespace proxy {
31 33
32 // Used to keep track of per-instance data. 34 // Used to keep track of per-instance data.
33 struct InstanceData { 35 struct InstanceData {
34 InstanceData(); 36 InstanceData();
35 ~InstanceData(); 37 ~InstanceData();
36 38
37 ViewData view; 39 ViewData view;
38 40
39 PP_Bool flash_fullscreen; // Used for PPB_FlashFullscreen. 41 PP_Bool flash_fullscreen; // Used for PPB_FlashFullscreen.
40 42
41 // When non-0, indicates the callback to execute when mouse lock is lost. 43 // When non-NULL, indicates the callback to execute when mouse lock is lost.
42 PP_CompletionCallback mouse_lock_callback; 44 scoped_refptr<TrackedCallback> mouse_lock_callback;
43 }; 45 };
44 46
45 class PPAPI_PROXY_EXPORT PluginDispatcher 47 class PPAPI_PROXY_EXPORT PluginDispatcher
46 : public Dispatcher, 48 : public Dispatcher,
47 public base::SupportsWeakPtr<PluginDispatcher> { 49 public base::SupportsWeakPtr<PluginDispatcher> {
48 public: 50 public:
49 class PPAPI_PROXY_EXPORT PluginDelegate : public ProxyChannel::Delegate { 51 class PPAPI_PROXY_EXPORT PluginDelegate : public ProxyChannel::Delegate {
50 public: 52 public:
51 // Returns the set used for globally uniquifying PP_Instances. This same 53 // Returns the set used for globally uniquifying PP_Instances. This same
52 // set must be returned for all channels. 54 // set must be returned for all channels.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 161
160 uint32 plugin_dispatcher_id_; 162 uint32 plugin_dispatcher_id_;
161 163
162 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); 164 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher);
163 }; 165 };
164 166
165 } // namespace proxy 167 } // namespace proxy
166 } // namespace ppapi 168 } // namespace ppapi
167 169
168 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ 170 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698