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