Chromium Code Reviews

Side by Side Diff: chrome/browser/ui/views/content_setting_bubble_contents.cc

Issue 5516004: Clean up PluginGroup and related code. (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.
Jump to:
View unified diff | | 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/views/content_setting_bubble_contents.h" 5 #include "chrome/browser/views/content_setting_bubble_contents.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gdk/gdk.h> 8 #include <gdk/gdk.h>
9 #endif 9 #endif
10 10
(...skipping 212 matching lines...)
223 layout->StartRow(0, single_column_set_id); 223 layout->StartRow(0, single_column_set_id);
224 layout->AddView(title_label); 224 layout->AddView(title_label);
225 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 225 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
226 } 226 }
227 227
228 const std::set<std::string>& plugins = bubble_content.resource_identifiers; 228 const std::set<std::string>& plugins = bubble_content.resource_identifiers;
229 if (!plugins.empty()) { 229 if (!plugins.empty()) {
230 for (std::set<std::string>::const_iterator it = plugins.begin(); 230 for (std::set<std::string>::const_iterator it = plugins.begin();
231 it != plugins.end(); ++it) { 231 it != plugins.end(); ++it) {
232 std::wstring name; 232 std::wstring name;
233 NPAPI::PluginList::PluginMap groups; 233 NPAPI::PluginList::PluginGroup group;
234 NPAPI::PluginList::Singleton()->GetPluginGroups(false, &groups); 234 if (NPAPI::PluginList::Singleton()->GetPluginGroup(false, *it, &groups))
Bernhard Bauer 2010/12/03 16:13:28 There's something wrong here. I guess that's why i
Jakob Kummerow 2010/12/06 18:21:12 Done. This should of course match the code in cont
235 if (groups.find(*it) != groups.end()) 235 name = UTF16ToWide(group.GetGroupName());
236 name = UTF16ToWide(groups[*it]->GetGroupName());
237 else 236 else
238 name = UTF8ToWide(*it); 237 name = UTF8ToWide(*it);
239 layout->StartRow(0, single_column_set_id); 238 layout->StartRow(0, single_column_set_id);
240 layout->AddView(new views::Label(name)); 239 layout->AddView(new views::Label(name));
241 } 240 }
242 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 241 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
243 } 242 }
244 243
245 if (content_setting_bubble_model_->content_type() == 244 if (content_setting_bubble_model_->content_type() ==
246 CONTENT_SETTINGS_TYPE_POPUPS) { 245 CONTENT_SETTINGS_TYPE_POPUPS) {
(...skipping 127 matching lines...)
374 373
375 layout->StartRow(0, double_column_set_id); 374 layout->StartRow(0, double_column_set_id);
376 manage_link_ = new views::Link(UTF8ToWide(bubble_content.manage_link)); 375 manage_link_ = new views::Link(UTF8ToWide(bubble_content.manage_link));
377 manage_link_->SetController(this); 376 manage_link_->SetController(this);
378 layout->AddView(manage_link_); 377 layout->AddView(manage_link_);
379 378
380 close_button_ = 379 close_button_ =
381 new views::NativeButton(this, l10n_util::GetString(IDS_DONE)); 380 new views::NativeButton(this, l10n_util::GetString(IDS_DONE));
382 layout->AddView(close_button_); 381 layout->AddView(close_button_);
383 } 382 }
OLDNEW

Powered by Google App Engine