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

Side by Side Diff: content/ppapi_plugin/broker_process_dispatcher.h

Issue 10479015: Pepper Flash settings integration - camera and microphone. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 | « chrome/tools/chromeactions.txt ('k') | content/ppapi_plugin/broker_process_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 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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/weak_ptr.h"
9 #include "ppapi/c/ppp.h" 10 #include "ppapi/c/ppp.h"
10 #include "ppapi/proxy/broker_dispatcher.h" 11 #include "ppapi/proxy/broker_dispatcher.h"
12 #include "ppapi/shared_impl/ppp_flash_browser_operations_shared.h"
11 13
12 // Wrapper around a BrokerDispatcher that provides the necessary integration 14 // Wrapper around a BrokerDispatcher that provides the necessary integration
13 // for plugin process management. This class is to avoid direct dependencies 15 // for plugin process management. This class is to avoid direct dependencies
14 // from the PPAPI proxy on the Chrome multiprocess infrastructure. 16 // from the PPAPI proxy on the Chrome multiprocess infrastructure.
15 class BrokerProcessDispatcher : public ppapi::proxy::BrokerSideDispatcher { 17 class BrokerProcessDispatcher
18 : public ppapi::proxy::BrokerSideDispatcher,
19 public base::SupportsWeakPtr<BrokerProcessDispatcher> {
16 public: 20 public:
17 BrokerProcessDispatcher(PP_GetInterface_Func get_plugin_interface, 21 BrokerProcessDispatcher(PP_GetInterface_Func get_plugin_interface,
18 PP_ConnectInstance_Func connect_instance); 22 PP_ConnectInstance_Func connect_instance);
19 virtual ~BrokerProcessDispatcher(); 23 virtual ~BrokerProcessDispatcher();
20 24
21 // IPC::Channel::Listener overrides. 25 // IPC::Channel::Listener overrides.
22 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 26 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
23 27
28 void OnGetPermissionSettingsCompleted(
29 uint32 request_id,
30 bool success,
31 PP_Flash_BrowserOperations_Permission default_permission,
32 const ppapi::FlashSiteSettings& sites);
33
24 private: 34 private:
25 void OnMsgClearSiteData(const FilePath& plugin_data_path, 35 void OnMsgClearSiteData(const FilePath& plugin_data_path,
26 const std::string& site, 36 const std::string& site,
27 uint64 flags, 37 uint64 flags,
28 uint64 max_age); 38 uint64 max_age);
29
30 void OnMsgDeauthorizeContentLicenses(uint32 request_id, 39 void OnMsgDeauthorizeContentLicenses(uint32 request_id,
31 const FilePath& plugin_data_path); 40 const FilePath& plugin_data_path);
41 void OnMsgGetPermissionSettings(
42 uint32 request_id,
43 const FilePath& plugin_data_path,
44 PP_Flash_BrowserOperations_SettingType setting_type);
45 void OnMsgSetDefaultPermission(
46 uint32 request_id,
47 const FilePath& plugin_data_path,
48 PP_Flash_BrowserOperations_SettingType setting_type,
49 PP_Flash_BrowserOperations_Permission permission,
50 bool clear_site_specific);
51 void OnMsgSetSitePermission(
52 uint32 request_id,
53 const FilePath& plugin_data_path,
54 PP_Flash_BrowserOperations_SettingType setting_type,
55 const ppapi::FlashSiteSettings& sites);
32 56
33 // Requests that the plugin clear data, returning true on success. 57 // Requests that the plugin clear data, returning true on success.
34 bool ClearSiteData(const FilePath& plugin_data_path, 58 bool ClearSiteData(const FilePath& plugin_data_path,
35 const std::string& site, 59 const std::string& site,
36 uint64 flags, 60 uint64 flags,
37 uint64 max_age); 61 uint64 max_age);
38 bool DeauthorizeContentLicenses(const FilePath& plugin_data_path); 62 bool DeauthorizeContentLicenses(const FilePath& plugin_data_path);
63 bool SetDefaultPermission(const FilePath& plugin_data_path,
64 PP_Flash_BrowserOperations_SettingType setting_type,
65 PP_Flash_BrowserOperations_Permission permission,
66 bool clear_site_specific);
67 bool SetSitePermission(const FilePath& plugin_data_path,
68 PP_Flash_BrowserOperations_SettingType setting_type,
69 const ppapi::FlashSiteSettings& sites);
39 70
40 PP_GetInterface_Func get_plugin_interface_; 71 PP_GetInterface_Func get_plugin_interface_;
41 72
73 const PPP_Flash_BrowserOperations_1_1* flash_browser_operations_1_1_;
74 const PPP_Flash_BrowserOperations_1_0* flash_browser_operations_1_0_;
75
42 DISALLOW_COPY_AND_ASSIGN(BrokerProcessDispatcher); 76 DISALLOW_COPY_AND_ASSIGN(BrokerProcessDispatcher);
43 }; 77 };
44 78
45 #endif // CONTENT_PPAPI_PLUGIN_BROKER_PROCESS_DISPATCHER_H_ 79 #endif // CONTENT_PPAPI_PLUGIN_BROKER_PROCESS_DISPATCHER_H_
OLDNEW
« no previous file with comments | « chrome/tools/chromeactions.txt ('k') | content/ppapi_plugin/broker_process_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698