| 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 <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 } | 533 } |
| 534 | 534 |
| 535 void NotifierSettingsView::NotifierGroupChanged() { | 535 void NotifierSettingsView::NotifierGroupChanged() { |
| 536 std::vector<Notifier*> notifiers; | 536 std::vector<Notifier*> notifiers; |
| 537 if (provider_) | 537 if (provider_) |
| 538 provider_->GetNotifierList(¬ifiers); | 538 provider_->GetNotifierList(¬ifiers); |
| 539 | 539 |
| 540 UpdateContentsView(notifiers); | 540 UpdateContentsView(notifiers); |
| 541 } | 541 } |
| 542 | 542 |
| 543 void NotifierSettingsView::NotifierEnabledChanged(const NotifierId& notifier_id, |
| 544 bool enabled) {} |
| 545 |
| 543 void NotifierSettingsView::UpdateContentsView( | 546 void NotifierSettingsView::UpdateContentsView( |
| 544 const std::vector<Notifier*>& notifiers) { | 547 const std::vector<Notifier*>& notifiers) { |
| 545 buttons_.clear(); | 548 buttons_.clear(); |
| 546 | 549 |
| 547 views::View* contents_view = new views::View(); | 550 views::View* contents_view = new views::View(); |
| 548 contents_view->SetLayoutManager(new views::BoxLayout( | 551 contents_view->SetLayoutManager(new views::BoxLayout( |
| 549 views::BoxLayout::kVertical, settings::kHorizontalMargin, 0, 0)); | 552 views::BoxLayout::kVertical, settings::kHorizontalMargin, 0, 0)); |
| 550 | 553 |
| 551 views::View* contents_title_view = new views::View(); | 554 views::View* contents_title_view = new views::View(); |
| 552 contents_title_view->SetLayoutManager( | 555 contents_title_view->SetLayoutManager( |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 menu_anchor, | 718 menu_anchor, |
| 716 views::MENU_ANCHOR_BUBBLE_ABOVE, | 719 views::MENU_ANCHOR_BUBBLE_ABOVE, |
| 717 ui::MENU_SOURCE_MOUSE, | 720 ui::MENU_SOURCE_MOUSE, |
| 718 views::MenuRunner::CONTEXT_MENU)) | 721 views::MenuRunner::CONTEXT_MENU)) |
| 719 return; | 722 return; |
| 720 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent()); | 723 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent()); |
| 721 center_view->OnSettingsChanged(); | 724 center_view->OnSettingsChanged(); |
| 722 } | 725 } |
| 723 | 726 |
| 724 } // namespace message_center | 727 } // namespace message_center |
| OLD | NEW |