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 #include "chrome/browser/plugins/plugin_prefs.h" | 5 #include "chrome/browser/plugins/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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
568 } | 568 } |
569 | 569 |
570 webkit::npapi::PluginList* PluginPrefs::GetPluginList() const { | 570 webkit::npapi::PluginList* PluginPrefs::GetPluginList() const { |
571 if (plugin_list_) | 571 if (plugin_list_) |
572 return plugin_list_; | 572 return plugin_list_; |
573 return PluginService::GetInstance()->GetPluginList(); | 573 return PluginService::GetInstance()->GetPluginList(); |
574 } | 574 } |
575 | 575 |
576 void PluginPrefs::GetPreferencesDataOnFileThread() { | 576 void PluginPrefs::GetPreferencesDataOnFileThread() { |
577 std::vector<webkit::WebPluginInfo> plugins; | 577 std::vector<webkit::WebPluginInfo> plugins; |
578 #if defined(ENABLE_PLUGINS) | |
jam
2012/12/19 01:55:15
ditto
nilesh
2012/12/19 21:07:44
Removed this file too.
| |
578 webkit::npapi::PluginList* plugin_list = GetPluginList(); | 579 webkit::npapi::PluginList* plugin_list = GetPluginList(); |
579 plugin_list->GetPluginsNoRefresh(&plugins); | 580 plugin_list->GetPluginsNoRefresh(&plugins); |
581 #endif | |
580 | 582 |
581 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 583 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
582 base::Bind(&PluginPrefs::OnUpdatePreferences, this, plugins)); | 584 base::Bind(&PluginPrefs::OnUpdatePreferences, this, plugins)); |
583 } | 585 } |
584 | 586 |
585 void PluginPrefs::OnUpdatePreferences( | 587 void PluginPrefs::OnUpdatePreferences( |
586 const std::vector<webkit::WebPluginInfo>& plugins) { | 588 const std::vector<webkit::WebPluginInfo>& plugins) { |
587 if (!prefs_) | 589 if (!prefs_) |
588 return; | 590 return; |
589 | 591 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
631 } | 633 } |
632 } | 634 } |
633 | 635 |
634 void PluginPrefs::NotifyPluginStatusChanged() { | 636 void PluginPrefs::NotifyPluginStatusChanged() { |
635 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 637 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
636 content::NotificationService::current()->Notify( | 638 content::NotificationService::current()->Notify( |
637 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, | 639 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, |
638 content::Source<Profile>(profile_), | 640 content::Source<Profile>(profile_), |
639 content::NotificationService::NoDetails()); | 641 content::NotificationService::NoDetails()); |
640 } | 642 } |
OLD | NEW |