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

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

Issue 5961004: Revert 69755 - Move the NPAPI files from webkit/glue/plugins to webkit/plugin... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_exceptions_table_model.h" 5 #include "chrome/browser/plugin_exceptions_table_model.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/table_model_observer.h" 8 #include "app/table_model_observer.h"
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 127 }
128 128
129 void PluginExceptionsTableModel::ClearSettings() { 129 void PluginExceptionsTableModel::ClearSettings() {
130 settings_.clear(); 130 settings_.clear();
131 groups_.clear(); 131 groups_.clear();
132 row_counts_.clear(); 132 row_counts_.clear();
133 resources_.clear(); 133 resources_.clear();
134 } 134 }
135 135
136 void PluginExceptionsTableModel::GetPlugins( 136 void PluginExceptionsTableModel::GetPlugins(
137 std::vector<webkit::npapi::PluginGroup>* plugin_groups) { 137 std::vector<PluginGroup>* plugin_groups) {
138 webkit::npapi::PluginList::Singleton()->GetPluginGroups(false, plugin_groups); 138 NPAPI::PluginList::Singleton()->GetPluginGroups(false, plugin_groups);
139 } 139 }
140 140
141 void PluginExceptionsTableModel::LoadSettings() { 141 void PluginExceptionsTableModel::LoadSettings() {
142 int group_id = 0; 142 int group_id = 0;
143 std::vector<webkit::npapi::PluginGroup> plugins; 143 std::vector<PluginGroup> plugins;
144 GetPlugins(&plugins); 144 GetPlugins(&plugins);
145 for (size_t i = 0; i < plugins.size(); ++i) { 145 for (size_t i = 0; i < plugins.size(); ++i) {
146 std::string plugin = plugins[i].identifier(); 146 std::string plugin = plugins[i].identifier();
147 HostContentSettingsMap::SettingsForOneType settings; 147 HostContentSettingsMap::SettingsForOneType settings;
148 map_->GetSettingsForOneType(CONTENT_SETTINGS_TYPE_PLUGINS, 148 map_->GetSettingsForOneType(CONTENT_SETTINGS_TYPE_PLUGINS,
149 plugin, 149 plugin,
150 &settings); 150 &settings);
151 HostContentSettingsMap::SettingsForOneType otr_settings; 151 HostContentSettingsMap::SettingsForOneType otr_settings;
152 if (otr_map_) { 152 if (otr_map_) {
153 otr_map_->GetSettingsForOneType(CONTENT_SETTINGS_TYPE_PLUGINS, 153 otr_map_->GetSettingsForOneType(CONTENT_SETTINGS_TYPE_PLUGINS,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } 187 }
188 188
189 void PluginExceptionsTableModel::ReloadSettings() { 189 void PluginExceptionsTableModel::ReloadSettings() {
190 ClearSettings(); 190 ClearSettings();
191 LoadSettings(); 191 LoadSettings();
192 192
193 if (observer_) 193 if (observer_)
194 observer_->OnModelChanged(); 194 observer_->OnModelChanged();
195 } 195 }
196 196
OLDNEW
« no previous file with comments | « chrome/browser/plugin_exceptions_table_model.h ('k') | chrome/browser/plugin_exceptions_table_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698