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

Side by Side Diff: athena/test/sample_activity_factory.cc

Issue 617043002: Moving athena/test to athena/test/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « athena/test/sample_activity_factory.h ('k') | athena/test/test_app_model_builder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "athena/test/sample_activity_factory.h"
6
7 #include <string>
8
9 #include "athena/activity/public/activity_manager.h"
10 #include "athena/test/sample_activity.h"
11 #include "base/logging.h"
12 #include "base/strings/utf_string_conversions.h"
13 #include "third_party/skia/include/core/SkColor.h"
14 #include "url/gurl.h"
15
16 namespace athena {
17 namespace test {
18
19 namespace {
20 const SkColor kDefaultColor = SK_ColorRED;
21 const SkColor kDefaultContentColor = SK_ColorGREEN;
22
23 const SkColor kDefaultAppColor = SK_ColorYELLOW;
24 const SkColor kDefaultAppContentColor = SK_ColorBLUE;
25 }
26
27 SampleActivityFactory::SampleActivityFactory() {}
28
29 SampleActivityFactory::~SampleActivityFactory() {}
30
31 Activity* SampleActivityFactory::CreateWebActivity(
32 content::BrowserContext* browser_context,
33 const base::string16& title,
34 const GURL& url) {
35 Activity* activity = new SampleActivity(
36 kDefaultColor, kDefaultContentColor, base::UTF8ToUTF16(url.spec()));
37 ActivityManager::Get()->AddActivity(activity);
38 return activity;
39 }
40
41 Activity* SampleActivityFactory::CreateAppActivity(
42 extensions::AppWindow* app_window,
43 views::WebView* web_view) {
44 DCHECK(!web_view);
45 Activity* activity = new SampleActivity(
46 kDefaultAppColor, kDefaultAppContentColor, base::UTF8ToUTF16("App"));
47 ActivityManager::Get()->AddActivity(activity);
48 return activity;
49 }
50
51 } // namespace test
52 } // namespace athena
OLDNEW
« no previous file with comments | « athena/test/sample_activity_factory.h ('k') | athena/test/test_app_model_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698