| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "ppapi/c/private/ppp_flash_browser_operations.h" | 11 #include "ppapi/c/private/ppp_flash_browser_operations.h" |
| 12 #include "ppapi/shared_impl/ppp_flash_browser_operations_shared.h" | 12 #include "ppapi/shared_impl/ppp_flash_browser_operations_shared.h" |
| 13 | 13 |
| 14 class PluginPrefs; | 14 class PluginPrefs; |
| 15 class PrefRegistrySyncable; | |
| 16 class PrefService; | 15 class PrefService; |
| 17 | 16 |
| 18 namespace content { | 17 namespace content { |
| 19 class BrowserContext; | 18 class BrowserContext; |
| 20 } | 19 } |
| 21 | 20 |
| 21 namespace user_prefs { |
| 22 class PrefRegistrySyncable; |
| 23 } |
| 24 |
| 22 namespace webkit { | 25 namespace webkit { |
| 23 struct WebPluginInfo; | 26 struct WebPluginInfo; |
| 24 } | 27 } |
| 25 | 28 |
| 26 // PepperFlashSettingsManager communicates with a PPAPI broker process to | 29 // PepperFlashSettingsManager communicates with a PPAPI broker process to |
| 27 // read/write Pepper Flash settings. | 30 // read/write Pepper Flash settings. |
| 28 class PepperFlashSettingsManager { | 31 class PepperFlashSettingsManager { |
| 29 public: | 32 public: |
| 30 class Client { | 33 class Client { |
| 31 public: | 34 public: |
| (...skipping 24 matching lines...) Expand all Loading... |
| 56 // receive any notifications after this object goes away. | 59 // receive any notifications after this object goes away. |
| 57 PepperFlashSettingsManager(Client* client, | 60 PepperFlashSettingsManager(Client* client, |
| 58 content::BrowserContext* browser_context); | 61 content::BrowserContext* browser_context); |
| 59 ~PepperFlashSettingsManager(); | 62 ~PepperFlashSettingsManager(); |
| 60 | 63 |
| 61 // |plugin_info| will be updated if it is not NULL and the method returns | 64 // |plugin_info| will be updated if it is not NULL and the method returns |
| 62 // true. | 65 // true. |
| 63 static bool IsPepperFlashInUse(PluginPrefs* plugin_prefs, | 66 static bool IsPepperFlashInUse(PluginPrefs* plugin_prefs, |
| 64 webkit::WebPluginInfo* plugin_info); | 67 webkit::WebPluginInfo* plugin_info); |
| 65 | 68 |
| 66 static void RegisterUserPrefs(PrefRegistrySyncable* registry); | 69 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); |
| 67 | 70 |
| 68 // Requests to deauthorize content licenses. | 71 // Requests to deauthorize content licenses. |
| 69 // Client::OnDeauthorizeContentLicensesCompleted() will be called when the | 72 // Client::OnDeauthorizeContentLicensesCompleted() will be called when the |
| 70 // operation is completed. | 73 // operation is completed. |
| 71 // The return value is the same as the request ID passed into | 74 // The return value is the same as the request ID passed into |
| 72 // Client::OnDeauthorizeContentLicensesCompleted(). | 75 // Client::OnDeauthorizeContentLicensesCompleted(). |
| 73 uint32 DeauthorizeContentLicenses(PrefService* prefs); | 76 uint32 DeauthorizeContentLicenses(PrefService* prefs); |
| 74 | 77 |
| 75 // Gets permission settings. | 78 // Gets permission settings. |
| 76 // Client::OnGetPermissionSettingsCompleted() will be called when the | 79 // Client::OnGetPermissionSettingsCompleted() will be called when the |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 content::BrowserContext* browser_context_; | 130 content::BrowserContext* browser_context_; |
| 128 | 131 |
| 129 scoped_refptr<Core> core_; | 132 scoped_refptr<Core> core_; |
| 130 | 133 |
| 131 uint32 next_request_id_; | 134 uint32 next_request_id_; |
| 132 | 135 |
| 133 DISALLOW_COPY_AND_ASSIGN(PepperFlashSettingsManager); | 136 DISALLOW_COPY_AND_ASSIGN(PepperFlashSettingsManager); |
| 134 }; | 137 }; |
| 135 | 138 |
| 136 #endif // CHROME_BROWSER_PEPPER_FLASH_SETTINGS_MANAGER_H_ | 139 #endif // CHROME_BROWSER_PEPPER_FLASH_SETTINGS_MANAGER_H_ |
| OLD | NEW |