| 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 CHROME_BROWSER_PEPPER_FLASH_SETTINGS_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PEPPER_FLASH_SETTINGS_MANAGER_H_ |
| 6 #define CHROME_BROWSER_PEPPER_FLASH_SETTINGS_MANAGER_H_ | 6 #define CHROME_BROWSER_PEPPER_FLASH_SETTINGS_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 } | 26 } |
| 27 | 27 |
| 28 // PepperFlashSettingsManager communicates with a PPAPI broker process to | 28 // PepperFlashSettingsManager communicates with a PPAPI broker process to |
| 29 // read/write Pepper Flash settings. | 29 // read/write Pepper Flash settings. |
| 30 class PepperFlashSettingsManager { | 30 class PepperFlashSettingsManager { |
| 31 public: | 31 public: |
| 32 class Client { | 32 class Client { |
| 33 public: | 33 public: |
| 34 virtual ~Client() {} | 34 virtual ~Client() {} |
| 35 | 35 |
| 36 virtual void OnDeauthorizeContentLicensesCompleted(uint32_t request_id, | 36 virtual void OnDeauthorizeFlashContentLicensesCompleted(uint32_t request_id, |
| 37 bool success) {} | 37 bool success) {} |
| 38 virtual void OnGetPermissionSettingsCompleted( | 38 virtual void OnGetPermissionSettingsCompleted( |
| 39 uint32_t request_id, | 39 uint32_t request_id, |
| 40 bool success, | 40 bool success, |
| 41 PP_Flash_BrowserOperations_Permission default_permission, | 41 PP_Flash_BrowserOperations_Permission default_permission, |
| 42 const ppapi::FlashSiteSettings& sites) {} | 42 const ppapi::FlashSiteSettings& sites) {} |
| 43 | 43 |
| 44 virtual void OnSetDefaultPermissionCompleted(uint32_t request_id, | 44 virtual void OnSetDefaultPermissionCompleted(uint32_t request_id, |
| 45 bool success) {} | 45 bool success) {} |
| 46 | 46 |
| 47 virtual void OnSetSitePermissionCompleted(uint32_t request_id, | 47 virtual void OnSetSitePermissionCompleted(uint32_t request_id, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 61 ~PepperFlashSettingsManager(); | 61 ~PepperFlashSettingsManager(); |
| 62 | 62 |
| 63 // |plugin_info| will be updated if it is not NULL and the method returns | 63 // |plugin_info| will be updated if it is not NULL and the method returns |
| 64 // true. | 64 // true. |
| 65 static bool IsPepperFlashInUse(PluginPrefs* plugin_prefs, | 65 static bool IsPepperFlashInUse(PluginPrefs* plugin_prefs, |
| 66 content::WebPluginInfo* plugin_info); | 66 content::WebPluginInfo* plugin_info); |
| 67 | 67 |
| 68 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 68 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 69 | 69 |
| 70 // Requests to deauthorize content licenses. | 70 // Requests to deauthorize content licenses. |
| 71 // Client::OnDeauthorizeContentLicensesCompleted() will be called when the | 71 // Client::OnDeauthorizeFlashContentLicensesCompleted() will be called when |
| 72 // operation is completed. | 72 // the operation is completed. |
| 73 // The return value is the same as the request ID passed into | 73 // The return value is the same as the request ID passed into |
| 74 // Client::OnDeauthorizeContentLicensesCompleted(). | 74 // Client::OnDeauthorizeFlashContentLicensesCompleted(). |
| 75 uint32_t DeauthorizeContentLicenses(PrefService* prefs); | 75 uint32_t DeauthorizeContentLicenses(PrefService* prefs); |
| 76 | 76 |
| 77 // Gets permission settings. | 77 // Gets permission settings. |
| 78 // Client::OnGetPermissionSettingsCompleted() will be called when the | 78 // Client::OnGetPermissionSettingsCompleted() will be called when the |
| 79 // operation is completed. | 79 // operation is completed. |
| 80 uint32_t GetPermissionSettings( | 80 uint32_t GetPermissionSettings( |
| 81 PP_Flash_BrowserOperations_SettingType setting_type); | 81 PP_Flash_BrowserOperations_SettingType setting_type); |
| 82 | 82 |
| 83 // Sets default permission. | 83 // Sets default permission. |
| 84 // Client::OnSetDefaultPermissionCompleted() will be called when the | 84 // Client::OnSetDefaultPermissionCompleted() will be called when the |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 scoped_refptr<Core> core_; | 132 scoped_refptr<Core> core_; |
| 133 | 133 |
| 134 uint32_t next_request_id_; | 134 uint32_t next_request_id_; |
| 135 | 135 |
| 136 base::WeakPtrFactory<PepperFlashSettingsManager> weak_ptr_factory_; | 136 base::WeakPtrFactory<PepperFlashSettingsManager> weak_ptr_factory_; |
| 137 | 137 |
| 138 DISALLOW_COPY_AND_ASSIGN(PepperFlashSettingsManager); | 138 DISALLOW_COPY_AND_ASSIGN(PepperFlashSettingsManager); |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 #endif // CHROME_BROWSER_PEPPER_FLASH_SETTINGS_MANAGER_H_ | 141 #endif // CHROME_BROWSER_PEPPER_FLASH_SETTINGS_MANAGER_H_ |
| OLD | NEW |