| 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/login/login_display_host_impl.h" | 5 #include "chrome/browser/chromeos/login/login_display_host_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/desktop_background/desktop_background_controller.h" | 9 #include "ash/desktop_background/desktop_background_controller.h" |
| 10 #include "ash/desktop_background/user_wallpaper_delegate.h" | 10 #include "ash/desktop_background/user_wallpaper_delegate.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 PrefService* prefs = g_browser_process->local_state(); | 143 PrefService* prefs = g_browser_process->local_state(); |
| 144 prefs->SetString(prefs::kHardwareKeyboardLayout, layout); | 144 prefs->SetString(prefs::kHardwareKeyboardLayout, layout); |
| 145 // This asks the file thread to save the prefs (i.e. doesn't block). | 145 // This asks the file thread to save the prefs (i.e. doesn't block). |
| 146 // The latest values of Local State reside in memory so we can safely | 146 // The latest values of Local State reside in memory so we can safely |
| 147 // get the value of kHardwareKeyboardLayout even if the data is not | 147 // get the value of kHardwareKeyboardLayout even if the data is not |
| 148 // yet saved to disk. | 148 // yet saved to disk. |
| 149 prefs->CommitPendingWrite(); | 149 prefs->CommitPendingWrite(); |
| 150 } | 150 } |
| 151 } | 151 } |
| 152 | 152 |
| 153 ui::Layer* GetLayer(views::Widget* widget) { | |
| 154 return widget->GetNativeView()->layer(); | |
| 155 } | |
| 156 | |
| 157 // A class to observe an implicit animation and invokes the callback after the | 153 // A class to observe an implicit animation and invokes the callback after the |
| 158 // animation is completed. | 154 // animation is completed. |
| 159 class AnimationObserver : public ui::ImplicitAnimationObserver { | 155 class AnimationObserver : public ui::ImplicitAnimationObserver { |
| 160 public: | 156 public: |
| 161 explicit AnimationObserver(const base::Closure& callback) | 157 explicit AnimationObserver(const base::Closure& callback) |
| 162 : callback_(callback) {} | 158 : callback_(callback) {} |
| 163 virtual ~AnimationObserver() {} | 159 virtual ~AnimationObserver() {} |
| 164 | 160 |
| 165 private: | 161 private: |
| 166 // ui::ImplicitAnimationObserver implementation: | 162 // ui::ImplicitAnimationObserver implementation: |
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1156 VLOG(1) << "Initial time zone: " << timezone_name; | 1152 VLOG(1) << "Initial time zone: " << timezone_name; |
| 1157 // Apply locale customizations only once to preserve whatever locale | 1153 // Apply locale customizations only once to preserve whatever locale |
| 1158 // user has changed to during OOBE. | 1154 // user has changed to during OOBE. |
| 1159 if (!timezone_name.empty()) { | 1155 if (!timezone_name.empty()) { |
| 1160 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( | 1156 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( |
| 1161 UTF8ToUTF16(timezone_name)); | 1157 UTF8ToUTF16(timezone_name)); |
| 1162 } | 1158 } |
| 1163 } | 1159 } |
| 1164 | 1160 |
| 1165 } // namespace chromeos | 1161 } // namespace chromeos |
| OLD | NEW |