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

Side by Side Diff: ui/views/widget/widget.cc

Issue 2173033002: Make various views SetShape() methods take an unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 4 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/widget/widget.h ('k') | no next file » | 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/widget/widget.h" 5 #include "ui/views/widget/widget.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 } 550 }
551 551
552 void Widget::StackAtTop() { 552 void Widget::StackAtTop() {
553 native_widget_->StackAtTop(); 553 native_widget_->StackAtTop();
554 } 554 }
555 555
556 void Widget::StackBelow(gfx::NativeView native_view) { 556 void Widget::StackBelow(gfx::NativeView native_view) {
557 native_widget_->StackBelow(native_view); 557 native_widget_->StackBelow(native_view);
558 } 558 }
559 559
560 void Widget::SetShape(SkRegion* shape) { 560 void Widget::SetShape(std::unique_ptr<SkRegion> shape) {
561 native_widget_->SetShape(shape); 561 native_widget_->SetShape(std::move(shape));
562 } 562 }
563 563
564 void Widget::Close() { 564 void Widget::Close() {
565 if (widget_closed_) { 565 if (widget_closed_) {
566 // It appears we can hit this code path if you close a modal dialog then 566 // It appears we can hit this code path if you close a modal dialog then
567 // close the last browser before the destructor is hit, which triggers 567 // close the last browser before the destructor is hit, which triggers
568 // invoking Close again. 568 // invoking Close again.
569 return; 569 return;
570 } 570 }
571 571
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 1491
1492 //////////////////////////////////////////////////////////////////////////////// 1492 ////////////////////////////////////////////////////////////////////////////////
1493 // internal::NativeWidgetPrivate, NativeWidget implementation: 1493 // internal::NativeWidgetPrivate, NativeWidget implementation:
1494 1494
1495 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1495 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1496 return this; 1496 return this;
1497 } 1497 }
1498 1498
1499 } // namespace internal 1499 } // namespace internal
1500 } // namespace views 1500 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698