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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 DrawShadow(context, | 209 DrawShadow(context, |
210 gfx::Rect(0, 0, view->width(), view->bounds().bottom())); | 210 gfx::Rect(0, 0, view->width(), view->bounds().bottom())); |
211 return true; | 211 return true; |
212 } | 212 } |
213 | 213 |
214 // Draws a drop shadow below |shadowed_area|. | 214 // Draws a drop shadow below |shadowed_area|. |
215 void DrawShadow(const ui::PaintContext& context, | 215 void DrawShadow(const ui::PaintContext& context, |
216 const gfx::Rect& shadowed_area) { | 216 const gfx::Rect& shadowed_area) { |
217 ui::PaintRecorder recorder(context, size()); | 217 ui::PaintRecorder recorder(context, size()); |
218 gfx::Canvas* canvas = recorder.canvas(); | 218 gfx::Canvas* canvas = recorder.canvas(); |
219 SkPaint paint; | 219 cc::PaintFlags paint; |
220 gfx::ShadowValues shadow; | 220 gfx::ShadowValues shadow; |
221 shadow.emplace_back(gfx::Vector2d(0, kShadowOffsetY), kShadowBlur, | 221 shadow.emplace_back(gfx::Vector2d(0, kShadowOffsetY), kShadowBlur, |
222 kSeparatorColor); | 222 kSeparatorColor); |
223 paint.setLooper(gfx::CreateShadowDrawLooperCorrectBlur(shadow)); | 223 paint.setLooper(gfx::CreateShadowDrawLooperCorrectBlur(shadow)); |
224 paint.setAntiAlias(true); | 224 paint.setAntiAlias(true); |
225 canvas->ClipRect(shadowed_area, SkClipOp::kDifference); | 225 canvas->ClipRect(shadowed_area, SkClipOp::kDifference); |
226 canvas->DrawRect(shadowed_area, paint); | 226 canvas->DrawRect(shadowed_area, paint); |
227 } | 227 } |
228 | 228 |
229 views::BoxLayout* box_layout_; | 229 views::BoxLayout* box_layout_; |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 if (index < child_count() - 1 && child_at(index + 1) != title_row_) | 558 if (index < child_count() - 1 && child_at(index + 1) != title_row_) |
559 scroll_border_->set_visible(true); | 559 scroll_border_->set_visible(true); |
560 else | 560 else |
561 scroll_border_->set_visible(false); | 561 scroll_border_->set_visible(false); |
562 } | 562 } |
563 | 563 |
564 views::View::OnPaintBorder(canvas); | 564 views::View::OnPaintBorder(canvas); |
565 } | 565 } |
566 | 566 |
567 } // namespace ash | 567 } // namespace ash |
OLD | NEW |