| 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/common/system/tray/tray_details_view.h" | 5 #include "ash/common/system/tray/tray_details_view.h" |
| 6 | 6 |
| 7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
| 8 #include "ash/common/system/tray/fixed_sized_scroll_view.h" | 8 #include "ash/common/system/tray/fixed_sized_scroll_view.h" |
| 9 #include "ash/common/system/tray/system_tray.h" | 9 #include "ash/common/system/tray/system_tray.h" |
| 10 #include "ash/common/system/tray/system_tray_item.h" | 10 #include "ash/common/system/tray/system_tray_item.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 scroll_border_(nullptr), | 68 scroll_border_(nullptr), |
| 69 back_button_(nullptr), | 69 back_button_(nullptr), |
| 70 settings_button_(nullptr) { | 70 settings_button_(nullptr) { |
| 71 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); | 71 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); |
| 72 set_background(views::Background::CreateSolidBackground(kBackgroundColor)); | 72 set_background(views::Background::CreateSolidBackground(kBackgroundColor)); |
| 73 } | 73 } |
| 74 | 74 |
| 75 TrayDetailsView::~TrayDetailsView() {} | 75 TrayDetailsView::~TrayDetailsView() {} |
| 76 | 76 |
| 77 void TrayDetailsView::OnViewClicked(views::View* sender) { | 77 void TrayDetailsView::OnViewClicked(views::View* sender) { |
| 78 if (!MaterialDesignController::IsSystemTrayMenuMaterial() && | 78 if (!MaterialDesignController::IsSystemTrayMenuMaterial() && title_row_ && |
| 79 sender == title_row_->content()) { | 79 sender == title_row_->content()) { |
| 80 TransitionToDefaultView(); | 80 TransitionToDefaultView(); |
| 81 return; | 81 return; |
| 82 } | 82 } |
| 83 | 83 |
| 84 HandleViewClicked(sender); | 84 HandleViewClicked(sender); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void TrayDetailsView::ButtonPressed(views::Button* sender, | 87 void TrayDetailsView::ButtonPressed(views::Button* sender, |
| 88 const ui::Event& event) { | 88 const ui::Event& event) { |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 if (index < child_count() - 1 && child_at(index + 1) != title_row_) | 209 if (index < child_count() - 1 && child_at(index + 1) != title_row_) |
| 210 scroll_border_->set_visible(true); | 210 scroll_border_->set_visible(true); |
| 211 else | 211 else |
| 212 scroll_border_->set_visible(false); | 212 scroll_border_->set_visible(false); |
| 213 } | 213 } |
| 214 | 214 |
| 215 views::View::OnPaintBorder(canvas); | 215 views::View::OnPaintBorder(canvas); |
| 216 } | 216 } |
| 217 | 217 |
| 218 } // namespace ash | 218 } // namespace ash |
| OLD | NEW |