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

Side by Side Diff: ui/views/bubble/tray_bubble_view.cc

Issue 12897004: Remove BubbleDelegateView::Show(); call GetWidget()->Show() instead; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixup more BubbleDelegateView::Show() calls. Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/bubble/bubble_frame_view_unittest.cc ('k') | ui/views/examples/bubble_example.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "third_party/skia/include/core/SkCanvas.h" 9 #include "third_party/skia/include/core/SkCanvas.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 } 288 }
289 289
290 void TrayBubbleView::InitializeAndShowBubble() { 290 void TrayBubbleView::InitializeAndShowBubble() {
291 // Must occur after call to BubbleDelegateView::CreateBubble(). 291 // Must occur after call to BubbleDelegateView::CreateBubble().
292 SetAlignment(params_.arrow_alignment); 292 SetAlignment(params_.arrow_alignment);
293 bubble_border_->UpdateArrowOffset(); 293 bubble_border_->UpdateArrowOffset();
294 294
295 if (get_use_acceleration_when_possible()) 295 if (get_use_acceleration_when_possible())
296 layer()->parent()->SetMaskLayer(bubble_content_mask_->layer()); 296 layer()->parent()->SetMaskLayer(bubble_content_mask_->layer());
297 297
298 Show(); 298 GetWidget()->Show();
299 UpdateBubble(); 299 UpdateBubble();
300 } 300 }
301 301
302 void TrayBubbleView::UpdateBubble() { 302 void TrayBubbleView::UpdateBubble() {
303 SizeToContents(); 303 SizeToContents();
304 if (get_use_acceleration_when_possible()) 304 if (get_use_acceleration_when_possible())
305 bubble_content_mask_->layer()->SetBounds(layer()->bounds()); 305 bubble_content_mask_->layer()->SetBounds(layer()->bounds());
306 GetWidget()->GetRootView()->SchedulePaint(); 306 GetWidget()->GetRootView()->SchedulePaint();
307 } 307 }
308 308
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 View* parent, 402 View* parent,
403 View* child) { 403 View* child) {
404 if (get_use_acceleration_when_possible() && is_add && child == this) { 404 if (get_use_acceleration_when_possible() && is_add && child == this) {
405 parent->SetPaintToLayer(true); 405 parent->SetPaintToLayer(true);
406 parent->SetFillsBoundsOpaquely(true); 406 parent->SetFillsBoundsOpaquely(true);
407 parent->layer()->SetMasksToBounds(true); 407 parent->layer()->SetMasksToBounds(true);
408 } 408 }
409 } 409 }
410 410
411 } // namespace views 411 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_frame_view_unittest.cc ('k') | ui/views/examples/bubble_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698