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

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

Issue 2571613002: Convert Register Protocol Handler dialog for Harmony/Material Design (Closed)
Patch Set: More fixed nits Created 3 years, 11 months 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
OLDNEW
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/ui/views/content_setting_bubble_contents.h" 5 #include "chrome/browser/ui/views/content_setting_bubble_contents.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" 16 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
17 #include "chrome/browser/plugins/plugin_finder.h" 17 #include "chrome/browser/plugins/plugin_finder.h"
18 #include "chrome/browser/plugins/plugin_metadata.h" 18 #include "chrome/browser/plugins/plugin_metadata.h"
19 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" 19 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
20 #include "chrome/browser/ui/layout_constants.h" 20 #include "chrome/browser/ui/layout_constants.h"
21 #include "chrome/browser/ui/views/harmony/layout_delegate.h"
21 #include "chrome/grit/generated_resources.h" 22 #include "chrome/grit/generated_resources.h"
22 #include "components/content_settings/core/browser/host_content_settings_map.h" 23 #include "components/content_settings/core/browser/host_content_settings_map.h"
23 #include "components/strings/grit/components_strings.h" 24 #include "components/strings/grit/components_strings.h"
24 #include "content/public/browser/plugin_service.h" 25 #include "content/public/browser/plugin_service.h"
25 #include "content/public/browser/web_contents.h" 26 #include "content/public/browser/web_contents.h"
26 #include "ui/base/cursor/cursor.h" 27 #include "ui/base/cursor/cursor.h"
28 #include "ui/base/default_style.h"
27 #include "ui/base/l10n/l10n_util.h" 29 #include "ui/base/l10n/l10n_util.h"
28 #include "ui/base/models/simple_menu_model.h" 30 #include "ui/base/models/simple_menu_model.h"
29 #include "ui/base/resource/resource_bundle.h" 31 #include "ui/base/resource/resource_bundle.h"
30 #include "ui/gfx/font_list.h" 32 #include "ui/gfx/font_list.h"
31 #include "ui/gfx/text_utils.h" 33 #include "ui/gfx/text_utils.h"
34 #include "ui/views/controls/button/label_button_border.h"
32 #include "ui/views/controls/button/md_text_button.h" 35 #include "ui/views/controls/button/md_text_button.h"
33 #include "ui/views/controls/button/menu_button.h" 36 #include "ui/views/controls/button/menu_button.h"
34 #include "ui/views/controls/button/radio_button.h" 37 #include "ui/views/controls/button/radio_button.h"
35 #include "ui/views/controls/combobox/combobox.h" 38 #include "ui/views/controls/combobox/combobox.h"
36 #include "ui/views/controls/image_view.h" 39 #include "ui/views/controls/image_view.h"
37 #include "ui/views/controls/label.h" 40 #include "ui/views/controls/label.h"
38 #include "ui/views/controls/link.h" 41 #include "ui/views/controls/link.h"
39 #include "ui/views/controls/menu/menu_config.h" 42 #include "ui/views/controls/menu/menu_config.h"
40 #include "ui/views/controls/menu/menu_runner.h" 43 #include "ui/views/controls/menu/menu_runner.h"
41 #include "ui/views/controls/separator.h" 44 #include "ui/views/controls/separator.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } 177 }
175 178
176 ContentSettingBubbleContents::~ContentSettingBubbleContents() { 179 ContentSettingBubbleContents::~ContentSettingBubbleContents() {
177 // Must remove the children here so the comboboxes get destroyed before 180 // Must remove the children here so the comboboxes get destroyed before
178 // their associated models. 181 // their associated models.
179 RemoveAllChildViews(true); 182 RemoveAllChildViews(true);
180 } 183 }
181 184
182 gfx::Size ContentSettingBubbleContents::GetPreferredSize() const { 185 gfx::Size ContentSettingBubbleContents::GetPreferredSize() const {
183 gfx::Size preferred_size(views::View::GetPreferredSize()); 186 gfx::Size preferred_size(views::View::GetPreferredSize());
184 int preferred_width = 187 int preferred_width = LayoutDelegate::Get()->GetDialogPreferredWidth(
185 (!content_setting_bubble_model_->bubble_content().domain_lists.empty() && 188 LayoutDelegate::DialogWidthType::SMALL);
186 (kMinMultiLineContentsWidth > preferred_size.width())) 189 if (!preferred_width)
187 ? kMinMultiLineContentsWidth 190 preferred_width = (!content_setting_bubble_model_->bubble_content()
188 : preferred_size.width(); 191 .domain_lists.empty() &&
192 (kMinMultiLineContentsWidth > preferred_size.width()))
193 ? kMinMultiLineContentsWidth
194 : preferred_size.width();
195 else
196 preferred_width -= margins().width();
189 if (content_setting_bubble_model_->AsSubresourceFilterBubbleModel()) { 197 if (content_setting_bubble_model_->AsSubresourceFilterBubbleModel()) {
190 preferred_size.set_width(std::min(preferred_width, 198 preferred_size.set_width(std::min(preferred_width,
191 kMaxDefaultContentsWidth)); 199 kMaxDefaultContentsWidth));
192 } else { 200 } else {
193 preferred_size.set_width(std::min(preferred_width, kMaxContentsWidth)); 201 preferred_size.set_width(std::min(preferred_width, kMaxContentsWidth));
194 } 202 }
195 return preferred_size; 203 return preferred_size;
196 } 204 }
197 205
198 void ContentSettingBubbleContents::Init() { 206 void ContentSettingBubbleContents::Init() {
199 using views::GridLayout; 207 using views::GridLayout;
200 208
201 GridLayout* layout = new views::GridLayout(this); 209 GridLayout* layout = new views::GridLayout(this);
202 SetLayoutManager(layout); 210 SetLayoutManager(layout);
211 const LayoutDelegate* layout_delegate = LayoutDelegate::Get();
212 const int related_control_horizontal_spacing =
213 layout_delegate->GetLayoutDistance(
214 LayoutDelegate::LayoutDistanceType::
215 RELATED_CONTROL_HORIZONTAL_SPACING);
216 const int related_control_vertical_spacing =
217 layout_delegate->GetLayoutDistance(
218 LayoutDelegate::LayoutDistanceType::RELATED_CONTROL_VERTICAL_SPACING);
219 const int unrelated_control_vertical_spacing =
220 layout_delegate->GetLayoutDistance(
221 LayoutDelegate::LayoutDistanceType::
222 UNRELATED_CONTROL_VERTICAL_SPACING);
203 223
204 const int kSingleColumnSetId = 0; 224 const int kSingleColumnSetId = 0;
205 views::ColumnSet* column_set = layout->AddColumnSet(kSingleColumnSetId); 225 views::ColumnSet* column_set = layout->AddColumnSet(kSingleColumnSetId);
206 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1, 226 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1,
207 GridLayout::USE_PREF, 0, 0); 227 GridLayout::USE_PREF, 0, 0);
208 column_set->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); 228 column_set->AddPaddingColumn(0, related_control_horizontal_spacing);
209 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1, 229 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1,
210 GridLayout::USE_PREF, 0, 0); 230 GridLayout::USE_PREF, 0, 0);
211 231
212 const ContentSettingBubbleModel::BubbleContent& bubble_content = 232 const ContentSettingBubbleModel::BubbleContent& bubble_content =
213 content_setting_bubble_model_->bubble_content(); 233 content_setting_bubble_model_->bubble_content();
214 bool bubble_content_empty = true; 234 bool bubble_content_empty = true;
215 235
216 if (!bubble_content.title.empty()) { 236 if (!bubble_content.title.empty()) {
217 views::Label* title_label = new views::Label(bubble_content.title); 237 views::Label* title_label = new views::Label(bubble_content.title);
218 title_label->SetMultiLine(true); 238 title_label->SetMultiLine(true);
219 title_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 239 title_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
240 if (layout_delegate->IsHarmonyMode()) {
241 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
242 title_label->SetFontList(
243 rb.GetFontListWithDelta(ui::kTitleFontSizeDelta));
244 }
220 layout->StartRow(0, kSingleColumnSetId); 245 layout->StartRow(0, kSingleColumnSetId);
221 layout->AddView(title_label); 246 layout->AddView(title_label);
222 bubble_content_empty = false; 247 bubble_content_empty = false;
223 } 248 }
224 249
225 if (!bubble_content.message.empty()) { 250 if (!bubble_content.message.empty()) {
226 views::Label* message_label = new views::Label(bubble_content.message); 251 views::Label* message_label = new views::Label(bubble_content.message);
227 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); 252 layout->AddPaddingRow(0, unrelated_control_vertical_spacing);
228 message_label->SetMultiLine(true); 253 message_label->SetMultiLine(true);
229 message_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 254 message_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
230 layout->StartRow(0, kSingleColumnSetId); 255 layout->StartRow(0, kSingleColumnSetId);
231 layout->AddView(message_label); 256 layout->AddView(message_label);
232 bubble_content_empty = false; 257 bubble_content_empty = false;
233 } 258 }
234 259
235 if (!bubble_content.learn_more_link.empty()) { 260 if (!bubble_content.learn_more_link.empty()) {
236 learn_more_link_ = 261 learn_more_link_ =
237 new views::Link(base::UTF8ToUTF16(bubble_content.learn_more_link)); 262 new views::Link(base::UTF8ToUTF16(bubble_content.learn_more_link));
238 learn_more_link_->set_listener(this); 263 learn_more_link_->set_listener(this);
239 learn_more_link_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 264 learn_more_link_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
240 layout->AddView(learn_more_link_); 265 layout->AddView(learn_more_link_);
241 bubble_content_empty = false; 266 bubble_content_empty = false;
242 } 267 }
243 268
244 // Layout for the item list (blocked plugins and popups). 269 // Layout for the item list (blocked plugins and popups).
245 if (!bubble_content.list_items.empty()) { 270 if (!bubble_content.list_items.empty()) {
246 const int kItemListColumnSetId = 2; 271 const int kItemListColumnSetId = 2;
247 views::ColumnSet* item_list_column_set = 272 views::ColumnSet* item_list_column_set =
248 layout->AddColumnSet(kItemListColumnSetId); 273 layout->AddColumnSet(kItemListColumnSetId);
249 item_list_column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 0, 274 item_list_column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 0,
250 GridLayout::USE_PREF, 0, 0); 275 GridLayout::USE_PREF, 0, 0);
251 item_list_column_set->AddPaddingColumn( 276 item_list_column_set->AddPaddingColumn(0,
252 0, views::kRelatedControlHorizontalSpacing); 277 related_control_horizontal_spacing);
253 item_list_column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1, 278 item_list_column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1,
254 GridLayout::USE_PREF, 0, 0); 279 GridLayout::USE_PREF, 0, 0);
255 280
256 int row = 0; 281 int row = 0;
257 for (const ContentSettingBubbleModel::ListItem& list_item : 282 for (const ContentSettingBubbleModel::ListItem& list_item :
258 bubble_content.list_items) { 283 bubble_content.list_items) {
259 if (!bubble_content_empty) 284 if (!bubble_content_empty)
260 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 285 layout->AddPaddingRow(0, related_control_vertical_spacing);
261 layout->StartRow(0, kItemListColumnSetId); 286 layout->StartRow(0, kItemListColumnSetId);
262 if (list_item.has_link) { 287 if (list_item.has_link) {
263 views::Link* link = new views::Link(base::UTF8ToUTF16(list_item.title)); 288 views::Link* link = new views::Link(base::UTF8ToUTF16(list_item.title));
264 link->set_listener(this); 289 link->set_listener(this);
265 link->SetElideBehavior(gfx::ELIDE_MIDDLE); 290 link->SetElideBehavior(gfx::ELIDE_MIDDLE);
266 list_item_links_[link] = row; 291 list_item_links_[link] = row;
267 layout->AddView(new Favicon(list_item.image, this, link)); 292 layout->AddView(new Favicon(list_item.image, this, link));
268 layout->AddView(link); 293 layout->AddView(link);
269 } else { 294 } else {
270 views::ImageView* icon = new views::ImageView(); 295 views::ImageView* icon = new views::ImageView();
271 icon->SetImage(list_item.image.AsImageSkia()); 296 icon->SetImage(list_item.image.AsImageSkia());
272 layout->AddView(icon); 297 layout->AddView(icon);
273 layout->AddView(new views::Label(base::UTF8ToUTF16(list_item.title))); 298 layout->AddView(new views::Label(base::UTF8ToUTF16(list_item.title)));
274 } 299 }
275 row++; 300 row++;
276 bubble_content_empty = false; 301 bubble_content_empty = false;
277 } 302 }
278 } 303 }
279 304
280 const int indented_kSingleColumnSetId = 3; 305 const int indented_kSingleColumnSetId = 3;
281 // Insert a column set with greater indent. 306 // Insert a column set with greater indent.
282 views::ColumnSet* indented_single_column_set = 307 views::ColumnSet* indented_single_column_set =
283 layout->AddColumnSet(indented_kSingleColumnSetId); 308 layout->AddColumnSet(indented_kSingleColumnSetId);
284 indented_single_column_set->AddPaddingColumn(0, views::kCheckboxIndent); 309 indented_single_column_set->AddPaddingColumn(
310 0, layout_delegate->GetLayoutDistance(
311 LayoutDelegate::LayoutDistanceType::CHECKBOX_INDENT));
285 indented_single_column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 312 indented_single_column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL,
286 1, GridLayout::USE_PREF, 0, 0); 313 1, GridLayout::USE_PREF, 0, 0);
287 314
288 const ContentSettingBubbleModel::RadioGroup& radio_group = 315 const ContentSettingBubbleModel::RadioGroup& radio_group =
289 bubble_content.radio_group; 316 bubble_content.radio_group;
290 if (!radio_group.radio_items.empty()) { 317 if (!radio_group.radio_items.empty()) {
291 if (!bubble_content_empty) 318 if (!bubble_content_empty)
292 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 319 layout->AddPaddingRow(0, related_control_vertical_spacing);
293 for (ContentSettingBubbleModel::RadioItems::const_iterator i( 320 for (ContentSettingBubbleModel::RadioItems::const_iterator i(
294 radio_group.radio_items.begin()); 321 radio_group.radio_items.begin());
295 i != radio_group.radio_items.end(); ++i) { 322 i != radio_group.radio_items.end(); ++i) {
296 views::RadioButton* radio = 323 views::RadioButton* radio =
297 new views::RadioButton(base::UTF8ToUTF16(*i), 0); 324 new views::RadioButton(base::UTF8ToUTF16(*i), 0);
298 radio->SetEnabled(bubble_content.radio_group_enabled); 325 radio->SetEnabled(bubble_content.radio_group_enabled);
299 radio->set_listener(this); 326 radio->set_listener(this);
327 if (layout_delegate->IsHarmonyMode()) {
328 std::unique_ptr<views::LabelButtonBorder> border =
329 radio->CreateDefaultBorder();
330 gfx::Insets insets = border->GetInsets();
331 border->set_insets(
332 gfx::Insets(insets.top(), 0, insets.bottom(), insets.right()));
333 radio->SetBorder(std::move(border));
334 }
300 radio_group_.push_back(radio); 335 radio_group_.push_back(radio);
301 layout->StartRow(0, indented_kSingleColumnSetId); 336 layout->StartRow(0, indented_kSingleColumnSetId);
302 layout->AddView(radio); 337 layout->AddView(radio);
303 bubble_content_empty = false; 338 bubble_content_empty = false;
304 } 339 }
305 DCHECK(!radio_group_.empty()); 340 DCHECK(!radio_group_.empty());
306 // Now that the buttons have been added to the view hierarchy, it's safe 341 // Now that the buttons have been added to the view hierarchy, it's safe
307 // to call SetChecked() on them. 342 // to call SetChecked() on them.
308 radio_group_[radio_group.default_item]->SetChecked(true); 343 radio_group_[radio_group.default_item]->SetChecked(true);
309 } 344 }
310 345
311 // Layout code for the media device menus. 346 // Layout code for the media device menus.
312 if (content_setting_bubble_model_->AsMediaStreamBubbleModel()) { 347 if (content_setting_bubble_model_->AsMediaStreamBubbleModel()) {
313 const int kMediaMenuColumnSetId = 4; 348 const int kMediaMenuColumnSetId = 4;
314 views::ColumnSet* menu_column_set = 349 views::ColumnSet* menu_column_set =
315 layout->AddColumnSet(kMediaMenuColumnSetId); 350 layout->AddColumnSet(kMediaMenuColumnSetId);
316 menu_column_set->AddPaddingColumn(0, views::kCheckboxIndent); 351 menu_column_set->AddPaddingColumn(
352 0, layout_delegate->GetLayoutDistance(
353 LayoutDelegate::LayoutDistanceType::CHECKBOX_INDENT));
317 menu_column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 0, 354 menu_column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 0,
318 GridLayout::USE_PREF, 0, 0); 355 GridLayout::USE_PREF, 0, 0);
319 menu_column_set->AddPaddingColumn( 356 menu_column_set->AddPaddingColumn(0, related_control_horizontal_spacing);
320 0, views::kRelatedControlHorizontalSpacing);
321 menu_column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1, 357 menu_column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1,
322 GridLayout::USE_PREF, 0, 0); 358 GridLayout::USE_PREF, 0, 0);
323 359
324 for (ContentSettingBubbleModel::MediaMenuMap::const_iterator i( 360 for (ContentSettingBubbleModel::MediaMenuMap::const_iterator i(
325 bubble_content.media_menus.begin()); 361 bubble_content.media_menus.begin());
326 i != bubble_content.media_menus.end(); ++i) { 362 i != bubble_content.media_menus.end(); ++i) {
327 if (!bubble_content_empty) 363 if (!bubble_content_empty)
328 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 364 layout->AddPaddingRow(0, related_control_vertical_spacing);
329 layout->StartRow(0, kMediaMenuColumnSetId); 365 layout->StartRow(0, kMediaMenuColumnSetId);
330 366
331 views::Label* label = 367 views::Label* label =
332 new views::Label(base::UTF8ToUTF16(i->second.label)); 368 new views::Label(base::UTF8ToUTF16(i->second.label));
333 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 369 label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
334 layout->AddView(label); 370 layout->AddView(label);
335 371
336 combobox_models_.emplace_back(i->first); 372 combobox_models_.emplace_back(i->first);
337 MediaComboboxModel* model = &combobox_models_.back(); 373 MediaComboboxModel* model = &combobox_models_.back();
338 views::Combobox* combobox = new views::Combobox(model); 374 views::Combobox* combobox = new views::Combobox(model);
(...skipping 30 matching lines...) Expand all
369 } 405 }
370 bubble_content_empty = false; 406 bubble_content_empty = false;
371 } 407 }
372 408
373 if (!bubble_content.custom_link.empty()) { 409 if (!bubble_content.custom_link.empty()) {
374 custom_link_ = 410 custom_link_ =
375 new views::Link(base::UTF8ToUTF16(bubble_content.custom_link)); 411 new views::Link(base::UTF8ToUTF16(bubble_content.custom_link));
376 custom_link_->SetEnabled(bubble_content.custom_link_enabled); 412 custom_link_->SetEnabled(bubble_content.custom_link_enabled);
377 custom_link_->set_listener(this); 413 custom_link_->set_listener(this);
378 if (!bubble_content_empty) 414 if (!bubble_content_empty)
379 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 415 layout->AddPaddingRow(0, related_control_vertical_spacing);
380 layout->StartRow(0, kSingleColumnSetId); 416 layout->StartRow(0, kSingleColumnSetId);
381 layout->AddView(custom_link_); 417 layout->AddView(custom_link_);
382 bubble_content_empty = false; 418 bubble_content_empty = false;
383 } 419 }
384 420
385 if (!bubble_content_empty) { 421 if (!bubble_content_empty) {
386 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 422 if (!layout_delegate->IsHarmonyMode()) {
387 layout->StartRow(0, kSingleColumnSetId); 423 layout->AddPaddingRow(0, related_control_vertical_spacing);
388 layout->AddView(new views::Separator(views::Separator::HORIZONTAL), 1, 1, 424 layout->StartRow(0, kSingleColumnSetId);
389 GridLayout::FILL, GridLayout::FILL); 425 layout->AddView(new views::Separator(views::Separator::HORIZONTAL), 1, 1,
390 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 426 GridLayout::FILL, GridLayout::FILL);
427 }
428 layout->AddPaddingRow(0, related_control_vertical_spacing);
391 } 429 }
392 } 430 }
393 431
394 views::View* ContentSettingBubbleContents::CreateExtraView() { 432 views::View* ContentSettingBubbleContents::CreateExtraView() {
395 if (content_setting_bubble_model_->bubble_content() 433 if (content_setting_bubble_model_->bubble_content()
396 .show_manage_text_as_button) { 434 .show_manage_text_as_button) {
397 manage_button_ = views::MdTextButton::CreateSecondaryUiButton( 435 manage_button_ = views::MdTextButton::CreateSecondaryUiButton(
398 this, base::UTF8ToUTF16( 436 this, base::UTF8ToUTF16(
399 content_setting_bubble_model_->bubble_content().manage_text)); 437 content_setting_bubble_model_->bubble_content().manage_text));
400 return manage_button_; 438 return manage_button_;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 DCHECK(i != list_item_links_.end()); 507 DCHECK(i != list_item_links_.end());
470 content_setting_bubble_model_->OnListItemClicked(i->second); 508 content_setting_bubble_model_->OnListItemClicked(i->second);
471 } 509 }
472 510
473 void ContentSettingBubbleContents::OnPerformAction(views::Combobox* combobox) { 511 void ContentSettingBubbleContents::OnPerformAction(views::Combobox* combobox) {
474 MediaComboboxModel* model = 512 MediaComboboxModel* model =
475 static_cast<MediaComboboxModel*>(combobox->model()); 513 static_cast<MediaComboboxModel*>(combobox->model());
476 content_setting_bubble_model_->OnMediaMenuClicked( 514 content_setting_bubble_model_->OnMediaMenuClicked(
477 model->type(), model->GetDevices()[combobox->selected_index()].id); 515 model->type(), model->GetDevices()[combobox->selected_index()].id);
478 } 516 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | chrome/browser/ui/views/cookie_info_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698