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 CONTENT_PPAPI_PLUGIN_BROKER_PROCESS_DISPATCHER_H_ | 5 #ifndef CONTENT_PPAPI_PLUGIN_BROKER_PROCESS_DISPATCHER_H_ |
6 #define CONTENT_PPAPI_PLUGIN_BROKER_PROCESS_DISPATCHER_H_ | 6 #define CONTENT_PPAPI_PLUGIN_BROKER_PROCESS_DISPATCHER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "content/child/scoped_child_process_reference.h" | 12 #include "content/child/scoped_child_process_reference.h" |
13 #include "ppapi/c/ppp.h" | 13 #include "ppapi/c/ppp.h" |
14 #include "ppapi/proxy/broker_dispatcher.h" | 14 #include "ppapi/proxy/broker_dispatcher.h" |
15 #include "ppapi/shared_impl/ppp_flash_browser_operations_shared.h" | 15 #include "ppapi/shared_impl/ppp_flash_browser_operations_shared.h" |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 | 18 |
19 // Wrapper around a BrokerDispatcher that provides the necessary integration | 19 // Wrapper around a BrokerDispatcher that provides the necessary integration |
20 // for plugin process management. This class is to avoid direct dependencies | 20 // for plugin process management. This class is to avoid direct dependencies |
21 // from the PPAPI proxy on the Chrome multiprocess infrastructure. | 21 // from the PPAPI proxy on the Chrome multiprocess infrastructure. |
22 class BrokerProcessDispatcher | 22 class BrokerProcessDispatcher |
23 : public ppapi::proxy::BrokerSideDispatcher, | 23 : public ppapi::proxy::BrokerSideDispatcher, |
24 public base::SupportsWeakPtr<BrokerProcessDispatcher> { | 24 public base::SupportsWeakPtr<BrokerProcessDispatcher> { |
25 public: | 25 public: |
26 BrokerProcessDispatcher(PP_GetInterface_Func get_plugin_interface, | 26 BrokerProcessDispatcher(PP_GetInterface_Func get_plugin_interface, |
27 PP_ConnectInstance_Func connect_instance); | 27 PP_ConnectInstance_Func connect_instance, |
| 28 bool peer_is_browser); |
28 ~BrokerProcessDispatcher() override; | 29 ~BrokerProcessDispatcher() override; |
29 | 30 |
30 // IPC::Listener overrides. | 31 // IPC::Listener overrides. |
31 bool OnMessageReceived(const IPC::Message& msg) override; | 32 bool OnMessageReceived(const IPC::Message& msg) override; |
32 | 33 |
33 void OnGetPermissionSettingsCompleted( | 34 void OnGetPermissionSettingsCompleted( |
34 uint32_t request_id, | 35 uint32_t request_id, |
35 bool success, | 36 bool success, |
36 PP_Flash_BrowserOperations_Permission default_permission, | 37 PP_Flash_BrowserOperations_Permission default_permission, |
37 const ppapi::FlashSiteSettings& sites); | 38 const ppapi::FlashSiteSettings& sites); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 const ppapi::FlashSiteSettings& sites); | 82 const ppapi::FlashSiteSettings& sites); |
82 | 83 |
83 ScopedChildProcessReference process_ref_; | 84 ScopedChildProcessReference process_ref_; |
84 | 85 |
85 PP_GetInterface_Func get_plugin_interface_; | 86 PP_GetInterface_Func get_plugin_interface_; |
86 | 87 |
87 const PPP_Flash_BrowserOperations_1_3* flash_browser_operations_1_3_; | 88 const PPP_Flash_BrowserOperations_1_3* flash_browser_operations_1_3_; |
88 const PPP_Flash_BrowserOperations_1_2* flash_browser_operations_1_2_; | 89 const PPP_Flash_BrowserOperations_1_2* flash_browser_operations_1_2_; |
89 const PPP_Flash_BrowserOperations_1_0* flash_browser_operations_1_0_; | 90 const PPP_Flash_BrowserOperations_1_0* flash_browser_operations_1_0_; |
90 | 91 |
| 92 bool peer_is_browser_; |
| 93 |
91 DISALLOW_COPY_AND_ASSIGN(BrokerProcessDispatcher); | 94 DISALLOW_COPY_AND_ASSIGN(BrokerProcessDispatcher); |
92 }; | 95 }; |
93 | 96 |
94 } // namespace content | 97 } // namespace content |
95 | 98 |
96 #endif // CONTENT_PPAPI_PLUGIN_BROKER_PROCESS_DISPATCHER_H_ | 99 #endif // CONTENT_PPAPI_PLUGIN_BROKER_PROCESS_DISPATCHER_H_ |
OLD | NEW |