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

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

Issue 102483006: Getting rid of GetDefaultProfile & fixing multi user issues with accessibility (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit test Created 7 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 | Annotate | Revision Log
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_accessibility.h" 5 #include "ash/system/tray_accessibility.h"
6 6
7 #include "ash/accessibility_delegate.h" 7 #include "ash/accessibility_delegate.h"
8 #include "ash/metrics/user_metrics_recorder.h" 8 #include "ash/metrics/user_metrics_recorder.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/tray/hover_highlight_view.h" 10 #include "ash/system/tray/hover_highlight_view.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 CHECK(default_ == NULL); 319 CHECK(default_ == NULL);
320 320
321 // Shows accessibility menu if: 321 // Shows accessibility menu if:
322 // - on login screen (not logged in); 322 // - on login screen (not logged in);
323 // - "Enable accessibility menu" on chrome://settings is checked; 323 // - "Enable accessibility menu" on chrome://settings is checked;
324 // - or any of accessibility features is enabled 324 // - or any of accessibility features is enabled
325 // Otherwise, not shows it. 325 // Otherwise, not shows it.
326 AccessibilityDelegate* delegate = 326 AccessibilityDelegate* delegate =
327 Shell::GetInstance()->accessibility_delegate(); 327 Shell::GetInstance()->accessibility_delegate();
328 if (login_ != user::LOGGED_IN_NONE && 328 if (login_ != user::LOGGED_IN_NONE &&
329 !delegate->ShouldAlwaysShowAccessibilityMenu() && 329 !delegate->ShouldShowAccessibilityMenu() &&
330 // On login screen, keeps the initial visivility of the menu. 330 // On login screen, keeps the initial visibility of the menu.
331 (status != user::LOGGED_IN_LOCKED || !show_a11y_menu_on_lock_screen_) && 331 (status != user::LOGGED_IN_LOCKED || !show_a11y_menu_on_lock_screen_))
332 GetAccessibilityState() == A11Y_NONE)
333 return NULL; 332 return NULL;
334 333
335 CHECK(default_ == NULL); 334 CHECK(default_ == NULL);
336 default_ = new tray::DefaultAccessibilityView(this); 335 default_ = new tray::DefaultAccessibilityView(this);
337 336
338 return default_; 337 return default_;
339 } 338 }
340 339
341 views::View* TrayAccessibility::CreateDetailedView(user::LoginStatus status) { 340 views::View* TrayAccessibility::CreateDetailedView(user::LoginStatus status) {
342 CHECK(detailed_popup_ == NULL); 341 CHECK(detailed_popup_ == NULL);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 detailed_popup_->GetWidget()->Close(); 387 detailed_popup_->GetWidget()->Close();
389 if (detailed_menu_) 388 if (detailed_menu_)
390 detailed_menu_->GetWidget()->Close(); 389 detailed_menu_->GetWidget()->Close();
391 } 390 }
392 391
393 previous_accessibility_state_ = accessibility_state; 392 previous_accessibility_state_ = accessibility_state;
394 } 393 }
395 394
396 } // namespace internal 395 } // namespace internal
397 } // namespace ash 396 } // namespace ash
OLDNEW
« no previous file with comments | « ash/session_state_observer.cc ('k') | chrome/browser/chromeos/accessibility/accessibility_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698