Chromium Code Reviews| 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 "ui/views/bubble/tray_bubble_view.h" | 5 #include "ui/views/bubble/tray_bubble_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "cc/paint/paint_flags.h" | 10 #include "cc/paint/paint_flags.h" |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 376 } | 376 } |
| 377 | 377 |
| 378 void TrayBubbleView::ViewHierarchyChanged( | 378 void TrayBubbleView::ViewHierarchyChanged( |
| 379 const ViewHierarchyChangedDetails& details) { | 379 const ViewHierarchyChangedDetails& details) { |
| 380 if (details.is_add && details.child == this) { | 380 if (details.is_add && details.child == this) { |
| 381 details.parent->SetPaintToLayer(); | 381 details.parent->SetPaintToLayer(); |
| 382 details.parent->layer()->SetMasksToBounds(true); | 382 details.parent->layer()->SetMasksToBounds(true); |
| 383 } | 383 } |
| 384 } | 384 } |
| 385 | 385 |
| 386 void TrayBubbleView::SizeToContents() { | |
|
James Cook
2017/06/13 20:43:45
nit: move this up to match new header order
sunxd
2017/06/13 22:13:46
Done.
| |
| 387 GetWidget()->SetBounds(GetBubbleBounds()); | |
|
James Cook
2017/06/13 20:43:46
This should call the base class, BubbleDialogDeleg
sunxd
2017/06/13 22:13:46
Done.
| |
| 388 bubble_content_mask_->layer()->SetBounds(layer()->bounds()); | |
| 389 } | |
| 390 | |
| 386 } // namespace views | 391 } // namespace views |
| OLD | NEW |