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

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

Issue 863033002: Delete athena/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/base/sample_activity_factory.h ('k') | athena/test/base/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/base/sample_activity_factory.h"
6
7 #include <string>
8
9 #include "athena/activity/public/activity_manager.h"
10 #include "athena/test/base/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::CreateWebActivity(
42 content::WebContents* contents) {
43 Activity* activity =
44 new SampleActivity(kDefaultColor, kDefaultContentColor, base::string16());
45 ActivityManager::Get()->AddActivity(activity);
46 return activity;
47 }
48
49 Activity* SampleActivityFactory::CreateAppActivity(
50 const std::string& app_id,
51 views::WebView* web_view) {
52 DCHECK(!web_view);
53 Activity* activity = new SampleActivity(
54 kDefaultAppColor, kDefaultAppContentColor, base::UTF8ToUTF16("App"));
55 ActivityManager::Get()->AddActivity(activity);
56 return activity;
57 }
58
59 } // namespace test
60 } // namespace athena
OLDNEW
« no previous file with comments | « athena/test/base/sample_activity_factory.h ('k') | athena/test/base/test_app_model_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698