| 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_background_view.h" | 5 #include "ash/common/system/tray/tray_background_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/common/material_design/material_design_controller.h" | 9 #include "ash/common/material_design/material_design_controller.h" |
| 10 #include "ash/common/shelf/shelf_constants.h" | 10 #include "ash/common/shelf/shelf_constants.h" |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 anchor_insets.top(), | 522 anchor_insets.top(), |
| 523 kBigShadowArrowInteriorThickness - tray_bg_insets.left(), | 523 kBigShadowArrowInteriorThickness - tray_bg_insets.left(), |
| 524 anchor_insets.bottom(), | 524 anchor_insets.bottom(), |
| 525 kBigShadowArrowInteriorThickness - tray_bg_insets.right()); | 525 kBigShadowArrowInteriorThickness - tray_bg_insets.right()); |
| 526 } | 526 } |
| 527 } | 527 } |
| 528 | 528 |
| 529 std::unique_ptr<views::InkDropMask> TrayBackgroundView::CreateInkDropMask() | 529 std::unique_ptr<views::InkDropMask> TrayBackgroundView::CreateInkDropMask() |
| 530 const { | 530 const { |
| 531 return base::MakeUnique<views::RoundRectInkDropMask>( | 531 return base::MakeUnique<views::RoundRectInkDropMask>( |
| 532 GetLocalBounds(), | 532 size(), GetBackgroundBounds(GetContentsBounds(), shelf_alignment_), |
| 533 GetBackgroundBounds(GetContentsBounds(), shelf_alignment_), | |
| 534 kTrayRoundedBorderRadius); | 533 kTrayRoundedBorderRadius); |
| 535 } | 534 } |
| 536 | 535 |
| 537 bool TrayBackgroundView::ShouldEnterPushedState(const ui::Event& event) { | 536 bool TrayBackgroundView::ShouldEnterPushedState(const ui::Event& event) { |
| 538 if (is_active_) | 537 if (is_active_) |
| 539 return false; | 538 return false; |
| 540 | 539 |
| 541 return ActionableView::ShouldEnterPushedState(event); | 540 return ActionableView::ShouldEnterPushedState(event); |
| 542 } | 541 } |
| 543 | 542 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 paint.setAntiAlias(true); | 584 paint.setAntiAlias(true); |
| 586 | 585 |
| 587 const gfx::Rect bounds = horizontal_shelf ? gfx::Rect(x, y, width, height) | 586 const gfx::Rect bounds = horizontal_shelf ? gfx::Rect(x, y, width, height) |
| 588 : gfx::Rect(y, x, height, width); | 587 : gfx::Rect(y, x, height, width); |
| 589 gfx::RectF rect(gfx::ScaleRect(gfx::RectF(bounds), scale)); | 588 gfx::RectF rect(gfx::ScaleRect(gfx::RectF(bounds), scale)); |
| 590 canvas->DrawLine(horizontal_shelf ? rect.top_right() : rect.bottom_left(), | 589 canvas->DrawLine(horizontal_shelf ? rect.top_right() : rect.bottom_left(), |
| 591 rect.bottom_right(), paint); | 590 rect.bottom_right(), paint); |
| 592 } | 591 } |
| 593 | 592 |
| 594 } // namespace ash | 593 } // namespace ash |
| OLD | NEW |