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

Unified Diff: athena/ui/sample_task.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
« athena/task/public/task_manager.h ('K') | « athena/ui/sample_task.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/ui/sample_task.cc
diff --git a/athena/ui/sample_task.cc b/athena/ui/sample_task.cc
new file mode 100644
index 0000000000000000000000000000000000000000..df3cc04100ede6aa3afe915c1dddf2b5c56436c9
--- /dev/null
+++ b/athena/ui/sample_task.cc
@@ -0,0 +1,35 @@
+// 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/ui/sample_task.h"
+
+#include "ui/aura/window.h"
+
+SampleTask::SampleTask(SkColor color,
+ SkColor content_color,
+ const std::string& title)
+ : color_(color),
+ content_color_(content_color),
+ title_(title) {
+}
+
+SampleTask::~SampleTask() {
+}
+
+SkColor SampleTask::GetRepresentativeColor() {
+ return color_;
+}
+
+std::string SampleTask::GetTitle() {
+ return title_;
+}
+
+aura::Window* SampleTask::GetNativeWindow() {
+ if (!window_) {
+ window_.reset(new aura::Window(NULL));
+ window_->Init(aura::WINDOW_LAYER_SOLID_COLOR);
+ window_->layer()->SetColor(content_color_);
+ }
+ return window_.get();
+}
« athena/task/public/task_manager.h ('K') | « athena/ui/sample_task.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698