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" | |
10 | 9 |
11 namespace athena { | 10 namespace athena { |
12 namespace test { | 11 namespace test { |
13 | 12 |
14 SampleActivity::SampleActivity(SkColor color, | 13 SampleActivity::SampleActivity(SkColor color, |
15 SkColor contents_color, | 14 SkColor contents_color, |
16 const base::string16& title) | 15 const base::string16& title) |
17 : color_(color), | 16 : color_(color), |
18 contents_color_(contents_color), | 17 contents_color_(contents_color), |
19 title_(title), | 18 title_(title), |
(...skipping 17 matching lines...) Expand all Loading... |
37 } | 36 } |
38 | 37 |
39 bool SampleActivity::IsVisible() { | 38 bool SampleActivity::IsVisible() { |
40 return contents_view_ && contents_view_->IsDrawn(); | 39 return contents_view_ && contents_view_->IsDrawn(); |
41 } | 40 } |
42 | 41 |
43 Activity::ActivityMediaState SampleActivity::GetMediaState() { | 42 Activity::ActivityMediaState SampleActivity::GetMediaState() { |
44 return Activity::ACTIVITY_MEDIA_STATE_NONE; | 43 return Activity::ACTIVITY_MEDIA_STATE_NONE; |
45 } | 44 } |
46 | 45 |
47 aura::Window* SampleActivity::GetWindow() { | |
48 return | |
49 !contents_view_ ? NULL : contents_view_->GetWidget()->GetNativeWindow(); | |
50 } | |
51 | |
52 void SampleActivity::Init() { | 46 void SampleActivity::Init() { |
53 } | 47 } |
54 | 48 |
55 SkColor SampleActivity::GetRepresentativeColor() const { | 49 SkColor SampleActivity::GetRepresentativeColor() const { |
56 return color_; | 50 return color_; |
57 } | 51 } |
58 | 52 |
59 base::string16 SampleActivity::GetTitle() const { | 53 base::string16 SampleActivity::GetTitle() const { |
60 return title_; | 54 return title_; |
61 } | 55 } |
(...skipping 13 matching lines...) Expand all Loading... |
75 | 69 |
76 void SampleActivity::CreateOverviewModeImage() { | 70 void SampleActivity::CreateOverviewModeImage() { |
77 } | 71 } |
78 | 72 |
79 gfx::ImageSkia SampleActivity::GetOverviewModeImage() { | 73 gfx::ImageSkia SampleActivity::GetOverviewModeImage() { |
80 return gfx::ImageSkia(); | 74 return gfx::ImageSkia(); |
81 } | 75 } |
82 | 76 |
83 } // namespace test | 77 } // namespace test |
84 } // namespace athena | 78 } // namespace athena |
OLD | NEW |