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

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

Issue 10825018: Add GetSitesWithData and FreeSiteList methods to PPP_Flash_BrowserOperations interface and hook the… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 4 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
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 "base/memory/weak_ptr.h"
10 #include "ppapi/c/ppp.h" 10 #include "ppapi/c/ppp.h"
(...skipping 14 matching lines...) Expand all
25 // IPC::Listener overrides. 25 // IPC::Listener overrides.
26 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 26 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
27 27
28 void OnGetPermissionSettingsCompleted( 28 void OnGetPermissionSettingsCompleted(
29 uint32 request_id, 29 uint32 request_id,
30 bool success, 30 bool success,
31 PP_Flash_BrowserOperations_Permission default_permission, 31 PP_Flash_BrowserOperations_Permission default_permission,
32 const ppapi::FlashSiteSettings& sites); 32 const ppapi::FlashSiteSettings& sites);
33 33
34 private: 34 private:
35 void OnMsgClearSiteData(const FilePath& plugin_data_path, 35 void OnMsgGetSitesWithData(uint32 request_id,
36 const FilePath& plugin_data_path);
37 void OnMsgClearSiteData(uint32 request_id,
38 const FilePath& plugin_data_path,
36 const std::string& site, 39 const std::string& site,
37 uint64 flags, 40 uint64 flags,
38 uint64 max_age); 41 uint64 max_age);
39 void OnMsgDeauthorizeContentLicenses(uint32 request_id, 42 void OnMsgDeauthorizeContentLicenses(uint32 request_id,
40 const FilePath& plugin_data_path); 43 const FilePath& plugin_data_path);
41 void OnMsgGetPermissionSettings( 44 void OnMsgGetPermissionSettings(
42 uint32 request_id, 45 uint32 request_id,
43 const FilePath& plugin_data_path, 46 const FilePath& plugin_data_path,
44 PP_Flash_BrowserOperations_SettingType setting_type); 47 PP_Flash_BrowserOperations_SettingType setting_type);
45 void OnMsgSetDefaultPermission( 48 void OnMsgSetDefaultPermission(
46 uint32 request_id, 49 uint32 request_id,
47 const FilePath& plugin_data_path, 50 const FilePath& plugin_data_path,
48 PP_Flash_BrowserOperations_SettingType setting_type, 51 PP_Flash_BrowserOperations_SettingType setting_type,
49 PP_Flash_BrowserOperations_Permission permission, 52 PP_Flash_BrowserOperations_Permission permission,
50 bool clear_site_specific); 53 bool clear_site_specific);
51 void OnMsgSetSitePermission( 54 void OnMsgSetSitePermission(
52 uint32 request_id, 55 uint32 request_id,
53 const FilePath& plugin_data_path, 56 const FilePath& plugin_data_path,
54 PP_Flash_BrowserOperations_SettingType setting_type, 57 PP_Flash_BrowserOperations_SettingType setting_type,
55 const ppapi::FlashSiteSettings& sites); 58 const ppapi::FlashSiteSettings& sites);
56 59
60 // Returns a list of sites that have data stored.
61 void GetSitesWithData(const FilePath& plugin_data_path,
62 std::vector<std::string>* sites);
63
57 // Requests that the plugin clear data, returning true on success. 64 // Requests that the plugin clear data, returning true on success.
58 bool ClearSiteData(const FilePath& plugin_data_path, 65 bool ClearSiteData(const FilePath& plugin_data_path,
59 const std::string& site, 66 const std::string& site,
60 uint64 flags, 67 uint64 flags,
61 uint64 max_age); 68 uint64 max_age);
69
62 bool DeauthorizeContentLicenses(const FilePath& plugin_data_path); 70 bool DeauthorizeContentLicenses(const FilePath& plugin_data_path);
63 bool SetDefaultPermission(const FilePath& plugin_data_path, 71 bool SetDefaultPermission(const FilePath& plugin_data_path,
64 PP_Flash_BrowserOperations_SettingType setting_type, 72 PP_Flash_BrowserOperations_SettingType setting_type,
65 PP_Flash_BrowserOperations_Permission permission, 73 PP_Flash_BrowserOperations_Permission permission,
66 bool clear_site_specific); 74 bool clear_site_specific);
67 bool SetSitePermission(const FilePath& plugin_data_path, 75 bool SetSitePermission(const FilePath& plugin_data_path,
68 PP_Flash_BrowserOperations_SettingType setting_type, 76 PP_Flash_BrowserOperations_SettingType setting_type,
69 const ppapi::FlashSiteSettings& sites); 77 const ppapi::FlashSiteSettings& sites);
70 78
71 PP_GetInterface_Func get_plugin_interface_; 79 PP_GetInterface_Func get_plugin_interface_;
72 80
81 const PPP_Flash_BrowserOperations_1_3* flash_browser_operations_1_3_;
73 const PPP_Flash_BrowserOperations_1_2* flash_browser_operations_1_2_; 82 const PPP_Flash_BrowserOperations_1_2* flash_browser_operations_1_2_;
74 const PPP_Flash_BrowserOperations_1_0* flash_browser_operations_1_0_; 83 const PPP_Flash_BrowserOperations_1_0* flash_browser_operations_1_0_;
75 84
76 DISALLOW_COPY_AND_ASSIGN(BrokerProcessDispatcher); 85 DISALLOW_COPY_AND_ASSIGN(BrokerProcessDispatcher);
77 }; 86 };
78 87
79 #endif // CONTENT_PPAPI_PLUGIN_BROKER_PROCESS_DISPATCHER_H_ 88 #endif // CONTENT_PPAPI_PLUGIN_BROKER_PROCESS_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698