OLD | NEW |
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_blocked_bubble_contents.h" | 5 #include "chrome/browser/views/content_blocked_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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 views::Separator* separator = new views::Separator; | 207 views::Separator* separator = new views::Separator; |
208 layout->StartRow(0, single_column_set_id); | 208 layout->StartRow(0, single_column_set_id); |
209 layout->AddView(separator); | 209 layout->AddView(separator); |
210 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); | 210 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); |
211 } | 211 } |
212 | 212 |
213 const ContentSettingBubbleModel::RadioGroups& radio_groups = | 213 const ContentSettingBubbleModel::RadioGroups& radio_groups = |
214 content_setting_bubble_model_->bubble_content().radio_groups; | 214 content_setting_bubble_model_->bubble_content().radio_groups; |
215 for (ContentSettingBubbleModel::RadioGroups::const_iterator i = | 215 for (ContentSettingBubbleModel::RadioGroups::const_iterator i = |
216 radio_groups.begin(); i != radio_groups.end(); ++i) { | 216 radio_groups.begin(); i != radio_groups.end(); ++i) { |
| 217 if (!i->title.empty()) { |
| 218 views::Label* title_label = new views::Label(UTF8ToWide(i->title)); |
| 219 layout->StartRow(0, single_column_set_id); |
| 220 layout->AddView(title_label); |
| 221 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); |
| 222 } |
217 const ContentSettingBubbleModel::RadioItems& radio_items = i->radio_items; | 223 const ContentSettingBubbleModel::RadioItems& radio_items = i->radio_items; |
218 RadioGroup radio_group; | 224 RadioGroup radio_group; |
219 for (ContentSettingBubbleModel::RadioItems::const_iterator j = | 225 for (ContentSettingBubbleModel::RadioItems::const_iterator j = |
220 radio_items.begin(); j != radio_items.end(); ++j) { | 226 radio_items.begin(); j != radio_items.end(); ++j) { |
221 views::RadioButton* radio = new views::RadioButton( | 227 views::RadioButton* radio = new views::RadioButton( |
222 UTF8ToWide(*j), i - radio_groups.begin()); | 228 UTF8ToWide(*j), i - radio_groups.begin()); |
223 radio->set_listener(this); | 229 radio->set_listener(this); |
224 radio_group.push_back(radio); | 230 radio_group.push_back(radio); |
225 layout->StartRow(0, single_column_set_id); | 231 layout->StartRow(0, single_column_set_id); |
226 layout->AddView(radio); | 232 layout->AddView(radio); |
(...skipping 21 matching lines...) Expand all Loading... |
248 manage_link_ = new views::Link(UTF8ToWide(bubble_content.manage_link)); | 254 manage_link_ = new views::Link(UTF8ToWide(bubble_content.manage_link)); |
249 manage_link_->SetController(this); | 255 manage_link_->SetController(this); |
250 | 256 |
251 layout->StartRow(0, double_column_set_id); | 257 layout->StartRow(0, double_column_set_id); |
252 layout->AddView(manage_link_); | 258 layout->AddView(manage_link_); |
253 | 259 |
254 close_button_ = | 260 close_button_ = |
255 new views::NativeButton(this, l10n_util::GetString(IDS_DONE)); | 261 new views::NativeButton(this, l10n_util::GetString(IDS_DONE)); |
256 layout->AddView(close_button_); | 262 layout->AddView(close_button_); |
257 } | 263 } |
OLD | NEW |