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

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

Issue 2675983003: views::Separator cleanup. (Closed)
Patch Set: revert test change Created 3 years, 10 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>
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 layout->AddPaddingRow(0, related_control_vertical_spacing); 413 layout->AddPaddingRow(0, related_control_vertical_spacing);
414 layout->StartRow(0, kSingleColumnSetId); 414 layout->StartRow(0, kSingleColumnSetId);
415 layout->AddView(custom_link_); 415 layout->AddView(custom_link_);
416 bubble_content_empty = false; 416 bubble_content_empty = false;
417 } 417 }
418 418
419 if (!bubble_content_empty) { 419 if (!bubble_content_empty) {
420 if (!layout_delegate->IsHarmonyMode()) { 420 if (!layout_delegate->IsHarmonyMode()) {
421 layout->AddPaddingRow(0, related_control_vertical_spacing); 421 layout->AddPaddingRow(0, related_control_vertical_spacing);
422 layout->StartRow(0, kSingleColumnSetId); 422 layout->StartRow(0, kSingleColumnSetId);
423 layout->AddView(new views::Separator(views::Separator::HORIZONTAL), 1, 1, 423 layout->AddView(new views::Separator(), 1, 1, GridLayout::FILL,
424 GridLayout::FILL, GridLayout::FILL); 424 GridLayout::FILL);
425 } 425 }
426 layout->AddPaddingRow(0, related_control_vertical_spacing); 426 layout->AddPaddingRow(0, related_control_vertical_spacing);
427 } 427 }
428 } 428 }
429 429
430 views::View* ContentSettingBubbleContents::CreateExtraView() { 430 views::View* ContentSettingBubbleContents::CreateExtraView() {
431 if (content_setting_bubble_model_->bubble_content() 431 if (content_setting_bubble_model_->bubble_content()
432 .show_manage_text_as_button) { 432 .show_manage_text_as_button) {
433 manage_button_ = views::MdTextButton::CreateSecondaryUiButton( 433 manage_button_ = views::MdTextButton::CreateSecondaryUiButton(
434 this, base::UTF8ToUTF16( 434 this, base::UTF8ToUTF16(
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 DCHECK(i != list_item_links_.end()); 507 DCHECK(i != list_item_links_.end());
508 content_setting_bubble_model_->OnListItemClicked(i->second); 508 content_setting_bubble_model_->OnListItemClicked(i->second);
509 } 509 }
510 510
511 void ContentSettingBubbleContents::OnPerformAction(views::Combobox* combobox) { 511 void ContentSettingBubbleContents::OnPerformAction(views::Combobox* combobox) {
512 MediaComboboxModel* model = 512 MediaComboboxModel* model =
513 static_cast<MediaComboboxModel*>(combobox->model()); 513 static_cast<MediaComboboxModel*>(combobox->model());
514 content_setting_bubble_model_->OnMediaMenuClicked( 514 content_setting_bubble_model_->OnMediaMenuClicked(
515 model->type(), model->GetDevices()[combobox->selected_index()].id); 515 model->type(), model->GetDevices()[combobox->selected_index()].id);
516 } 516 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698