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

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: Aaaand another rebase. 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
« no previous file with comments | « athena/test/sample_activity.h ('k') | athena/test/test_app_content_control_delegate_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 return
49 !contents_view_ ? NULL : contents_view_->GetWidget()->GetNativeWindow();
50 }
51
46 void SampleActivity::Init() { 52 void SampleActivity::Init() {
47 } 53 }
48 54
49 SkColor SampleActivity::GetRepresentativeColor() const { 55 SkColor SampleActivity::GetRepresentativeColor() const {
50 return color_; 56 return color_;
51 } 57 }
52 58
53 base::string16 SampleActivity::GetTitle() const { 59 base::string16 SampleActivity::GetTitle() const {
54 return title_; 60 return title_;
55 } 61 }
(...skipping 13 matching lines...) Expand all
69 75
70 void SampleActivity::CreateOverviewModeImage() { 76 void SampleActivity::CreateOverviewModeImage() {
71 } 77 }
72 78
73 gfx::ImageSkia SampleActivity::GetOverviewModeImage() { 79 gfx::ImageSkia SampleActivity::GetOverviewModeImage() {
74 return gfx::ImageSkia(); 80 return gfx::ImageSkia();
75 } 81 }
76 82
77 } // namespace test 83 } // namespace test
78 } // namespace athena 84 } // namespace athena
OLDNEW
« no previous file with comments | « athena/test/sample_activity.h ('k') | athena/test/test_app_content_control_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698