| 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/system/tray/tray_bubble_view.h" | 5 #include "ash/system/tray/tray_bubble_view.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
| 9 #include "ash/system/tray/tray_constants.h" | 9 #include "ash/system/tray/tray_constants.h" |
| 10 #include "ash/wm/shelf_layout_manager.h" | 10 #include "ash/wm/shelf_layout_manager.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 // Overridden from views::Border. | 107 // Overridden from views::Border. |
| 108 virtual void Paint(const views::View& view, | 108 virtual void Paint(const views::View& view, |
| 109 gfx::Canvas* canvas) const OVERRIDE { | 109 gfx::Canvas* canvas) const OVERRIDE { |
| 110 gfx::Insets inset; | 110 gfx::Insets inset; |
| 111 GetInsets(&inset); | 111 GetInsets(&inset); |
| 112 DrawBlurredShadowAroundView( | 112 DrawBlurredShadowAroundView( |
| 113 canvas, 0, owner_->height(), owner_->width(), inset); | 113 canvas, 0, owner_->height(), owner_->width(), inset); |
| 114 | 114 |
| 115 // Draw the bottom line. | 115 // Draw the bottom line. |
| 116 int y = owner_->height() + 1; | 116 int y = owner_->height() + inset.top(); |
| 117 canvas->FillRect(gfx::Rect(inset.left(), y, owner_->width(), | 117 canvas->FillRect(gfx::Rect(inset.left(), y, owner_->width(), |
| 118 kBottomLineHeight), kBorderDarkColor); | 118 kBottomLineHeight), kBorderDarkColor); |
| 119 | 119 |
| 120 if (!Shell::GetInstance()->shelf()->IsVisible() || | 120 if (!Shell::GetInstance()->shelf()->IsVisible() || |
| 121 arrow_location() == views::BubbleBorder::NONE) | 121 arrow_location() == views::BubbleBorder::NONE) |
| 122 return; | 122 return; |
| 123 | 123 |
| 124 // Draw the arrow after drawing child borders, so that the arrow can cover | 124 // Draw the arrow after drawing child borders, so that the arrow can cover |
| 125 // the its overlap section with child border. | 125 // the its overlap section with child border. |
| 126 SkPath path; | 126 SkPath path; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 views::View* child) { | 295 views::View* child) { |
| 296 if (is_add && child == this) { | 296 if (is_add && child == this) { |
| 297 parent->SetPaintToLayer(true); | 297 parent->SetPaintToLayer(true); |
| 298 parent->SetFillsBoundsOpaquely(true); | 298 parent->SetFillsBoundsOpaquely(true); |
| 299 parent->layer()->SetMasksToBounds(true); | 299 parent->layer()->SetMasksToBounds(true); |
| 300 } | 300 } |
| 301 } | 301 } |
| 302 | 302 |
| 303 } // namespace internal | 303 } // namespace internal |
| 304 } // namespace ash | 304 } // namespace ash |
| OLD | NEW |