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

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: 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 | « ppapi/proxy/enter_proxy.h ('k') | ppapi/proxy/plugin_dispatcher.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 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/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
14 #include "base/process.h" 15 #include "base/process.h"
15 #include "build/build_config.h" 16 #include "build/build_config.h"
16 #include "ppapi/c/dev/ppb_console_dev.h" 17 #include "ppapi/c/dev/ppb_console_dev.h"
17 #include "ppapi/c/pp_rect.h" 18 #include "ppapi/c/pp_rect.h"
18 #include "ppapi/c/pp_instance.h" 19 #include "ppapi/c/pp_instance.h"
19 #include "ppapi/proxy/dispatcher.h" 20 #include "ppapi/proxy/dispatcher.h"
20 #include "ppapi/shared_impl/ppapi_preferences.h" 21 #include "ppapi/shared_impl/ppapi_preferences.h"
21 #include "ppapi/shared_impl/ppb_view_shared.h" 22 #include "ppapi/shared_impl/ppb_view_shared.h"
23 #include "ppapi/shared_impl/tracked_callback.h"
22 24
23 namespace ppapi { 25 namespace ppapi {
24 26
25 struct Preferences; 27 struct Preferences;
26 class Resource; 28 class Resource;
27 29
28 namespace thunk { 30 namespace thunk {
29 class PPB_Instance_API; 31 class PPB_Instance_API;
30 class ResourceCreationAPI; 32 class ResourceCreationAPI;
31 } 33 }
32 34
33 namespace proxy { 35 namespace proxy {
34 36
35 // Used to keep track of per-instance data. 37 // Used to keep track of per-instance data.
36 struct InstanceData { 38 struct InstanceData {
37 InstanceData(); 39 InstanceData();
38 ~InstanceData(); 40 ~InstanceData();
39 41
40 ViewData view; 42 ViewData view;
41 43
42 PP_Bool flash_fullscreen; // Used for PPB_FlashFullscreen. 44 PP_Bool flash_fullscreen; // Used for PPB_FlashFullscreen.
43 45
44 // When non-0, indicates the callback to execute when mouse lock is lost. 46 // When non-NULL, indicates the callback to execute when mouse lock is lost.
45 PP_CompletionCallback mouse_lock_callback; 47 scoped_refptr<TrackedCallback> mouse_lock_callback;
46 }; 48 };
47 49
48 class PPAPI_PROXY_EXPORT PluginDispatcher 50 class PPAPI_PROXY_EXPORT PluginDispatcher
49 : public Dispatcher, 51 : public Dispatcher,
50 public base::SupportsWeakPtr<PluginDispatcher> { 52 public base::SupportsWeakPtr<PluginDispatcher> {
51 public: 53 public:
52 class PPAPI_PROXY_EXPORT PluginDelegate : public ProxyChannel::Delegate { 54 class PPAPI_PROXY_EXPORT PluginDelegate : public ProxyChannel::Delegate {
53 public: 55 public:
54 // Returns the set used for globally uniquifying PP_Instances. This same 56 // Returns the set used for globally uniquifying PP_Instances. This same
55 // set must be returned for all channels. 57 // set must be returned for all channels.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // incognito mode. 168 // incognito mode.
167 bool incognito_; 169 bool incognito_;
168 170
169 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); 171 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher);
170 }; 172 };
171 173
172 } // namespace proxy 174 } // namespace proxy
173 } // namespace ppapi 175 } // namespace ppapi
174 176
175 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ 177 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/enter_proxy.h ('k') | ppapi/proxy/plugin_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698