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 "apps/native_app_window.h" | 7 #include "apps/native_app_window.h" |
8 #include "apps/shell_window_registry.h" | 8 #include "apps/shell_window_registry.h" |
9 #include "ash/keyboard_overlay/keyboard_overlay_view.h" | 9 #include "ash/keyboard_overlay/keyboard_overlay_view.h" |
10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 #include "chromeos/dbus/dbus_thread_manager.h" | 38 #include "chromeos/dbus/dbus_thread_manager.h" |
39 #include "chromeos/dbus/power_manager_client.h" | 39 #include "chromeos/dbus/power_manager_client.h" |
40 #include "chromeos/ime/input_method_manager.h" | 40 #include "chromeos/ime/input_method_manager.h" |
41 #include "content/public/browser/notification_service.h" | 41 #include "content/public/browser/notification_service.h" |
42 #include "content/public/browser/user_metrics.h" | 42 #include "content/public/browser/user_metrics.h" |
43 #include "content/public/browser/web_contents.h" | 43 #include "content/public/browser/web_contents.h" |
44 #include "content/public/browser/web_contents_view.h" | 44 #include "content/public/browser/web_contents_view.h" |
45 | 45 |
46 bool ChromeShellDelegate::IsFirstRunAfterBoot() const { | 46 bool ChromeShellDelegate::IsFirstRunAfterBoot() const { |
47 return CommandLine::ForCurrentProcess()->HasSwitch( | 47 return CommandLine::ForCurrentProcess()->HasSwitch( |
48 chromeos::switches::kFirstBoot); | 48 chromeos::switches::kFirstExecAfterBoot); |
49 } | 49 } |
50 | 50 |
51 void ChromeShellDelegate::PreInit() { | 51 void ChromeShellDelegate::PreInit() { |
52 chromeos::LoadDisplayPreferences(IsFirstRunAfterBoot()); | 52 chromeos::LoadDisplayPreferences(IsFirstRunAfterBoot()); |
53 } | 53 } |
54 | 54 |
55 void ChromeShellDelegate::Shutdown() { | 55 void ChromeShellDelegate::Shutdown() { |
56 content::RecordAction(content::UserMetricsAction("Shutdown")); | 56 content::RecordAction(content::UserMetricsAction("Shutdown")); |
57 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> | 57 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> |
58 RequestShutdown(); | 58 RequestShutdown(); |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 } | 250 } |
251 | 251 |
252 void ChromeShellDelegate::PlatformInit() { | 252 void ChromeShellDelegate::PlatformInit() { |
253 registrar_.Add(this, | 253 registrar_.Add(this, |
254 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 254 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
255 content::NotificationService::AllSources()); | 255 content::NotificationService::AllSources()); |
256 registrar_.Add(this, | 256 registrar_.Add(this, |
257 chrome::NOTIFICATION_SESSION_STARTED, | 257 chrome::NOTIFICATION_SESSION_STARTED, |
258 content::NotificationService::AllSources()); | 258 content::NotificationService::AllSources()); |
259 } | 259 } |
OLD | NEW |