| 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/ash_view_ids.h" | 7 #include "ash/common/ash_view_ids.h" |
| 8 #include "ash/common/material_design/material_design_controller.h" | 8 #include "ash/common/material_design/material_design_controller.h" |
| 9 #include "ash/common/system/tray/fixed_sized_scroll_view.h" | 9 #include "ash/common/system/tray/fixed_sized_scroll_view.h" |
| 10 #include "ash/common/system/tray/system_menu_button.h" | 10 #include "ash/common/system/tray/system_menu_button.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 void DrawShadow(const ui::PaintContext& context, | 223 void DrawShadow(const ui::PaintContext& context, |
| 224 const gfx::Rect& shadowed_area) { | 224 const gfx::Rect& shadowed_area) { |
| 225 ui::PaintRecorder recorder(context, size()); | 225 ui::PaintRecorder recorder(context, size()); |
| 226 gfx::Canvas* canvas = recorder.canvas(); | 226 gfx::Canvas* canvas = recorder.canvas(); |
| 227 SkPaint paint; | 227 SkPaint paint; |
| 228 gfx::ShadowValues shadow; | 228 gfx::ShadowValues shadow; |
| 229 shadow.emplace_back(gfx::Vector2d(0, kShadowOffsetY), kShadowBlur, | 229 shadow.emplace_back(gfx::Vector2d(0, kShadowOffsetY), kShadowBlur, |
| 230 kSeparatorColor); | 230 kSeparatorColor); |
| 231 paint.setLooper(gfx::CreateShadowDrawLooperCorrectBlur(shadow)); | 231 paint.setLooper(gfx::CreateShadowDrawLooperCorrectBlur(shadow)); |
| 232 paint.setAntiAlias(true); | 232 paint.setAntiAlias(true); |
| 233 canvas->ClipRect(shadowed_area, kDifference_SkClipOp); | 233 canvas->ClipRect(shadowed_area, SkClipOp::kDifference); |
| 234 canvas->DrawRect(shadowed_area, paint); | 234 canvas->DrawRect(shadowed_area, paint); |
| 235 } | 235 } |
| 236 | 236 |
| 237 views::BoxLayout* box_layout_; | 237 views::BoxLayout* box_layout_; |
| 238 | 238 |
| 239 // Header child views that stick to the top of visible viewport when scrolled. | 239 // Header child views that stick to the top of visible viewport when scrolled. |
| 240 std::vector<Header> headers_; | 240 std::vector<Header> headers_; |
| 241 | 241 |
| 242 DISALLOW_COPY_AND_ASSIGN(ScrollContentsView); | 242 DISALLOW_COPY_AND_ASSIGN(ScrollContentsView); |
| 243 }; | 243 }; |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 if (index < child_count() - 1 && child_at(index + 1) != title_row_) | 566 if (index < child_count() - 1 && child_at(index + 1) != title_row_) |
| 567 scroll_border_->set_visible(true); | 567 scroll_border_->set_visible(true); |
| 568 else | 568 else |
| 569 scroll_border_->set_visible(false); | 569 scroll_border_->set_visible(false); |
| 570 } | 570 } |
| 571 | 571 |
| 572 views::View::OnPaintBorder(canvas); | 572 views::View::OnPaintBorder(canvas); |
| 573 } | 573 } |
| 574 | 574 |
| 575 } // namespace ash | 575 } // namespace ash |
| OLD | NEW |