OLD | NEW |
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/system_tray_item.h" |
7 #include "ash/system/tray/tray_constants.h" | 8 #include "ash/system/tray/tray_constants.h" |
8 #include "ash/system/tray/tray_views.h" | 9 #include "ash/system/tray/tray_views.h" |
9 #include "ui/gfx/canvas.h" | 10 #include "ui/gfx/canvas.h" |
10 #include "ui/views/background.h" | 11 #include "ui/views/background.h" |
11 #include "ui/views/controls/scroll_view.h" | 12 #include "ui/views/controls/scroll_view.h" |
12 #include "ui/views/layout/box_layout.h" | 13 #include "ui/views/layout/box_layout.h" |
13 | 14 |
14 namespace ash { | 15 namespace ash { |
15 namespace internal { | 16 namespace internal { |
16 | 17 |
(...skipping 15 matching lines...) Expand all Loading... |
32 | 33 |
33 virtual gfx::Insets GetInsets() const OVERRIDE { | 34 virtual gfx::Insets GetInsets() const OVERRIDE { |
34 return gfx::Insets(0, 0, 1, 0); | 35 return gfx::Insets(0, 0, 1, 0); |
35 } | 36 } |
36 | 37 |
37 bool visible_; | 38 bool visible_; |
38 | 39 |
39 DISALLOW_COPY_AND_ASSIGN(ScrollBorder); | 40 DISALLOW_COPY_AND_ASSIGN(ScrollBorder); |
40 }; | 41 }; |
41 | 42 |
42 TrayDetailsView::TrayDetailsView() | 43 TrayDetailsView::TrayDetailsView(SystemTrayItem* owner) |
43 : footer_(NULL), | 44 : owner_(owner), |
| 45 footer_(NULL), |
44 scroller_(NULL), | 46 scroller_(NULL), |
45 scroll_content_(NULL), | 47 scroll_content_(NULL), |
46 scroll_border_(NULL) { | 48 scroll_border_(NULL) { |
47 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, | 49 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, |
48 0, 0, 0)); | 50 0, 0, 0)); |
49 set_background(views::Background::CreateSolidBackground(kBackgroundColor)); | 51 set_background(views::Background::CreateSolidBackground(kBackgroundColor)); |
50 } | 52 } |
51 | 53 |
52 TrayDetailsView::~TrayDetailsView() { | 54 TrayDetailsView::~TrayDetailsView() { |
53 } | 55 } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 scroll_border_->set_visible(true); | 114 scroll_border_->set_visible(true); |
113 else | 115 else |
114 scroll_border_->set_visible(false); | 116 scroll_border_->set_visible(false); |
115 } | 117 } |
116 | 118 |
117 views::View::OnPaintBorder(canvas); | 119 views::View::OnPaintBorder(canvas); |
118 } | 120 } |
119 | 121 |
120 } // namespace internal | 122 } // namespace internal |
121 } // namespace ash | 123 } // namespace ash |
OLD | NEW |