| 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_HOST_DISPATCHER_H_ | 5 #ifndef PPAPI_PROXY_HOST_DISPATCHER_H_ |
| 6 #define PPAPI_PROXY_HOST_DISPATCHER_H_ | 6 #define PPAPI_PROXY_HOST_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 // Guaranteed non-NULL. | 135 // Guaranteed non-NULL. |
| 136 const PPB_Proxy_Private* ppb_proxy_; | 136 const PPB_Proxy_Private* ppb_proxy_; |
| 137 | 137 |
| 138 // Set to true when the plugin is in a state that it can be reentered by a | 138 // Set to true when the plugin is in a state that it can be reentered by a |
| 139 // sync message from the host. We allow reentrancy only when we're processing | 139 // sync message from the host. We allow reentrancy only when we're processing |
| 140 // a sync message from the renderer that is a scripting command. When the | 140 // a sync message from the renderer that is a scripting command. When the |
| 141 // plugin is in this state, it needs to accept reentrancy since scripting may | 141 // plugin is in this state, it needs to accept reentrancy since scripting may |
| 142 // ultimately call back into the plugin. | 142 // ultimately call back into the plugin. |
| 143 bool allow_plugin_reentrancy_; | 143 bool allow_plugin_reentrancy_; |
| 144 | 144 |
| 145 ObserverList<SyncMessageStatusObserver> sync_status_observer_list_; | 145 base::ObserverList<SyncMessageStatusObserver> sync_status_observer_list_; |
| 146 | 146 |
| 147 std::vector<IPC::Listener*> filters_; | 147 std::vector<IPC::Listener*> filters_; |
| 148 | 148 |
| 149 base::WeakPtrFactory<HostDispatcher> weak_ptr_factory_; | 149 base::WeakPtrFactory<HostDispatcher> weak_ptr_factory_; |
| 150 | 150 |
| 151 DISALLOW_COPY_AND_ASSIGN(HostDispatcher); | 151 DISALLOW_COPY_AND_ASSIGN(HostDispatcher); |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 // Create this object on the stack to prevent the module (and hence the | 154 // Create this object on the stack to prevent the module (and hence the |
| 155 // dispatcher) from being deleted out from under you. This is necessary when | 155 // dispatcher) from being deleted out from under you. This is necessary when |
| 156 // calling some scripting functions that may delete the plugin. | 156 // calling some scripting functions that may delete the plugin. |
| 157 // | 157 // |
| 158 // This class does nothing if used on the plugin side. | 158 // This class does nothing if used on the plugin side. |
| 159 class ScopedModuleReference { | 159 class ScopedModuleReference { |
| 160 public: | 160 public: |
| 161 explicit ScopedModuleReference(Dispatcher* dispatcher); | 161 explicit ScopedModuleReference(Dispatcher* dispatcher); |
| 162 ~ScopedModuleReference(); | 162 ~ScopedModuleReference(); |
| 163 | 163 |
| 164 private: | 164 private: |
| 165 HostDispatcher* dispatcher_; | 165 HostDispatcher* dispatcher_; |
| 166 | 166 |
| 167 DISALLOW_COPY_AND_ASSIGN(ScopedModuleReference); | 167 DISALLOW_COPY_AND_ASSIGN(ScopedModuleReference); |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 } // namespace proxy | 170 } // namespace proxy |
| 171 } // namespace ppapi | 171 } // namespace ppapi |
| 172 | 172 |
| 173 #endif // PPAPI_PROXY_HOST_DISPATCHER_H_ | 173 #endif // PPAPI_PROXY_HOST_DISPATCHER_H_ |
| OLD | NEW |