Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(784)

Unified Diff: ui/views/bubble/tray_bubble_view.cc

Issue 11836003: Allow message center and related bubbles to render on Windows. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Cut out SlideOutView when not using Aura. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/message_center/quiet_mode_bubble.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/message_center/quiet_mode_bubble.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698