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

Side by Side Diff: ui/message_center/views/notifier_settings_view.cc

Issue 288033014: Remove Notifications Associated with an Extension When the Extension is Unchecked from the Message … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Unit Test That Left Dangling Pointer Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/message_center/views/notifier_settings_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(&notifiers); 538 provider_->GetNotifierList(&notifiers);
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
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
OLDNEW
« no previous file with comments | « ui/message_center/views/notifier_settings_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698