OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/plugin_prefs.h" | 5 #include "chrome/browser/plugin_prefs.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
24 #include "chrome/browser/profiles/profile_keyed_service.h" | 24 #include "chrome/browser/profiles/profile_keyed_service.h" |
25 #include "chrome/browser/profiles/profile_manager.h" | 25 #include "chrome/browser/profiles/profile_manager.h" |
26 #include "chrome/common/chrome_content_client.h" | 26 #include "chrome/common/chrome_content_client.h" |
27 #include "chrome/common/chrome_notification_types.h" | 27 #include "chrome/common/chrome_notification_types.h" |
28 #include "chrome/common/chrome_paths.h" | 28 #include "chrome/common/chrome_paths.h" |
29 #include "chrome/common/chrome_switches.h" | 29 #include "chrome/common/chrome_switches.h" |
30 #include "chrome/common/pref_names.h" | 30 #include "chrome/common/pref_names.h" |
31 #include "content/browser/browser_thread.h" | 31 #include "content/browser/browser_thread.h" |
32 #include "content/browser/plugin_service.h" | 32 #include "content/browser/plugin_service.h" |
33 #include "content/common/notification_service.h" | 33 #include "content/public/browser/notification_service.h" |
34 #include "webkit/plugins/npapi/plugin_group.h" | 34 #include "webkit/plugins/npapi/plugin_group.h" |
35 #include "webkit/plugins/npapi/plugin_list.h" | 35 #include "webkit/plugins/npapi/plugin_list.h" |
36 #include "webkit/plugins/webplugininfo.h" | 36 #include "webkit/plugins/webplugininfo.h" |
37 | 37 |
38 namespace { | 38 namespace { |
39 | 39 |
40 // Default state for a plug-in (not state of the default plug-in!). | 40 // Default state for a plug-in (not state of the default plug-in!). |
41 // Accessed only on the UI thread. | 41 // Accessed only on the UI thread. |
42 base::LazyInstance<std::map<FilePath, bool> > g_default_plugin_state( | 42 base::LazyInstance<std::map<FilePath, bool> > g_default_plugin_state( |
43 base::LINKER_INITIALIZED); | 43 base::LINKER_INITIALIZED); |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 plugin_group_state_.find(name); | 533 plugin_group_state_.find(name); |
534 if (it != plugin_group_state_.end()) | 534 if (it != plugin_group_state_.end()) |
535 enabled = it->second; | 535 enabled = it->second; |
536 summary->SetBoolean("enabled", enabled); | 536 summary->SetBoolean("enabled", enabled); |
537 plugins_list->Append(summary); | 537 plugins_list->Append(summary); |
538 } | 538 } |
539 } | 539 } |
540 | 540 |
541 void PluginPrefs::NotifyPluginStatusChanged() { | 541 void PluginPrefs::NotifyPluginStatusChanged() { |
542 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 542 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
543 NotificationService::current()->Notify( | 543 content::NotificationService::current()->Notify( |
544 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, | 544 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, |
545 content::Source<Profile>(profile_), | 545 content::Source<Profile>(profile_), |
546 NotificationService::NoDetails()); | 546 content::NotificationService::NoDetails()); |
547 } | 547 } |
OLD | NEW |