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

Side by Side Diff: ui/views/mus/native_widget_mus.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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/mus/native_widget_mus.h" 5 #include "ui/views/mus/native_widget_mus.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.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/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 13 matching lines...) Expand all
24 #include "ui/aura/client/window_tree_client.h" 24 #include "ui/aura/client/window_tree_client.h"
25 #include "ui/aura/env.h" 25 #include "ui/aura/env.h"
26 #include "ui/aura/layout_manager.h" 26 #include "ui/aura/layout_manager.h"
27 #include "ui/aura/mus/mus_util.h" 27 #include "ui/aura/mus/mus_util.h"
28 #include "ui/aura/window.h" 28 #include "ui/aura/window.h"
29 #include "ui/aura/window_property.h" 29 #include "ui/aura/window_property.h"
30 #include "ui/base/hit_test.h" 30 #include "ui/base/hit_test.h"
31 #include "ui/base/view_prop.h" 31 #include "ui/base/view_prop.h"
32 #include "ui/display/display.h" 32 #include "ui/display/display.h"
33 #include "ui/display/screen.h" 33 #include "ui/display/screen.h"
34 #include "ui/display/screen.h"
35 #include "ui/events/event.h" 34 #include "ui/events/event.h"
36 #include "ui/gfx/canvas.h" 35 #include "ui/gfx/canvas.h"
37 #include "ui/gfx/path.h" 36 #include "ui/gfx/path.h"
38 #include "ui/native_theme/native_theme_aura.h" 37 #include "ui/native_theme/native_theme_aura.h"
39 #include "ui/platform_window/platform_window_delegate.h" 38 #include "ui/platform_window/platform_window_delegate.h"
40 #include "ui/views/mus/surface_context_factory.h" 39 #include "ui/views/mus/surface_context_factory.h"
41 #include "ui/views/mus/window_manager_constants_converters.h" 40 #include "ui/views/mus/window_manager_constants_converters.h"
42 #include "ui/views/mus/window_manager_frame_values.h" 41 #include "ui/views/mus/window_manager_frame_values.h"
43 #include "ui/views/mus/window_tree_host_mus.h" 42 #include "ui/views/mus/window_tree_host_mus.h"
44 #include "ui/views/widget/native_widget_aura.h" 43 #include "ui/views/widget/native_widget_aura.h"
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 } 959 }
961 960
962 void NativeWidgetMus::StackAtTop() { 961 void NativeWidgetMus::StackAtTop() {
963 // NOTIMPLEMENTED(); 962 // NOTIMPLEMENTED();
964 } 963 }
965 964
966 void NativeWidgetMus::StackBelow(gfx::NativeView native_view) { 965 void NativeWidgetMus::StackBelow(gfx::NativeView native_view) {
967 // NOTIMPLEMENTED(); 966 // NOTIMPLEMENTED();
968 } 967 }
969 968
970 void NativeWidgetMus::SetShape(SkRegion* shape) { 969 void NativeWidgetMus::SetShape(std::unique_ptr<SkRegion> shape) {
971 // NOTIMPLEMENTED(); 970 // NOTIMPLEMENTED();
972 } 971 }
973 972
974 void NativeWidgetMus::Close() { 973 void NativeWidgetMus::Close() {
975 Hide(); 974 Hide();
976 if (!close_widget_factory_.HasWeakPtrs()) { 975 if (!close_widget_factory_.HasWeakPtrs()) {
977 base::ThreadTaskRunnerHandle::Get()->PostTask( 976 base::ThreadTaskRunnerHandle::Get()->PostTask(
978 FROM_HERE, base::Bind(&NativeWidgetMus::CloseNow, 977 FROM_HERE, base::Bind(&NativeWidgetMus::CloseNow,
979 close_widget_factory_.GetWeakPtr())); 978 close_widget_factory_.GetWeakPtr()));
980 } 979 }
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1438 1437
1439 gfx::Path mask_path; 1438 gfx::Path mask_path;
1440 native_widget_delegate_->GetHitTestMask(&mask_path); 1439 native_widget_delegate_->GetHitTestMask(&mask_path);
1441 // TODO(jamescook): Use the full path for the mask. 1440 // TODO(jamescook): Use the full path for the mask.
1442 gfx::Rect mask_rect = 1441 gfx::Rect mask_rect =
1443 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); 1442 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds()));
1444 window_->SetHitTestMask(mask_rect); 1443 window_->SetHitTestMask(mask_rect);
1445 } 1444 }
1446 1445
1447 } // namespace views 1446 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/native_widget_mus.h ('k') | ui/views/widget/desktop_aura/desktop_native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698