Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/magnifier_key_scroller.h" | 7 #include "ash/accelerators/magnifier_key_scroller.h" |
| 8 #include "ash/accelerators/spoken_feedback_toggler.h" | 8 #include "ash/accelerators/spoken_feedback_toggler.h" |
| 9 #include "ash/accessibility_delegate.h" | 9 #include "ash/accessibility_delegate.h" |
| 10 #include "ash/wm/mru_window_tracker.h" | 10 #include "ash/wm/mru_window_tracker.h" |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 #include "chrome/browser/ui/ash/media_delegate_chromeos.h" | 30 #include "chrome/browser/ui/ash/media_delegate_chromeos.h" |
| 31 #include "chrome/browser/ui/ash/session_state_delegate_chromeos.h" | 31 #include "chrome/browser/ui/ash/session_state_delegate_chromeos.h" |
| 32 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" | 32 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
| 33 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" | 33 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" |
| 34 #include "chrome/browser/ui/browser.h" | 34 #include "chrome/browser/ui/browser.h" |
| 35 #include "chrome/browser/ui/browser_finder.h" | 35 #include "chrome/browser/ui/browser_finder.h" |
| 36 #include "chrome/browser/ui/browser_window.h" | 36 #include "chrome/browser/ui/browser_window.h" |
| 37 #include "chrome/grit/generated_resources.h" | 37 #include "chrome/grit/generated_resources.h" |
| 38 #include "chromeos/chromeos_switches.h" | 38 #include "chromeos/chromeos_switches.h" |
| 39 #include "components/arc/arc_bridge_service.h" | 39 #include "components/arc/arc_bridge_service.h" |
| 40 #include "components/arc/arc_service_manager.h" | |
| 40 #include "content/public/browser/notification_service.h" | 41 #include "content/public/browser/notification_service.h" |
| 41 #include "content/public/browser/user_metrics.h" | 42 #include "content/public/browser/user_metrics.h" |
| 42 #include "ui/aura/window.h" | 43 #include "ui/aura/window.h" |
| 43 #include "ui/base/ime/chromeos/input_method_manager.h" | 44 #include "ui/base/ime/chromeos/input_method_manager.h" |
| 44 #include "ui/base/l10n/l10n_util.h" | 45 #include "ui/base/l10n/l10n_util.h" |
| 45 | 46 |
| 46 namespace { | 47 namespace { |
| 47 | 48 |
| 48 void InitAfterFirstSessionStart() { | 49 void InitAfterFirstSessionStart() { |
| 49 // Restore focus after the user session is started. It's needed because some | 50 // Restore focus after the user session is started. It's needed because some |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 312 ChromeShellDelegate::ArcSessionObserver::ArcSessionObserver() { | 313 ChromeShellDelegate::ArcSessionObserver::ArcSessionObserver() { |
| 313 ash::Shell::GetInstance()->AddShellObserver(this); | 314 ash::Shell::GetInstance()->AddShellObserver(this); |
| 314 } | 315 } |
| 315 | 316 |
| 316 ChromeShellDelegate::ArcSessionObserver::~ArcSessionObserver() { | 317 ChromeShellDelegate::ArcSessionObserver::~ArcSessionObserver() { |
| 317 ash::Shell::GetInstance()->RemoveShellObserver(this); | 318 ash::Shell::GetInstance()->RemoveShellObserver(this); |
| 318 } | 319 } |
| 319 | 320 |
| 320 void ChromeShellDelegate::ArcSessionObserver::OnLoginStateChanged( | 321 void ChromeShellDelegate::ArcSessionObserver::OnLoginStateChanged( |
| 321 ash::user::LoginStatus status) { | 322 ash::user::LoginStatus status) { |
| 323 auto arc_bridge_service = arc::ArcServiceManager::Get()->arc_bridge_service(); | |
| 324 | |
| 322 switch (status) { | 325 switch (status) { |
| 323 case ash::user::LOGGED_IN_LOCKED: | 326 case ash::user::LOGGED_IN_LOCKED: |
| 324 case ash::user::LOGGED_IN_KIOSK_APP: | 327 case ash::user::LOGGED_IN_KIOSK_APP: |
| 325 return; | 328 return; |
| 326 | 329 |
| 327 case ash::user::LOGGED_IN_NONE: | 330 case ash::user::LOGGED_IN_NONE: |
| 328 arc::ArcBridgeService::Get()->Shutdown(); | 331 arc_bridge_service->Shutdown(); |
|
oshima
2015/12/04 18:33:34
I actually have a slight preference for the origin
denniskempin
2015/12/04 19:12:25
Sure, I don't feel strongly about this!
| |
| 329 break; | 332 break; |
| 330 | 333 |
| 331 case ash::user::LOGGED_IN_USER: | 334 case ash::user::LOGGED_IN_USER: |
| 332 case ash::user::LOGGED_IN_OWNER: | 335 case ash::user::LOGGED_IN_OWNER: |
| 333 case ash::user::LOGGED_IN_GUEST: | 336 case ash::user::LOGGED_IN_GUEST: |
| 334 case ash::user::LOGGED_IN_PUBLIC: | 337 case ash::user::LOGGED_IN_PUBLIC: |
| 335 case ash::user::LOGGED_IN_SUPERVISED: | 338 case ash::user::LOGGED_IN_SUPERVISED: |
| 336 if (arc::ArcBridgeService::GetEnabled( | 339 if (arc::ArcBridgeService::GetEnabled( |
| 337 base::CommandLine::ForCurrentProcess())) { | 340 base::CommandLine::ForCurrentProcess())) { |
| 338 arc::ArcBridgeService::Get()->HandleStartup(); | 341 arc_bridge_service->HandleStartup(); |
| 339 } | 342 } |
| 340 break; | 343 break; |
| 341 } | 344 } |
| 342 } | 345 } |
| OLD | NEW |