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

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

Issue 375143002: Use Widget frame and WidgetDelegate in ActvityWidget (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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') | no next file » | 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 9
10 namespace athena { 10 namespace athena {
(...skipping 11 matching lines...) Expand all
22 SampleActivity::~SampleActivity() { 22 SampleActivity::~SampleActivity() {
23 } 23 }
24 24
25 athena::ActivityViewModel* SampleActivity::GetActivityViewModel() { 25 athena::ActivityViewModel* SampleActivity::GetActivityViewModel() {
26 return this; 26 return this;
27 } 27 }
28 28
29 void SampleActivity::Init() { 29 void SampleActivity::Init() {
30 } 30 }
31 31
32 SkColor SampleActivity::GetRepresentativeColor() { 32 SkColor SampleActivity::GetRepresentativeColor() const {
33 return color_; 33 return color_;
34 } 34 }
35 35
36 base::string16 SampleActivity::GetTitle() { 36 base::string16 SampleActivity::GetTitle() const {
37 return title_; 37 return title_;
38 } 38 }
39 39
40 bool SampleActivity::UsesFrame() const {
41 return true;
42 }
43
40 views::View* SampleActivity::GetContentsView() { 44 views::View* SampleActivity::GetContentsView() {
41 if (!contents_view_) { 45 if (!contents_view_) {
42 contents_view_ = new views::View; 46 contents_view_ = new views::View;
43 contents_view_->set_background( 47 contents_view_->set_background(
44 views::Background::CreateSolidBackground(contents_color_)); 48 views::Background::CreateSolidBackground(contents_color_));
45 } 49 }
46 return contents_view_; 50 return contents_view_;
47 } 51 }
48 52
49 } // namespace test 53 } // namespace test
50 } // namespace athena 54 } // namespace athena
OLDNEW
« no previous file with comments | « athena/test/sample_activity.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698