OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/login_display_host_impl.h" | 5 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/audio/sounds.h" | 9 #include "ash/audio/sounds.h" |
10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 // A class to observe an implicit animation and invokes the callback after the | 141 // A class to observe an implicit animation and invokes the callback after the |
142 // animation is completed. | 142 // animation is completed. |
143 class AnimationObserver : public ui::ImplicitAnimationObserver { | 143 class AnimationObserver : public ui::ImplicitAnimationObserver { |
144 public: | 144 public: |
145 explicit AnimationObserver(const base::Closure& callback) | 145 explicit AnimationObserver(const base::Closure& callback) |
146 : callback_(callback) {} | 146 : callback_(callback) {} |
147 virtual ~AnimationObserver() {} | 147 virtual ~AnimationObserver() {} |
148 | 148 |
149 private: | 149 private: |
150 // ui::ImplicitAnimationObserver implementation: | 150 // ui::ImplicitAnimationObserver implementation: |
151 virtual void OnImplicitAnimationsCompleted() OVERRIDE { | 151 virtual void OnImplicitAnimationsCompleted() override { |
152 callback_.Run(); | 152 callback_.Run(); |
153 delete this; | 153 delete this; |
154 } | 154 } |
155 | 155 |
156 base::Closure callback_; | 156 base::Closure callback_; |
157 | 157 |
158 DISALLOW_COPY_AND_ASSIGN(AnimationObserver); | 158 DISALLOW_COPY_AND_ASSIGN(AnimationObserver); |
159 }; | 159 }; |
160 | 160 |
161 // ShowLoginWizard is split into two parts. This function is sometimes called | 161 // ShowLoginWizard is split into two parts. This function is sometimes called |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 } | 215 } |
216 | 216 |
217 // A login implementation of WidgetDelegate. | 217 // A login implementation of WidgetDelegate. |
218 class LoginWidgetDelegate : public views::WidgetDelegate { | 218 class LoginWidgetDelegate : public views::WidgetDelegate { |
219 public: | 219 public: |
220 explicit LoginWidgetDelegate(views::Widget* widget) : widget_(widget) { | 220 explicit LoginWidgetDelegate(views::Widget* widget) : widget_(widget) { |
221 } | 221 } |
222 virtual ~LoginWidgetDelegate() {} | 222 virtual ~LoginWidgetDelegate() {} |
223 | 223 |
224 // Overridden from WidgetDelegate: | 224 // Overridden from WidgetDelegate: |
225 virtual void DeleteDelegate() OVERRIDE { | 225 virtual void DeleteDelegate() override { |
226 delete this; | 226 delete this; |
227 } | 227 } |
228 virtual views::Widget* GetWidget() OVERRIDE { | 228 virtual views::Widget* GetWidget() override { |
229 return widget_; | 229 return widget_; |
230 } | 230 } |
231 virtual const views::Widget* GetWidget() const OVERRIDE { | 231 virtual const views::Widget* GetWidget() const override { |
232 return widget_; | 232 return widget_; |
233 } | 233 } |
234 virtual bool CanActivate() const OVERRIDE { | 234 virtual bool CanActivate() const override { |
235 return true; | 235 return true; |
236 } | 236 } |
237 virtual bool ShouldAdvanceFocusToTopLevelWidget() const OVERRIDE { | 237 virtual bool ShouldAdvanceFocusToTopLevelWidget() const override { |
238 return true; | 238 return true; |
239 } | 239 } |
240 | 240 |
241 private: | 241 private: |
242 views::Widget* widget_; | 242 views::Widget* widget_; |
243 | 243 |
244 DISALLOW_COPY_AND_ASSIGN(LoginWidgetDelegate); | 244 DISALLOW_COPY_AND_ASSIGN(LoginWidgetDelegate); |
245 }; | 245 }; |
246 | 246 |
247 // Disables virtual keyboard overscroll. Login UI will scroll user pods | 247 // Disables virtual keyboard overscroll. Login UI will scroll user pods |
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 scoped_ptr<locale_util::SwitchLanguageCallback> callback( | 1296 scoped_ptr<locale_util::SwitchLanguageCallback> callback( |
1297 new locale_util::SwitchLanguageCallback( | 1297 new locale_util::SwitchLanguageCallback( |
1298 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); | 1298 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); |
1299 | 1299 |
1300 // Load locale keyboards here. Hardware layout would be automatically enabled. | 1300 // Load locale keyboards here. Hardware layout would be automatically enabled. |
1301 locale_util::SwitchLanguage( | 1301 locale_util::SwitchLanguage( |
1302 locale, true, true /* login_layouts_only */, callback.Pass()); | 1302 locale, true, true /* login_layouts_only */, callback.Pass()); |
1303 } | 1303 } |
1304 | 1304 |
1305 } // namespace chromeos | 1305 } // namespace chromeos |
OLD | NEW |