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

Unified 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: addressed comments, 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.cc
diff --git a/chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.cc b/chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.cc
new file mode 100644
index 0000000000000000000000000000000000000000..37735735dee17cb3d63d4d095cfb47c2fe5e78e8
--- /dev/null
+++ b/chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.cc
@@ -0,0 +1,45 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.h"
+
+#include "athena/extensions/public/extensions_delegate.h"
+#include "athena/main/athena_launcher.h"
+#include "base/macros.h"
+#include "chrome/browser/browser_process.h"
+#include "chrome/browser/chrome_browser_main_extra_parts.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_manager.h"
+#include "content/public/browser/browser_thread.h"
+
+namespace {
+
+class ChromeBrowserMainExtraPartsAthena : public ChromeBrowserMainExtraParts {
+ public:
+ ChromeBrowserMainExtraPartsAthena() {}
+ virtual ~ChromeBrowserMainExtraPartsAthena() {}
+
+ // Overridden from ChromeBrowserMainExtraParts:
+ virtual void PreProfileInit() OVERRIDE {
+ athena::StartAthenaEnv(content::BrowserThread::GetMessageLoopProxyForThread(
+ content::BrowserThread::FILE));
+ }
+ virtual void PostProfileInit() OVERRIDE {
+ Profile* profile =
+ g_browser_process->profile_manager()->GetActiveUserProfile();
+ // TODO(oshima|polukhin): Start OOBE/Login process.
+ athena::ExtensionsDelegate::CreateExtensionsDelegateForChrome(profile);
+ athena::StartAthenaSessionWithContext(profile);
+ }
+ virtual void PostMainMessageLoopRun() OVERRIDE { athena::ShutdownAthena(); }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsAthena);
+};
+
+} // namespace
+
+ChromeBrowserMainExtraParts* CreateChromeBrowserMainExtraPartsAthena() {
+ return new ChromeBrowserMainExtraPartsAthena();
+}
« no previous file with comments | « chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698