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

Side by Side Diff: ash/system/tray/tray_details_view.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 11 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 | « ash/system/tray/tray_details_view.h ('k') | ash/system/tray/tray_empty.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/system/tray/tray_details_view.h" 5 #include "ash/system/tray/tray_details_view.h"
6 6
7 #include "ash/system/tray/fixed_sized_scroll_view.h" 7 #include "ash/system/tray/fixed_sized_scroll_view.h"
8 #include "ash/system/tray/system_tray.h" 8 #include "ash/system/tray/system_tray.h"
9 #include "ash/system/tray/system_tray_item.h" 9 #include "ash/system/tray/system_tray_item.h"
10 #include "ash/system/tray/tray_constants.h" 10 #include "ash/system/tray/tray_constants.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 void TrayDetailsView::CreateScrollableList() { 89 void TrayDetailsView::CreateScrollableList() {
90 DCHECK(!scroller_); 90 DCHECK(!scroller_);
91 scroll_content_ = new views::View; 91 scroll_content_ = new views::View;
92 scroll_content_->SetLayoutManager(new views::BoxLayout( 92 scroll_content_->SetLayoutManager(new views::BoxLayout(
93 views::BoxLayout::kVertical, 0, 0, 1)); 93 views::BoxLayout::kVertical, 0, 0, 1));
94 scroller_ = new FixedSizedScrollView; 94 scroller_ = new FixedSizedScrollView;
95 scroller_->SetContentsView(scroll_content_); 95 scroller_->SetContentsView(scroll_content_);
96 96
97 // Note: |scroller_| takes ownership of |scroll_border_|. 97 // Note: |scroller_| takes ownership of |scroll_border_|.
98 scroll_border_ = new ScrollBorder; 98 scroll_border_ = new ScrollBorder;
99 scroller_->set_border(scroll_border_); 99 scroller_->SetBorder(scoped_ptr<views::Border>(scroll_border_));
100 100
101 AddChildView(scroller_); 101 AddChildView(scroller_);
102 } 102 }
103 103
104 void TrayDetailsView::AddScrollSeparator() { 104 void TrayDetailsView::AddScrollSeparator() {
105 DCHECK(scroll_content_); 105 DCHECK(scroll_content_);
106 // Do not draw the separator if it is the very first item 106 // Do not draw the separator if it is the very first item
107 // in the scrollable list. 107 // in the scrollable list.
108 if (scroll_content_->has_children()) 108 if (scroll_content_->has_children())
109 scroll_content_->AddChildView(new ScrollSeparator); 109 scroll_content_->AddChildView(new ScrollSeparator);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 scroll_border_->set_visible(true); 156 scroll_border_->set_visible(true);
157 else 157 else
158 scroll_border_->set_visible(false); 158 scroll_border_->set_visible(false);
159 } 159 }
160 160
161 views::View::OnPaintBorder(canvas); 161 views::View::OnPaintBorder(canvas);
162 } 162 }
163 163
164 } // namespace internal 164 } // namespace internal
165 } // namespace ash 165 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/tray_details_view.h ('k') | ash/system/tray/tray_empty.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698