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(); |
+} |