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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 notifier_group_menu_model_.reset(new NotifierGroupMenuModel(provider_)); | 706 notifier_group_menu_model_.reset(new NotifierGroupMenuModel(provider_)); |
707 notifier_group_menu_runner_.reset( | 707 notifier_group_menu_runner_.reset( |
708 new views::MenuRunner(notifier_group_menu_model_.get())); | 708 new views::MenuRunner(notifier_group_menu_model_.get())); |
709 gfx::Rect menu_anchor = source->GetBoundsInScreen(); | 709 gfx::Rect menu_anchor = source->GetBoundsInScreen(); |
710 menu_anchor.Inset( | 710 menu_anchor.Inset( |
711 gfx::Insets(0, kMenuWhitespaceOffset, 0, kMenuWhitespaceOffset)); | 711 gfx::Insets(0, kMenuWhitespaceOffset, 0, kMenuWhitespaceOffset)); |
712 if (views::MenuRunner::MENU_DELETED == | 712 if (views::MenuRunner::MENU_DELETED == |
713 notifier_group_menu_runner_->RunMenuAt(GetWidget(), | 713 notifier_group_menu_runner_->RunMenuAt(GetWidget(), |
714 notifier_group_selector_, | 714 notifier_group_selector_, |
715 menu_anchor, | 715 menu_anchor, |
716 views::MenuItemView::BUBBLE_ABOVE, | 716 views::MENU_ANCHOR_BUBBLE_ABOVE, |
717 ui::MENU_SOURCE_MOUSE, | 717 ui::MENU_SOURCE_MOUSE, |
718 views::MenuRunner::CONTEXT_MENU)) | 718 views::MenuRunner::CONTEXT_MENU)) |
719 return; | 719 return; |
720 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent()); | 720 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent()); |
721 center_view->OnSettingsChanged(); | 721 center_view->OnSettingsChanged(); |
722 } | 722 } |
723 | 723 |
724 } // namespace message_center | 724 } // namespace message_center |
OLD | NEW |