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

Side by Side Diff: ash/system/tray/system_tray.cc

Issue 1523953004: Fix volume slider to emit value changed events and do not focus system tray item for transient views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/system/tray/system_tray.h" 5 #include "ash/system/tray/system_tray.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/metrics/user_metrics_recorder.h" 8 #include "ash/metrics/user_metrics_recorder.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 user::LoginStatus login_status = 92 user::LoginStatus login_status =
93 Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus(); 93 Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus();
94 bubble_->InitView(anchor, login_status, init_params); 94 bubble_->InitView(anchor, login_status, init_params);
95 bubble_wrapper_.reset(new TrayBubbleWrapper(tray, bubble_->bubble_view())); 95 bubble_wrapper_.reset(new TrayBubbleWrapper(tray, bubble_->bubble_view()));
96 // The system bubble should not have an arrow. 96 // The system bubble should not have an arrow.
97 bubble_->bubble_view()->SetArrowPaintType( 97 bubble_->bubble_view()->SetArrowPaintType(
98 views::BubbleBorder::PAINT_NONE); 98 views::BubbleBorder::PAINT_NONE);
99 is_persistent_ = is_persistent; 99 is_persistent_ = is_persistent;
100 100
101 // If ChromeVox is enabled, focus the default item if no item is focused. 101 // If ChromeVox is enabled, focus the default item if no item is focused.
102 if (Shell::GetInstance()->accessibility_delegate()-> 102 if (Shell::GetInstance()
103 IsSpokenFeedbackEnabled()) { 103 ->accessibility_delegate()
104 ->IsSpokenFeedbackEnabled() &&
105 !is_persistent) {
oshima 2015/12/15 23:52:39 Am I correct that we do not want to set the focus
David Tseng 2015/12/16 16:47:49 That's correct. The semantics are important here.
104 bubble_->FocusDefaultIfNeeded(); 106 bubble_->FocusDefaultIfNeeded();
105 } 107 }
106 } 108 }
107 109
108 // Convenience accessors: 110 // Convenience accessors:
109 SystemTrayBubble* bubble() const { return bubble_.get(); } 111 SystemTrayBubble* bubble() const { return bubble_.get(); }
110 SystemTrayBubble::BubbleType bubble_type() const { 112 SystemTrayBubble::BubbleType bubble_type() const {
111 return bubble_->bubble_type(); 113 return bubble_->bubble_type();
112 } 114 }
113 TrayBubbleView* bubble_view() const { return bubble_->bubble_view(); } 115 TrayBubbleView* bubble_view() const { return bubble_->bubble_view(); }
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 system_bubble_.reset(); 732 system_bubble_.reset();
731 // When closing a system bubble with the alternate shelf layout, we need to 733 // When closing a system bubble with the alternate shelf layout, we need to
732 // turn off the active tinting of the shelf. 734 // turn off the active tinting of the shelf.
733 if (full_system_tray_menu_) { 735 if (full_system_tray_menu_) {
734 SetDrawBackgroundAsActive(false); 736 SetDrawBackgroundAsActive(false);
735 full_system_tray_menu_ = false; 737 full_system_tray_menu_ = false;
736 } 738 }
737 } 739 }
738 740
739 } // namespace ash 741 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698