OLD | NEW |
---|---|
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 "chrome/browser/chromeos/preferences.h" | 5 #include "chrome/browser/chromeos/preferences.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/autoclick/autoclick_controller.h" | 9 #include "ash/autoclick/autoclick_controller.h" |
10 #include "ash/magnifier/magnifier_constants.h" | 10 #include "ash/magnifier/magnifier_constants.h" |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
522 UMA_HISTOGRAM_BOOLEAN( | 522 UMA_HISTOGRAM_BOOLEAN( |
523 "FileBrowser.DownloadDestination.IsGoogleDrive.Changed", | 523 "FileBrowser.DownloadDestination.IsGoogleDrive.Changed", |
524 default_download_to_drive); | 524 default_download_to_drive); |
525 else if (reason == REASON_INITIALIZATION) | 525 else if (reason == REASON_INITIALIZATION) |
526 UMA_HISTOGRAM_BOOLEAN( | 526 UMA_HISTOGRAM_BOOLEAN( |
527 "FileBrowser.DownloadDestination.IsGoogleDrive.Started", | 527 "FileBrowser.DownloadDestination.IsGoogleDrive.Started", |
528 default_download_to_drive); | 528 default_download_to_drive); |
529 } | 529 } |
530 if (reason != REASON_PREF_CHANGED || | 530 if (reason != REASON_PREF_CHANGED || |
531 pref_name == prefs::kTouchHudProjectionEnabled) { | 531 pref_name == prefs::kTouchHudProjectionEnabled) { |
532 if (user_is_active) { | 532 #if !defined(USE_ATHENA) |
Nikita (slow)
2014/09/08 09:53:17
I think user_is_active check was incorrectly remov
Dmitry Polukhin
2014/09/08 13:28:19
Done. Good catch!
| |
533 const bool enabled = touch_hud_projection_enabled_.GetValue(); | 533 const bool enabled = touch_hud_projection_enabled_.GetValue(); |
534 ash::Shell::GetInstance()->SetTouchHudProjectionEnabled(enabled); | 534 ash::Shell::GetInstance()->SetTouchHudProjectionEnabled(enabled); |
535 } | 535 #endif |
536 } | 536 } |
537 | 537 |
538 if (reason != REASON_PREF_CHANGED || | 538 if (reason != REASON_PREF_CHANGED || |
539 pref_name == prefs::kLanguageXkbAutoRepeatEnabled) { | 539 pref_name == prefs::kLanguageXkbAutoRepeatEnabled) { |
540 if (user_is_active) { | 540 if (user_is_active) { |
541 const bool enabled = xkb_auto_repeat_enabled_.GetValue(); | 541 const bool enabled = xkb_auto_repeat_enabled_.GetValue(); |
542 input_method::InputMethodManager::Get() | 542 input_method::InputMethodManager::Get() |
543 ->GetImeKeyboard() | 543 ->GetImeKeyboard() |
544 ->SetAutoRepeatEnabled(enabled); | 544 ->SetAutoRepeatEnabled(enabled); |
545 } | 545 } |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
663 touch_hud_projection_enabled_.SetValue(enabled); | 663 touch_hud_projection_enabled_.SetValue(enabled); |
664 } | 664 } |
665 | 665 |
666 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { | 666 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { |
667 if (active_user != user_) | 667 if (active_user != user_) |
668 return; | 668 return; |
669 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); | 669 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); |
670 } | 670 } |
671 | 671 |
672 } // namespace chromeos | 672 } // namespace chromeos |
OLD | NEW |