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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 GridLayout::CENTER, GridLayout::CENTER, 0, GridLayout::USE_PREF, 0, 0); | 462 GridLayout::CENTER, GridLayout::CENTER, 0, GridLayout::USE_PREF, 0, 0); |
463 } | 463 } |
464 | 464 |
465 layout->StartRow(0, 0); | 465 layout->StartRow(0, 0); |
466 layout->AddView(checkbox_); | 466 layout->AddView(checkbox_); |
467 if (has_icon_view) | 467 if (has_icon_view) |
468 layout->AddView(icon_view_.get()); | 468 layout->AddView(icon_view_.get()); |
469 layout->AddView(name_view_); | 469 layout->AddView(name_view_); |
470 if (has_learn_more) | 470 if (has_learn_more) |
471 layout->AddView(learn_more_); | 471 layout->AddView(learn_more_); |
| 472 |
| 473 Layout(); |
472 } | 474 } |
473 | 475 |
474 NotifierSettingsView::NotifierSettingsView(NotifierSettingsProvider* provider) | 476 NotifierSettingsView::NotifierSettingsView(NotifierSettingsProvider* provider) |
475 : title_arrow_(NULL), | 477 : title_arrow_(NULL), |
476 title_label_(NULL), | 478 title_label_(NULL), |
477 notifier_group_selector_(NULL), | 479 notifier_group_selector_(NULL), |
478 scroller_(NULL), | 480 scroller_(NULL), |
479 provider_(provider) { | 481 provider_(provider) { |
480 // |provider_| may be NULL in tests. | 482 // |provider_| may be NULL in tests. |
481 if (provider_) | 483 if (provider_) |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 menu_anchor, | 706 menu_anchor, |
705 views::MenuItemView::BUBBLE_ABOVE, | 707 views::MenuItemView::BUBBLE_ABOVE, |
706 ui::MENU_SOURCE_MOUSE, | 708 ui::MENU_SOURCE_MOUSE, |
707 views::MenuRunner::CONTEXT_MENU)) | 709 views::MenuRunner::CONTEXT_MENU)) |
708 return; | 710 return; |
709 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent()); | 711 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent()); |
710 center_view->OnSettingsChanged(); | 712 center_view->OnSettingsChanged(); |
711 } | 713 } |
712 | 714 |
713 } // namespace message_center | 715 } // namespace message_center |
OLD | NEW |