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

Unified Diff: athena/main/athena_shell.cc

Issue 302683002: athena: Add the concept of Activity and related managers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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
« no previous file with comments | « athena/main/athena_main.gyp ('k') | athena/main/placeholder_content.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/main/athena_shell.cc
diff --git a/athena/main/athena_shell.cc b/athena/main/athena_shell.cc
index 3a1ef1dda4f05c729a3f53186f36d07973169867..48fbc9e5aa7dcceddcf494f35c4c74378d3b4f45 100644
--- a/athena/main/athena_shell.cc
+++ b/athena/main/athena_shell.cc
@@ -2,13 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "athena/activity/public/activity_manager.h"
+#include "athena/main/sample_activity.h"
#include "athena/test/athena_test_helper.h"
#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/i18n/icu_util.h"
#include "base/message_loop/message_loop.h"
+#include "base/path_service.h"
#include "base/run_loop.h"
+#include "third_party/skia/include/core/SkColor.h"
#include "ui/aura/window_tree_host.h"
+#include "ui/base/resource/resource_bundle.h"
+#include "ui/base/ui_base_paths.h"
#include "ui/compositor/test/context_factories_for_test.h"
#include "ui/gl/gl_surface.h"
@@ -21,6 +27,14 @@ class UIShell {
ui::InitializeContextFactoryForTests(enable_pixel_output);
athena_helper_.SetUp(factory);
athena_helper_.host()->Show();
+
+ InitSampleActivities();
+ }
+
+ void InitSampleActivities() {
+ athena::Activity* task = new SampleActivity(
+ SK_ColorRED, SK_ColorGREEN, std::string("Activity 1"));
+ athena::ActivityManager::Get()->AddActivity(task);
}
private:
@@ -33,10 +47,15 @@ int main(int argc, const char **argv) {
setlocale(LC_ALL, "");
base::AtExitManager exit_manager;
+ ui::RegisterPathProvider();
base::CommandLine::Init(argc, argv);
base::i18n::InitializeICU();
gfx::GLSurface::InitializeOneOffForTests();
+ base::FilePath ui_test_pak_path;
+ DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
+ ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
+
base::MessageLoopForUI message_loop;
UIShell shell(&message_loop);
base::RunLoop run_loop;
« no previous file with comments | « athena/main/athena_main.gyp ('k') | athena/main/placeholder_content.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698