OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |