| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ui/message_center/views/notifier_settings_view.h" | 5 #include "ui/message_center/views/notifier_settings_view.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 views::style::CONTEXT_DIALOG_TITLE); | 433 views::style::CONTEXT_DIALOG_TITLE); |
| 434 title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 434 title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 435 title_label_->SetMultiLine(true); | 435 title_label_->SetMultiLine(true); |
| 436 title_label_->SetBorder( | 436 title_label_->SetBorder( |
| 437 views::CreateEmptyBorder(kComputedTitleTopMargin, kTitleMargin, | 437 views::CreateEmptyBorder(kComputedTitleTopMargin, kTitleMargin, |
| 438 kComputedTitleBottomMargin, kTitleMargin)); | 438 kComputedTitleBottomMargin, kTitleMargin)); |
| 439 | 439 |
| 440 AddChildView(title_label_); | 440 AddChildView(title_label_); |
| 441 | 441 |
| 442 scroller_ = new views::ScrollView(); | 442 scroller_ = new views::ScrollView(); |
| 443 scroller_->SetBackgroundColor(kMessageCenterBackgroundColor); |
| 443 scroller_->SetVerticalScrollBar(new views::OverlayScrollBar(false)); | 444 scroller_->SetVerticalScrollBar(new views::OverlayScrollBar(false)); |
| 444 scroller_->SetHorizontalScrollBar(new views::OverlayScrollBar(true)); | 445 scroller_->SetHorizontalScrollBar(new views::OverlayScrollBar(true)); |
| 445 AddChildView(scroller_); | 446 AddChildView(scroller_); |
| 446 | 447 |
| 447 std::vector<std::unique_ptr<Notifier>> notifiers; | 448 std::vector<std::unique_ptr<Notifier>> notifiers; |
| 448 if (provider_) | 449 if (provider_) |
| 449 provider_->GetNotifierList(¬ifiers); | 450 provider_->GetNotifierList(¬ifiers); |
| 450 | 451 |
| 451 UpdateContentsView(std::move(notifiers)); | 452 UpdateContentsView(std::move(notifiers)); |
| 452 } | 453 } |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 provider_->SetNotifierEnabled((*iter)->notifier(), (*iter)->checked()); | 630 provider_->SetNotifierEnabled((*iter)->notifier(), (*iter)->checked()); |
| 630 } | 631 } |
| 631 | 632 |
| 632 void NotifierSettingsView::OnPerformAction(views::Combobox* combobox) { | 633 void NotifierSettingsView::OnPerformAction(views::Combobox* combobox) { |
| 633 provider_->SwitchToNotifierGroup(combobox->selected_index()); | 634 provider_->SwitchToNotifierGroup(combobox->selected_index()); |
| 634 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent()); | 635 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent()); |
| 635 center_view->OnSettingsChanged(); | 636 center_view->OnSettingsChanged(); |
| 636 } | 637 } |
| 637 | 638 |
| 638 } // namespace message_center | 639 } // namespace message_center |
| OLD | NEW |