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

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

Issue 224113005: Eliminate ash::internal namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/fixed_sized_scroll_view.h ('k') | ash/system/tray/hover_highlight_view.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/fixed_sized_scroll_view.h" 5 #include "ash/system/tray/fixed_sized_scroll_view.h"
6 6
7 namespace ash { 7 namespace ash {
8 namespace internal {
9 8
10 FixedSizedScrollView::FixedSizedScrollView() { 9 FixedSizedScrollView::FixedSizedScrollView() {
11 set_notify_enter_exit_on_child(true); 10 set_notify_enter_exit_on_child(true);
12 } 11 }
13 12
14 FixedSizedScrollView::~FixedSizedScrollView() { 13 FixedSizedScrollView::~FixedSizedScrollView() {
15 } 14 }
16 15
17 void FixedSizedScrollView::SetContentsView(views::View* view) { 16 void FixedSizedScrollView::SetContentsView(views::View* view) {
18 SetContents(view); 17 SetContents(view);
(...skipping 27 matching lines...) Expand all
46 contents()->SetBoundsRect(bounds); 45 contents()->SetBoundsRect(bounds);
47 } 46 }
48 } 47 }
49 48
50 void FixedSizedScrollView::OnBoundsChanged(const gfx::Rect& previous_bounds) { 49 void FixedSizedScrollView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
51 gfx::Rect bounds = gfx::Rect(contents()->GetPreferredSize()); 50 gfx::Rect bounds = gfx::Rect(contents()->GetPreferredSize());
52 bounds.set_width(std::max(0, width() - GetScrollBarWidth())); 51 bounds.set_width(std::max(0, width() - GetScrollBarWidth()));
53 contents()->SetBoundsRect(bounds); 52 contents()->SetBoundsRect(bounds);
54 } 53 }
55 54
56 } // namespace internal
57 } // namespace ash 55 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/fixed_sized_scroll_view.h ('k') | ash/system/tray/hover_highlight_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698