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

Side by Side Diff: ui/ozone/platform/wayland/ozone_platform_wayland.cc

Issue 2259753003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ozone/platform/wayland/ozone_platform_wayland.h" 5 #include "ui/ozone/platform/wayland/ozone_platform_wayland.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "ui/ozone/common/native_display_delegate_ozone.h" 8 #include "ui/ozone/common/native_display_delegate_ozone.h"
9 #include "ui/ozone/common/stub_overlay_manager.h" 9 #include "ui/ozone/common/stub_overlay_manager.h"
10 #include "ui/ozone/platform/wayland/wayland_connection.h" 10 #include "ui/ozone/platform/wayland/wayland_connection.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 return gpu_platform_support_host_.get(); 51 return gpu_platform_support_host_.get();
52 } 52 }
53 53
54 std::unique_ptr<SystemInputInjector> CreateSystemInputInjector() override { 54 std::unique_ptr<SystemInputInjector> CreateSystemInputInjector() override {
55 return nullptr; 55 return nullptr;
56 } 56 }
57 57
58 std::unique_ptr<PlatformWindow> CreatePlatformWindow( 58 std::unique_ptr<PlatformWindow> CreatePlatformWindow(
59 PlatformWindowDelegate* delegate, 59 PlatformWindowDelegate* delegate,
60 const gfx::Rect& bounds) override { 60 const gfx::Rect& bounds) override {
61 auto window = base::WrapUnique( 61 auto window =
62 new WaylandWindow(delegate, connection_.get(), bounds)); 62 base::MakeUnique<WaylandWindow>(delegate, connection_.get(), bounds);
63 if (!window->Initialize()) 63 if (!window->Initialize())
64 return nullptr; 64 return nullptr;
65 return std::move(window); 65 return std::move(window);
66 } 66 }
67 67
68 std::unique_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() 68 std::unique_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
69 override { 69 override {
70 return base::WrapUnique(new NativeDisplayDelegateOzone); 70 return base::WrapUnique(new NativeDisplayDelegateOzone);
71 } 71 }
72 72
(...skipping 29 matching lines...) Expand all
102 DISALLOW_COPY_AND_ASSIGN(OzonePlatformWayland); 102 DISALLOW_COPY_AND_ASSIGN(OzonePlatformWayland);
103 }; 103 };
104 104
105 } // namespace 105 } // namespace
106 106
107 OzonePlatform* CreateOzonePlatformWayland() { 107 OzonePlatform* CreateOzonePlatformWayland() {
108 return new OzonePlatformWayland; 108 return new OzonePlatformWayland;
109 } 109 }
110 110
111 } // namespace ui 111 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/wayland/fake_server.cc ('k') | ui/ozone/platform/wayland/wayland_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698