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

Side by Side Diff: ui/ozone/platform/caca/ozone_platform_caca.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/caca/ozone_platform_caca.h" 5 #include "ui/ozone/platform/caca/ozone_platform_caca.h"
6 6
7 #include "ui/ozone/common/native_display_delegate_ozone.h" 7 #include "ui/ozone/common/native_display_delegate_ozone.h"
8 #include "ui/ozone/platform/caca/caca_event_source.h" 8 #include "ui/ozone/platform/caca/caca_event_source.h"
9 #include "ui/ozone/platform/caca/caca_window.h" 9 #include "ui/ozone/platform/caca/caca_window.h"
10 #include "ui/ozone/platform/caca/caca_window_manager.h" 10 #include "ui/ozone/platform/caca/caca_window_manager.h"
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() override { 33 virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() override {
34 return NULL; // no GPU support 34 return NULL; // no GPU support
35 } 35 }
36 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( 36 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
37 PlatformWindowDelegate* delegate, 37 PlatformWindowDelegate* delegate,
38 const gfx::Rect& bounds) override { 38 const gfx::Rect& bounds) override {
39 scoped_ptr<CacaWindow> caca_window(new CacaWindow( 39 scoped_ptr<CacaWindow> caca_window(new CacaWindow(
40 delegate, window_manager_.get(), event_source_.get(), bounds)); 40 delegate, window_manager_.get(), event_source_.get(), bounds));
41 if (!caca_window->Initialize()) 41 if (!caca_window->Initialize())
42 return scoped_ptr<PlatformWindow>(); 42 return nullptr;
43 return caca_window.PassAs<PlatformWindow>(); 43 return caca_window.Pass();
44 } 44 }
45 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() 45 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
46 override { 46 override {
47 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone()); 47 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone());
48 } 48 }
49 49
50 virtual void InitializeUI() override { 50 virtual void InitializeUI() override {
51 window_manager_.reset(new CacaWindowManager); 51 window_manager_.reset(new CacaWindowManager);
52 event_source_.reset(new CacaEventSource()); 52 event_source_.reset(new CacaEventSource());
53 cursor_factory_ozone_.reset(new CursorFactoryOzone()); 53 cursor_factory_ozone_.reset(new CursorFactoryOzone());
54 } 54 }
55 55
56 virtual void InitializeGPU() override {} 56 virtual void InitializeGPU() override {}
57 57
58 private: 58 private:
59 scoped_ptr<CacaWindowManager> window_manager_; 59 scoped_ptr<CacaWindowManager> window_manager_;
60 scoped_ptr<CacaEventSource> event_source_; 60 scoped_ptr<CacaEventSource> event_source_;
61 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_; 61 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_;
62 62
63 DISALLOW_COPY_AND_ASSIGN(OzonePlatformCaca); 63 DISALLOW_COPY_AND_ASSIGN(OzonePlatformCaca);
64 }; 64 };
65 65
66 } // namespace 66 } // namespace
67 67
68 OzonePlatform* CreateOzonePlatformCaca() { return new OzonePlatformCaca; } 68 OzonePlatform* CreateOzonePlatformCaca() { return new OzonePlatformCaca; }
69 69
70 } // namespace ui 70 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/caca/caca_window_manager.cc ('k') | ui/ozone/platform/dri/gbm_surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698