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

Unified Diff: athena/main/athena_launcher.cc

Issue 301593004: Athena unittests framework (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix deps 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
Index: athena/main/athena_launcher.cc
diff --git a/athena/main/athena_launcher.cc b/athena/main/athena_launcher.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b061ff0f3260a485103413a8a3f42560bdf4d0c0
--- /dev/null
+++ b/athena/main/athena_launcher.cc
@@ -0,0 +1,53 @@
+// 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 "athena/main/athena_launcher.h"
+
+#include "athena/home/public/home_card.h"
+#include "athena/main/placeholder.h"
+#include "athena/screen/public/screen_manager.h"
+#include "athena/wm/public/window_manager.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/aura/window_property.h"
+#include "ui/wm/core/visibility_controller.h"
+
+namespace athena {
+struct RootWindowState;
+}
+
+DECLARE_WINDOW_PROPERTY_TYPE(athena::RootWindowState*);
+
+namespace athena {
+
+// Athena's per root window state.
+struct RootWindowState {
+ scoped_ptr< ::wm::VisibilityController> visibility_client;
+};
+
+DEFINE_OWNED_WINDOW_PROPERTY_KEY(athena::RootWindowState,
+ kRootWindowStateKey,
+ NULL);
+
+void StartAthena(aura::Window* root_window) {
+ RootWindowState* root_window_state = new RootWindowState;
+ root_window->SetProperty(kRootWindowStateKey, root_window_state);
+
+ root_window_state->visibility_client.reset(new ::wm::VisibilityController);
+ aura::client::SetVisibilityClient(root_window,
+ root_window_state->visibility_client.get());
+
+ athena::ScreenManager::Create(root_window);
+ athena::WindowManager::Create();
+ athena::HomeCard::Create();
+
+ SetupBackgroundImage();
+}
+
+void ShutdownAthena() {
+ athena::HomeCard::Shutdown();
+ athena::WindowManager::Shutdown();
+ athena::ScreenManager::Shutdown();
+}
+
+} // namespace athena

Powered by Google App Engine
This is Rietveld 408576698