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

Side by Side Diff: ui/ozone/platform/caca/ozone_platform_caca.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ui/ozone/platform/caca/ozone_platform_caca.h"
6
7 #include "ui/ozone/common/native_display_delegate_ozone.h"
8 #include "ui/ozone/platform/caca/caca_event_source.h"
9 #include "ui/ozone/platform/caca/caca_window.h"
10 #include "ui/ozone/platform/caca/caca_window_manager.h"
11 #include "ui/ozone/public/cursor_factory_ozone.h"
12 #include "ui/ozone/public/ozone_platform.h"
13
14 namespace ui {
15
16 namespace {
17
18 class OzonePlatformCaca : public OzonePlatform {
19 public:
20 OzonePlatformCaca() {}
21 virtual ~OzonePlatformCaca() {}
22
23 // OzonePlatform:
24 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() override {
25 return window_manager_.get();
26 }
27 virtual CursorFactoryOzone* GetCursorFactoryOzone() override {
28 return cursor_factory_ozone_.get();
29 }
30 virtual GpuPlatformSupport* GetGpuPlatformSupport() override {
31 return NULL; // no GPU support
32 }
33 virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() override {
34 return NULL; // no GPU support
35 }
36 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
37 PlatformWindowDelegate* delegate,
38 const gfx::Rect& bounds) override {
39 scoped_ptr<CacaWindow> caca_window(new CacaWindow(
40 delegate, window_manager_.get(), event_source_.get(), bounds));
41 if (!caca_window->Initialize())
42 return nullptr;
43 return caca_window.Pass();
44 }
45 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
46 override {
47 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone());
48 }
49
50 virtual void InitializeUI() override {
51 window_manager_.reset(new CacaWindowManager);
52 event_source_.reset(new CacaEventSource());
53 cursor_factory_ozone_.reset(new CursorFactoryOzone());
54 }
55
56 virtual void InitializeGPU() override {}
57
58 private:
59 scoped_ptr<CacaWindowManager> window_manager_;
60 scoped_ptr<CacaEventSource> event_source_;
61 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_;
62
63 DISALLOW_COPY_AND_ASSIGN(OzonePlatformCaca);
64 };
65
66 } // namespace
67
68 OzonePlatform* CreateOzonePlatformCaca() { return new OzonePlatformCaca; }
69
70 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/caca/ozone_platform_caca.h ('k') | ui/ozone/platform/caca/scoped_caca_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698