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