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

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

Issue 2242733003: Partial revert of change to make Notification Center focusable after alt+shift+n (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | 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/message_center_view.h" 5 #include "ui/message_center/views/message_center_view.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 521
522 if (is_locked_) 522 if (is_locked_)
523 SetVisibilityMode(Mode::BUTTONS_ONLY, animate); 523 SetVisibilityMode(Mode::BUTTONS_ONLY, animate);
524 else if (settings_visible_) 524 else if (settings_visible_)
525 SetVisibilityMode(Mode::SETTINGS, animate); 525 SetVisibilityMode(Mode::SETTINGS, animate);
526 else if (no_message_views) 526 else if (no_message_views)
527 SetVisibilityMode(Mode::BUTTONS_ONLY, animate); 527 SetVisibilityMode(Mode::BUTTONS_ONLY, animate);
528 else 528 else
529 SetVisibilityMode(Mode::NOTIFICATIONS, animate); 529 SetVisibilityMode(Mode::NOTIFICATIONS, animate);
530 530
531 if (no_message_views) {
532 scroller_->SetFocusBehavior(FocusBehavior::NEVER);
David Tseng 2016/08/12 18:11:05 Future note to xiyuan@ making this + scroller_-
533 } else {
534 #if defined(OS_MACOSX)
535 scroller_->SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY);
536 #else
537 scroller_->SetFocusBehavior(FocusBehavior::ALWAYS);
538 #endif
539 }
540
531 UpdateButtonBarStatus(); 541 UpdateButtonBarStatus();
532 542
533 if (focus_manager && focused_view) 543 if (focus_manager && focused_view)
534 focus_manager->SetFocusedView(focused_view); 544 focus_manager->SetFocusedView(focused_view);
535 545
536 if (scroller_->visible()) 546 if (scroller_->visible())
537 scroller_->InvalidateLayout(); 547 scroller_->InvalidateLayout();
538 PreferredSizeChanged(); 548 PreferredSizeChanged();
539 Layout(); 549 Layout();
540 } 550 }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 // Disable the close-all button since no notification is visible. 633 // Disable the close-all button since no notification is visible.
624 button_bar_->SetCloseAllButtonEnabled(false); 634 button_bar_->SetCloseAllButtonEnabled(false);
625 } 635 }
626 } 636 }
627 637
628 void MessageCenterView::SetNotificationViewForTest(MessageView* view) { 638 void MessageCenterView::SetNotificationViewForTest(MessageView* view) {
629 message_list_view_->AddNotificationAt(view, 0); 639 message_list_view_->AddNotificationAt(view, 0);
630 } 640 }
631 641
632 } // namespace message_center 642 } // namespace message_center
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698