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

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

Issue 477523002: Athena: Adding basic resource management framework (un-/re-loading) of V2 applications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "athena/test/sample_activity.h" 5 #include "athena/test/sample_activity.h"
6 6
7 #include "ui/views/background.h" 7 #include "ui/views/background.h"
8 #include "ui/views/view.h" 8 #include "ui/views/view.h"
9 #include "ui/views/widget/widget.h"
9 10
10 namespace athena { 11 namespace athena {
11 namespace test { 12 namespace test {
12 13
13 SampleActivity::SampleActivity(SkColor color, 14 SampleActivity::SampleActivity(SkColor color,
14 SkColor contents_color, 15 SkColor contents_color,
15 const base::string16& title) 16 const base::string16& title)
16 : color_(color), 17 : color_(color),
17 contents_color_(contents_color), 18 contents_color_(contents_color),
18 title_(title), 19 title_(title),
(...skipping 17 matching lines...) Expand all
36 } 37 }
37 38
38 bool SampleActivity::IsVisible() { 39 bool SampleActivity::IsVisible() {
39 return contents_view_ && contents_view_->IsDrawn(); 40 return contents_view_ && contents_view_->IsDrawn();
40 } 41 }
41 42
42 Activity::ActivityMediaState SampleActivity::GetMediaState() { 43 Activity::ActivityMediaState SampleActivity::GetMediaState() {
43 return Activity::ACTIVITY_MEDIA_STATE_NONE; 44 return Activity::ACTIVITY_MEDIA_STATE_NONE;
44 } 45 }
45 46
47 aura::Window* SampleActivity::GetWindow() {
48 if (!contents_view_)
49 return NULL;
50 return contents_view_->GetWidget()->GetNativeWindow();
oshima 2014/08/19 21:22:25 ditto
Mr4D (OOO till 08-26) 2014/08/20 14:34:40 Done.
51 }
52
46 void SampleActivity::Init() { 53 void SampleActivity::Init() {
47 } 54 }
48 55
49 SkColor SampleActivity::GetRepresentativeColor() const { 56 SkColor SampleActivity::GetRepresentativeColor() const {
50 return color_; 57 return color_;
51 } 58 }
52 59
53 base::string16 SampleActivity::GetTitle() const { 60 base::string16 SampleActivity::GetTitle() const {
54 return title_; 61 return title_;
55 } 62 }
(...skipping 13 matching lines...) Expand all
69 76
70 void SampleActivity::CreateOverviewModeImage() { 77 void SampleActivity::CreateOverviewModeImage() {
71 } 78 }
72 79
73 gfx::ImageSkia SampleActivity::GetOverviewModeImage() { 80 gfx::ImageSkia SampleActivity::GetOverviewModeImage() {
74 return gfx::ImageSkia(); 81 return gfx::ImageSkia();
75 } 82 }
76 83
77 } // namespace test 84 } // namespace test
78 } // namespace athena 85 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698