| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_UI_WEBUI_PLUGINS_PLUGINS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PLUGINS_PLUGINS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_PLUGINS_PLUGINS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PLUGINS_PLUGINS_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/ui/webui/mojo_web_ui_handler.h" | 10 #include "chrome/browser/ui/webui/mojo_web_ui_handler.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 mojom::PluginFilePtr GeneratePluginFile(const content::WebPluginInfo& plugin, | 48 mojom::PluginFilePtr GeneratePluginFile(const content::WebPluginInfo& plugin, |
| 49 const base::string16& group_name, | 49 const base::string16& group_name, |
| 50 bool plugin_enabled) const; | 50 bool plugin_enabled) const; |
| 51 | 51 |
| 52 // Detect a plugin's enabled mode (one of enabledByUser, disabledByUser, | 52 // Detect a plugin's enabled mode (one of enabledByUser, disabledByUser, |
| 53 // enabledByPolicy, disabledByPolicy). | 53 // enabledByPolicy, disabledByPolicy). |
| 54 std::string GetPluginEnabledMode(const base::string16& plugin_name, | 54 std::string GetPluginEnabledMode(const base::string16& plugin_name, |
| 55 const base::string16& group_name, | 55 const base::string16& group_name, |
| 56 bool plugin_enabled) const; | 56 bool plugin_enabled) const; |
| 57 | 57 |
| 58 // Returns whether the policy for the current profile is "Click To Play" i.e. |
| 59 // DefaultPluginsSetting is 3 (ASK). |
| 60 bool GetClickToPlayPolicyEnabled() const; |
| 61 |
| 58 // Detect a plugin group's enabled mode (one of enabledByUser, disabledByUser, | 62 // Detect a plugin group's enabled mode (one of enabledByUser, disabledByUser, |
| 59 // enabledByPolicy, disabledByPolicy, managedByPolicy). | 63 // enabledByPolicy, disabledByPolicy, managedByPolicy). |
| 60 std::string GetPluginGroupEnabledMode( | 64 std::string GetPluginGroupEnabledMode( |
| 61 const mojo::Array<mojom::PluginFilePtr>& plugin_files, | 65 const mojo::Array<mojom::PluginFilePtr>& plugin_files, |
| 62 bool group_enabled) const; | 66 bool group_enabled) const; |
| 63 | 67 |
| 64 // Called on the UI thread when the plugin info requested fom GetPluginsData | 68 // Called on the UI thread when the plugin info requested fom GetPluginsData |
| 65 // is ready. | 69 // is ready. |
| 66 void RespondWithPluginsData( | 70 void RespondWithPluginsData( |
| 67 const GetPluginsDataCallback& callback, | 71 const GetPluginsDataCallback& callback, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 85 | 89 |
| 86 // Handle back to the page by which JS methods can be called. | 90 // Handle back to the page by which JS methods can be called. |
| 87 mojom::PluginsPagePtr page_; | 91 mojom::PluginsPagePtr page_; |
| 88 | 92 |
| 89 base::WeakPtrFactory<PluginsPageHandler> weak_ptr_factory_; | 93 base::WeakPtrFactory<PluginsPageHandler> weak_ptr_factory_; |
| 90 | 94 |
| 91 DISALLOW_COPY_AND_ASSIGN(PluginsPageHandler); | 95 DISALLOW_COPY_AND_ASSIGN(PluginsPageHandler); |
| 92 }; | 96 }; |
| 93 | 97 |
| 94 #endif // CHROME_BROWSER_UI_WEBUI_PLUGINS_PLUGINS_HANDLER_H_ | 98 #endif // CHROME_BROWSER_UI_WEBUI_PLUGINS_PLUGINS_HANDLER_H_ |
| OLD | NEW |