Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/linked_ptr.h" | |
| 13 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.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/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" |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 44 InstanceData(); | 45 InstanceData(); |
| 45 ~InstanceData(); | 46 ~InstanceData(); |
| 46 | 47 |
| 47 ViewData view; | 48 ViewData view; |
| 48 | 49 |
| 49 PP_Bool flash_fullscreen; // Used for PPB_FlashFullscreen. | 50 PP_Bool flash_fullscreen; // Used for PPB_FlashFullscreen. |
| 50 | 51 |
| 51 // When non-NULL, indicates the callback to execute when mouse lock is lost. | 52 // When non-NULL, indicates the callback to execute when mouse lock is lost. |
| 52 scoped_refptr<TrackedCallback> mouse_lock_callback; | 53 scoped_refptr<TrackedCallback> mouse_lock_callback; |
| 53 | 54 |
| 54 // The following are lazily created the first time the plugin requests them. | 55 // A map of singleton resources which are lazily created. |
| 55 // (These are singleton-style resources). | 56 typedef std::map<SingletonResourceID, linked_ptr<Resource> > |
|
yzshen1
2012/11/20 21:47:25
Resource itself is a ref-counted object. You shoul
raymes
2012/11/20 23:30:23
Done.
| |
| 56 scoped_refptr<GamepadResource> gamepad_resource; | 57 SingletonResourceMap; |
|
yzshen1
2012/11/20 21:47:25
4 space indent.
raymes
2012/11/20 23:30:23
Done.
| |
| 57 scoped_refptr<FlashResource> flash_resource; | 58 SingletonResourceMap singleton_resources; |
| 58 scoped_refptr<FlashClipboardResource> flash_clipboard_resource; | |
| 59 | 59 |
| 60 // Calls to |RequestSurroundingText()| are done by posted tasks. Track whether | 60 // Calls to |RequestSurroundingText()| are done by posted tasks. Track whether |
| 61 // a) a task is pending, to avoid redundant calls, and b) whether we should | 61 // a) a task is pending, to avoid redundant calls, and b) whether we should |
| 62 // actually call |RequestSurroundingText()|, to avoid stale calls (i.e., | 62 // actually call |RequestSurroundingText()|, to avoid stale calls (i.e., |
| 63 // calling when we shouldn't). | 63 // calling when we shouldn't). |
| 64 bool is_request_surrounding_text_pending; | 64 bool is_request_surrounding_text_pending; |
| 65 bool should_do_request_surrounding_text; | 65 bool should_do_request_surrounding_text; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 class PPAPI_PROXY_EXPORT PluginDispatcher | 68 class PPAPI_PROXY_EXPORT PluginDispatcher |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 211 // incognito mode. | 211 // incognito mode. |
| 212 bool incognito_; | 212 bool incognito_; |
| 213 | 213 |
| 214 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); | 214 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); |
| 215 }; | 215 }; |
| 216 | 216 |
| 217 } // namespace proxy | 217 } // namespace proxy |
| 218 } // namespace ppapi | 218 } // namespace ppapi |
| 219 | 219 |
| 220 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 220 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
| OLD | NEW |