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

Unified Diff: ui/views/cocoa/bridged_native_widget.mm

Issue 2383263002: Generalize layer mirroring for phantom windows (Closed)
Patch Set: Rebase Created 4 years, 2 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/compositor/layer_unittest.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/cocoa/bridged_native_widget.mm
diff --git a/ui/views/cocoa/bridged_native_widget.mm b/ui/views/cocoa/bridged_native_widget.mm
index c468ce88044fe01bb7e77e61f44678e734073375..ce3731d026165eb42ef39e0b00bafe6953e2fcf9 100644
--- a/ui/views/cocoa/bridged_native_widget.mm
+++ b/ui/views/cocoa/bridged_native_widget.mm
@@ -12,6 +12,7 @@
#import "base/mac/foundation_util.h"
#include "base/mac/mac_util.h"
#import "base/mac/sdk_forward_declarations.h"
+#include "base/memory/ptr_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
#import "ui/base/cocoa/constrained_window/constrained_window_animation.h"
@@ -962,7 +963,7 @@ void BridgedNativeWidget::CreateLayer(ui::LayerType layer_type,
CreateCompositor();
DCHECK(compositor_);
- SetLayer(new ui::Layer(layer_type));
+ SetLayer(base::MakeUnique<ui::Layer>(layer_type));
// Note, except for controls, this will set the layer to be hidden, since it
// is only called during Init().
layer()->SetVisible(window_visible_);
« no previous file with comments | « ui/compositor/layer_unittest.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698