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/ui/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 } // namespace | 325 } // namespace |
326 | 326 |
327 ChromeShellDelegate::ChromeShellDelegate() | 327 ChromeShellDelegate::ChromeShellDelegate() |
328 : shelf_delegate_(NULL) { | 328 : shelf_delegate_(NULL) { |
329 PlatformInit(); | 329 PlatformInit(); |
330 } | 330 } |
331 | 331 |
332 ChromeShellDelegate::~ChromeShellDelegate() { | 332 ChromeShellDelegate::~ChromeShellDelegate() { |
333 } | 333 } |
334 | 334 |
335 shell::Connector* ChromeShellDelegate::GetShellConnector() const { | 335 service_manager::Connector* ChromeShellDelegate::GetShellConnector() const { |
336 return content::ServiceManagerConnection::GetForProcess()->GetConnector(); | 336 return content::ServiceManagerConnection::GetForProcess()->GetConnector(); |
337 } | 337 } |
338 | 338 |
339 bool ChromeShellDelegate::IsFirstRunAfterBoot() const { | 339 bool ChromeShellDelegate::IsFirstRunAfterBoot() const { |
340 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 340 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
341 chromeos::switches::kFirstExecAfterBoot); | 341 chromeos::switches::kFirstExecAfterBoot); |
342 } | 342 } |
343 | 343 |
344 bool ChromeShellDelegate::IsMultiProfilesEnabled() const { | 344 bool ChromeShellDelegate::IsMultiProfilesEnabled() const { |
345 if (!profiles::IsMultipleProfilesEnabled()) | 345 if (!profiles::IsMultipleProfilesEnabled()) |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 NOTREACHED() << "Unexpected notification " << type; | 555 NOTREACHED() << "Unexpected notification " << type; |
556 } | 556 } |
557 } | 557 } |
558 | 558 |
559 void ChromeShellDelegate::PlatformInit() { | 559 void ChromeShellDelegate::PlatformInit() { |
560 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 560 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
561 content::NotificationService::AllSources()); | 561 content::NotificationService::AllSources()); |
562 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, | 562 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, |
563 content::NotificationService::AllSources()); | 563 content::NotificationService::AllSources()); |
564 } | 564 } |
OLD | NEW |