Index: ui/views/bubble/tray_bubble_view.cc |
diff --git a/ui/views/bubble/tray_bubble_view.cc b/ui/views/bubble/tray_bubble_view.cc |
index 9a7b0412adfc2183b8aedc2c898b374030fa7a2e..00740b53b94ed67b65dc57496b64c1d782bc0268 100644 |
--- a/ui/views/bubble/tray_bubble_view.cc |
+++ b/ui/views/bubble/tray_bubble_view.cc |
@@ -273,13 +273,15 @@ TrayBubbleView::TrayBubbleView(gfx::NativeView parent_window, |
set_notify_enter_exit_on_child(true); |
set_close_on_deactivate(init_params.close_on_deactivate); |
set_margins(gfx::Insets()); |
- SetPaintToLayer(true); |
- SetFillsBoundsOpaquely(true); |
- |
bubble_border_ = new TrayBubbleBorder(this, anchor_view(), params_); |
- bubble_content_mask_.reset( |
- new TrayBubbleContentMask(bubble_border_->GetBorderCornerRadius() - 1)); |
+#ifdef USE_AURA |
+ SetPaintToLayer(true); |
+ SetFillsBoundsOpaquely(true); |
+ |
+ bubble_content_mask_.reset( |
+ new TrayBubbleContentMask(bubble_border_->GetBorderCornerRadius() - 1)); |
Jun Mukai
2013/01/12 01:32:57
fix the indent
dewittj
2013/01/12 01:38:10
Done.
|
+#endif //USE_AURA |
} |
TrayBubbleView::~TrayBubbleView() { |
@@ -293,7 +295,9 @@ void TrayBubbleView::InitializeAndShowBubble() { |
SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); |
bubble_border_->UpdateArrowOffset(); |
+#ifdef USE_AURA |
layer()->parent()->SetMaskLayer(bubble_content_mask_->layer()); |
+#endif // USE_AURA |
Show(); |
UpdateBubble(); |
@@ -301,7 +305,9 @@ void TrayBubbleView::InitializeAndShowBubble() { |
void TrayBubbleView::UpdateBubble() { |
SizeToContents(); |
+#ifdef USE_AURA |
bubble_content_mask_->layer()->SetBounds(layer()->bounds()); |
+#endif // USE_AURA |
GetWidget()->GetRootView()->SchedulePaint(); |
} |
@@ -401,11 +407,13 @@ void TrayBubbleView::ChildPreferredSizeChanged(View* child) { |
void TrayBubbleView::ViewHierarchyChanged(bool is_add, |
views::View* parent, |
views::View* child) { |
+#ifdef USE_AURA |
if (is_add && child == this) { |
parent->SetPaintToLayer(true); |
parent->SetFillsBoundsOpaquely(true); |
parent->layer()->SetMasksToBounds(true); |
} |
+#endif // USE_AURA |
} |
} // namespace views |