| 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/ui/views/athena/chrome_browser_main_extra_parts_athena.
h" | 5 #include "chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.
h" |
| 6 | 6 |
| 7 #include "athena/env/public/athena_env.h" | 7 #include "athena/env/public/athena_env.h" |
| 8 #include "athena/extensions/public/extensions_delegate.h" | 8 #include "athena/extensions/public/extensions_delegate.h" |
| 9 #include "athena/main/public/athena_launcher.h" | 9 #include "athena/main/public/athena_launcher.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 virtual void PostProfileInit() OVERRIDE { | 44 virtual void PostProfileInit() OVERRIDE { |
| 45 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 45 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 46 switches::kDisableZeroBrowsersOpenForTests)) { | 46 switches::kDisableZeroBrowsersOpenForTests)) { |
| 47 chrome::IncrementKeepAliveCount(); | 47 chrome::IncrementKeepAliveCount(); |
| 48 } | 48 } |
| 49 Profile* profile = | 49 Profile* profile = |
| 50 g_browser_process->profile_manager()->GetActiveUserProfile(); | 50 g_browser_process->profile_manager()->GetActiveUserProfile(); |
| 51 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 51 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 52 chromeos::switches::kLoginManager)) { | 52 chromeos::switches::kLoginManager)) { |
| 53 athena::ExtensionsDelegate::CreateExtensionsDelegateForChrome(profile); | 53 athena::ExtensionsDelegate::CreateExtensionsDelegateForChrome(profile); |
| 54 athena::CreateVirtualKeyboardWithContext(profile); |
| 54 athena::StartAthenaSessionWithContext(profile); | 55 athena::StartAthenaSessionWithContext(profile); |
| 55 } else { | 56 } else { |
| 56 // Only initialize virtual keyboard with login profile, user session will | 57 // Only initialize virtual keyboard with login profile, user session will |
| 57 // start after login. | 58 // start after login. |
| 58 athena::CreateVirtualKeyboardWithContext(profile); | 59 athena::CreateVirtualKeyboardWithContext(profile); |
| 59 } | 60 } |
| 60 } | 61 } |
| 61 virtual void PostMainMessageLoopRun() OVERRIDE { athena::ShutdownAthena(); } | 62 virtual void PostMainMessageLoopRun() OVERRIDE { athena::ShutdownAthena(); } |
| 62 | 63 |
| 63 // content::NotificationObserver: | 64 // content::NotificationObserver: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 74 content::NotificationRegistrar registrar_; | 75 content::NotificationRegistrar registrar_; |
| 75 | 76 |
| 76 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsAthena); | 77 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsAthena); |
| 77 }; | 78 }; |
| 78 | 79 |
| 79 } // namespace | 80 } // namespace |
| 80 | 81 |
| 81 ChromeBrowserMainExtraParts* CreateChromeBrowserMainExtraPartsAthena() { | 82 ChromeBrowserMainExtraParts* CreateChromeBrowserMainExtraPartsAthena() { |
| 82 return new ChromeBrowserMainExtraPartsAthena(); | 83 return new ChromeBrowserMainExtraPartsAthena(); |
| 83 } | 84 } |
| OLD | NEW |