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

Side by Side Diff: ui/ozone/platform/dri/ozone_platform_dri.cc

Issue 659713003: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/dri/ozone_platform_dri.h" 5 #include "ui/ozone/platform/dri/ozone_platform_dri.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" 8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h"
9 #include "ui/events/ozone/device/device_manager.h" 9 #include "ui/events/ozone/device/device_manager.h"
10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" 10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( 65 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
66 PlatformWindowDelegate* delegate, 66 PlatformWindowDelegate* delegate,
67 const gfx::Rect& bounds) override { 67 const gfx::Rect& bounds) override {
68 scoped_ptr<DriWindow> platform_window( 68 scoped_ptr<DriWindow> platform_window(
69 new DriWindow(delegate, 69 new DriWindow(delegate,
70 bounds, 70 bounds,
71 gpu_platform_support_host_.get(), 71 gpu_platform_support_host_.get(),
72 event_factory_ozone_.get(), 72 event_factory_ozone_.get(),
73 window_manager_.get())); 73 window_manager_.get()));
74 platform_window->Initialize(); 74 platform_window->Initialize();
75 return platform_window.PassAs<PlatformWindow>(); 75 return platform_window.Pass();
76 } 76 }
77 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() 77 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
78 override { 78 override {
79 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateDri( 79 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateDri(
80 dri_.get(), screen_manager_.get(), device_manager_.get())); 80 dri_.get(), screen_manager_.get(), device_manager_.get()));
81 } 81 }
82 virtual void InitializeUI() override { 82 virtual void InitializeUI() override {
83 dri_->Initialize(); 83 dri_->Initialize();
84 surface_factory_ozone_.reset(new DriSurfaceFactory( 84 surface_factory_ozone_.reset(new DriSurfaceFactory(
85 dri_.get(), screen_manager_.get(), &window_delegate_manager_)); 85 dri_.get(), screen_manager_.get(), &window_delegate_manager_));
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 UiThreadGpu ui_thread_gpu_; 124 UiThreadGpu ui_thread_gpu_;
125 125
126 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); 126 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri);
127 }; 127 };
128 128
129 } // namespace 129 } // namespace
130 130
131 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; } 131 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; }
132 132
133 } // namespace ui 133 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/gbm_surface_factory.cc ('k') | ui/ozone/platform/dri/ozone_platform_gbm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698