Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / athena / test / sample_activity_factory.cc
blobb043e17b2f26fcdf9b9038a68cbf8176b85f48ba
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "athena/test/sample_activity_factory.h"
7 #include <string>
9 #include "athena/test/sample_activity.h"
10 #include "base/logging.h"
11 #include "base/strings/utf_string_conversions.h"
12 #include "third_party/skia/include/core/SkColor.h"
13 #include "url/gurl.h"
15 namespace athena {
16 namespace test {
18 namespace {
19 const SkColor kDefaultColor = SK_ColorRED;
20 const SkColor kDefaultContentColor = SK_ColorGREEN;
22 const SkColor kDefaultAppColor = SK_ColorYELLOW;
23 const SkColor kDefaultAppContentColor = SK_ColorBLUE;
26 SampleActivityFactory::SampleActivityFactory() {}
28 SampleActivityFactory::~SampleActivityFactory() {}
30 Activity* SampleActivityFactory::CreateWebActivity(
31 content::BrowserContext* browser_context,
32 const GURL& url) {
33 return new SampleActivity(
34 kDefaultColor, kDefaultContentColor, base::UTF8ToUTF16(url.spec()));
37 Activity* SampleActivityFactory::CreateAppActivity(
38 extensions::ShellAppWindow* app_window,
39 const std::string& app_id) {
40 // SampleActivityFactory can't own the |app_window|, so it must be NULL.
41 DCHECK(app_window == NULL);
42 return new SampleActivity(
43 kDefaultAppColor, kDefaultAppContentColor, base::UTF8ToUTF16("App"));
46 Activity* SampleActivityFactory::CreateAppActivity(
47 apps::AppWindow* app_window) {
48 return new SampleActivity(
49 kDefaultAppColor, kDefaultAppContentColor, base::UTF8ToUTF16("App"));
52 } // namespace test
53 } // namespace athena