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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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
« no previous file with comments | « ui/views/bubble/tray_bubble_view.h ('k') | ui/views/button_drag_utils.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 "base/macros.h" 9 #include "base/macros.h"
10 #include "third_party/skia/include/core/SkCanvas.h" 10 #include "third_party/skia/include/core/SkCanvas.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 void TrayBubbleView::InitializeAndShowBubble() { 348 void TrayBubbleView::InitializeAndShowBubble() {
349 // Must occur after call to BubbleDelegateView::CreateBubble(). 349 // Must occur after call to BubbleDelegateView::CreateBubble().
350 SetAlignment(params_.arrow_alignment); 350 SetAlignment(params_.arrow_alignment);
351 bubble_border_->UpdateArrowOffset(); 351 bubble_border_->UpdateArrowOffset();
352 352
353 layer()->parent()->SetMaskLayer(bubble_content_mask_->layer()); 353 layer()->parent()->SetMaskLayer(bubble_content_mask_->layer());
354 354
355 GetWidget()->Show(); 355 GetWidget()->Show();
356 GetWidget()->GetNativeWindow()->SetEventTargeter( 356 GetWidget()->GetNativeWindow()->SetEventTargeter(
357 scoped_ptr<ui::EventTargeter>(new BubbleWindowTargeter(this))); 357 std::unique_ptr<ui::EventTargeter>(new BubbleWindowTargeter(this)));
358 UpdateBubble(); 358 UpdateBubble();
359 359
360 if (params_.close_via_capture) { 360 if (params_.close_via_capture) {
361 GetWidget()->set_auto_release_capture(false); 361 GetWidget()->set_auto_release_capture(false);
362 // Capture events to this view so it will be notified of capture loss. 362 // Capture events to this view so it will be notified of capture loss.
363 GetWidget()->SetCapture(this); 363 GetWidget()->SetCapture(this);
364 } 364 }
365 } 365 }
366 366
367 void TrayBubbleView::UpdateBubble() { 367 void TrayBubbleView::UpdateBubble() {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 528
529 void TrayBubbleView::ViewHierarchyChanged( 529 void TrayBubbleView::ViewHierarchyChanged(
530 const ViewHierarchyChangedDetails& details) { 530 const ViewHierarchyChangedDetails& details) {
531 if (details.is_add && details.child == this) { 531 if (details.is_add && details.child == this) {
532 details.parent->SetPaintToLayer(true); 532 details.parent->SetPaintToLayer(true);
533 details.parent->layer()->SetMasksToBounds(true); 533 details.parent->layer()->SetMasksToBounds(true);
534 } 534 }
535 } 535 }
536 536
537 } // namespace views 537 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/tray_bubble_view.h ('k') | ui/views/button_drag_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698