OLD | NEW |
1 // Copyright (c) 2011 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/scoped_ptr.h" | 13 #include "base/memory/scoped_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/function_group_base.h" | 21 #include "ppapi/shared_impl/function_group_base.h" |
21 #include "ppapi/shared_impl/ppapi_preferences.h" | 22 #include "ppapi/shared_impl/ppapi_preferences.h" |
22 #include "ppapi/shared_impl/ppb_view_shared.h" | 23 #include "ppapi/shared_impl/ppb_view_shared.h" |
23 | 24 |
(...skipping 10 matching lines...) Expand all Loading... |
34 ~InstanceData(); | 35 ~InstanceData(); |
35 | 36 |
36 ViewData view; | 37 ViewData view; |
37 | 38 |
38 PP_Bool flash_fullscreen; // Used for PPB_FlashFullscreen. | 39 PP_Bool flash_fullscreen; // Used for PPB_FlashFullscreen. |
39 | 40 |
40 // When non-0, indicates the callback to execute when mouse lock is lost. | 41 // When non-0, indicates the callback to execute when mouse lock is lost. |
41 PP_CompletionCallback mouse_lock_callback; | 42 PP_CompletionCallback mouse_lock_callback; |
42 }; | 43 }; |
43 | 44 |
44 class PPAPI_PROXY_EXPORT PluginDispatcher : public Dispatcher { | 45 class PPAPI_PROXY_EXPORT PluginDispatcher |
| 46 : public Dispatcher, |
| 47 public base::SupportsWeakPtr<PluginDispatcher> { |
45 public: | 48 public: |
46 class PPAPI_PROXY_EXPORT PluginDelegate : public ProxyChannel::Delegate { | 49 class PPAPI_PROXY_EXPORT PluginDelegate : public ProxyChannel::Delegate { |
47 public: | 50 public: |
48 // Returns the set used for globally uniquifying PP_Instances. This same | 51 // Returns the set used for globally uniquifying PP_Instances. This same |
49 // set must be returned for all channels. | 52 // set must be returned for all channels. |
50 // | 53 // |
51 // DEREFERENCE ONLY ON THE I/O THREAD. | 54 // DEREFERENCE ONLY ON THE I/O THREAD. |
52 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() = 0; | 55 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() = 0; |
53 | 56 |
54 // Registers the plugin dispatcher and returns an ID. | 57 // Registers the plugin dispatcher and returns an ID. |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 159 |
157 uint32 plugin_dispatcher_id_; | 160 uint32 plugin_dispatcher_id_; |
158 | 161 |
159 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); | 162 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); |
160 }; | 163 }; |
161 | 164 |
162 } // namespace proxy | 165 } // namespace proxy |
163 } // namespace ppapi | 166 } // namespace ppapi |
164 | 167 |
165 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 168 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
OLD | NEW |