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

Side by Side Diff: chrome/browser/pepper_flash_settings_manager.cc

Issue 10387161: Pepper Flash settings integration: add UI for "deauthorize content licenses". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes in response to Brett's suggestions. Created 8 years, 7 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/pepper_flash_settings_manager.h"
6
7 #include <vector>
8
9 #include "chrome/browser/plugin_prefs.h"
10 #include "content/public/browser/plugin_service.h"
11 #include "googleurl/src/gurl.h"
12 #include "webkit/plugins/plugin_constants.h"
13 #include "webkit/plugins/webplugininfo.h"
14
15 // static
16 bool PepperFlashSettingsManager::IsPepperFlashInUse(
17 PluginPrefs* plugin_prefs,
18 webkit::WebPluginInfo* plugin_info) {
19 if (!plugin_prefs)
20 return false;
21
22 content::PluginService* plugin_service =
23 content::PluginService::GetInstance();
24 std::vector<webkit::WebPluginInfo> plugins;
25 plugin_service->GetPluginInfoArray(
26 GURL(), kFlashPluginSwfMimeType, false, &plugins, NULL);
27
28 for (std::vector<webkit::WebPluginInfo>::iterator iter = plugins.begin();
29 iter != plugins.end(); ++iter) {
30 if (webkit::IsPepperPlugin(*iter) && plugin_prefs->IsPluginEnabled(*iter)) {
31 if (plugin_info)
32 *plugin_info = *iter;
33 return true;
34 }
35 }
36 return false;
37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698