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

Side by Side Diff: ash/common/system/tray_accessibility.cc

Issue 2775973002: Promotes more accessors from WmShell to Shell (Closed)
Patch Set: feedback Created 3 years, 9 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 | « ash/common/system/tray/system_tray_controller.cc ('k') | ash/common/system/user/tray_user.cc » ('j') | 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) 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/common/system/tray_accessibility.h" 5 #include "ash/common/system/tray_accessibility.h"
6 6
7 #include "ash/common/accessibility_delegate.h" 7 #include "ash/common/accessibility_delegate.h"
8 #include "ash/common/accessibility_types.h" 8 #include "ash/common/accessibility_types.h"
9 #include "ash/common/session/session_state_delegate.h" 9 #include "ash/common/session/session_state_delegate.h"
10 #include "ash/common/system/tray/hover_highlight_view.h" 10 #include "ash/common/system/tray/hover_highlight_view.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 UMA_ACCESSIBILITY), 327 UMA_ACCESSIBILITY),
328 default_(NULL), 328 default_(NULL),
329 detailed_popup_(NULL), 329 detailed_popup_(NULL),
330 detailed_menu_(NULL), 330 detailed_menu_(NULL),
331 request_popup_view_state_(A11Y_NONE), 331 request_popup_view_state_(A11Y_NONE),
332 tray_icon_visible_(false), 332 tray_icon_visible_(false),
333 login_(GetCurrentLoginStatus()), 333 login_(GetCurrentLoginStatus()),
334 previous_accessibility_state_(GetAccessibilityState()), 334 previous_accessibility_state_(GetAccessibilityState()),
335 show_a11y_menu_on_lock_screen_(true) { 335 show_a11y_menu_on_lock_screen_(true) {
336 DCHECK(system_tray); 336 DCHECK(system_tray);
337 WmShell::Get()->system_tray_notifier()->AddAccessibilityObserver(this); 337 Shell::Get()->system_tray_notifier()->AddAccessibilityObserver(this);
338 } 338 }
339 339
340 TrayAccessibility::~TrayAccessibility() { 340 TrayAccessibility::~TrayAccessibility() {
341 WmShell::Get()->system_tray_notifier()->RemoveAccessibilityObserver(this); 341 Shell::Get()->system_tray_notifier()->RemoveAccessibilityObserver(this);
342 } 342 }
343 343
344 void TrayAccessibility::SetTrayIconVisible(bool visible) { 344 void TrayAccessibility::SetTrayIconVisible(bool visible) {
345 if (tray_view()) 345 if (tray_view())
346 tray_view()->SetVisible(visible); 346 tray_view()->SetVisible(visible);
347 tray_icon_visible_ = visible; 347 tray_icon_visible_ = visible;
348 } 348 }
349 349
350 tray::AccessibilityDetailedView* TrayAccessibility::CreateDetailedMenu() { 350 tray::AccessibilityDetailedView* TrayAccessibility::CreateDetailedMenu() {
351 return new tray::AccessibilityDetailedView(this, login_); 351 return new tray::AccessibilityDetailedView(this, login_);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 if (detailed_popup_) 439 if (detailed_popup_)
440 detailed_popup_->GetWidget()->Close(); 440 detailed_popup_->GetWidget()->Close();
441 if (detailed_menu_) 441 if (detailed_menu_)
442 detailed_menu_->GetWidget()->Close(); 442 detailed_menu_->GetWidget()->Close();
443 } 443 }
444 444
445 previous_accessibility_state_ = accessibility_state; 445 previous_accessibility_state_ = accessibility_state;
446 } 446 }
447 447
448 } // namespace ash 448 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/system_tray_controller.cc ('k') | ash/common/system/user/tray_user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698