Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1027)

Side by Side Diff: chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.cc

Issue 514293003: Run athena on chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena. h"
6
7 #include "athena/extensions/public/extensions_delegate.h"
8 #include "athena/main/athena_launcher.h"
9 #include "base/macros.h"
10 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/chrome_browser_main_extra_parts.h"
12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/profiles/profile_manager.h"
14 #include "content/public/browser/browser_thread.h"
15
16 namespace {
17
18 class ChromeBrowserMainExtraPartsAthena : public ChromeBrowserMainExtraParts {
19 public:
20 ChromeBrowserMainExtraPartsAthena() {}
21 virtual ~ChromeBrowserMainExtraPartsAthena() {}
22
23 // Overridden from ChromeBrowserMainExtraParts:
24 virtual void PreProfileInit() OVERRIDE {
25 athena::StartAthenaEnv(content::BrowserThread::GetMessageLoopProxyForThread(
26 content::BrowserThread::FILE));
27 }
28 virtual void PostProfileInit() OVERRIDE {
29 Profile* profile =
30 g_browser_process->profile_manager()->GetActiveUserProfile();
31 // TODO(oshiam|polukhin): Start OOBE/Login process.
Yoyo Zhou 2014/08/29 22:23:30 typo: oshima
oshima 2014/08/29 23:25:26 Done.
32 athena::ExtensionsDelegate::CreateExtensionsDelegateForChrome(profile);
33 athena::StartAthenaSessionWithContext(profile);
34 }
35 virtual void PostMainMessageLoopRun() OVERRIDE { athena::ShutdownAthena(); }
36
37 private:
38 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsAthena);
39 };
40
41 } // namespace
42
43 ChromeBrowserMainExtraParts* CreateChromeBrowserMainExtraPartsAthena() {
44 return new ChromeBrowserMainExtraPartsAthena();
45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698