Add a FrameHostMsg_BeginNavigation IPC
[chromium-blink-merge.git] / ui / ozone / platform / caca / ozone_platform_caca.cc
blob114685628f312ae478cb0b94c0cac181500c96cc
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.
5 #include "ui/ozone/platform/caca/ozone_platform_caca.h"
7 #include "ui/ozone/platform/caca/caca_connection.h"
8 #include "ui/ozone/platform/caca/caca_event_factory.h"
9 #include "ui/ozone/platform/caca/caca_surface_factory.h"
10 #include "ui/ozone/public/cursor_factory_ozone.h"
11 #include "ui/ozone/public/ozone_platform.h"
13 #if defined(OS_CHROMEOS)
14 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h"
15 #include "ui/ozone/common/chromeos/touchscreen_device_manager_ozone.h"
16 #endif
18 namespace ui {
20 namespace {
22 class OzonePlatformCaca : public OzonePlatform {
23 public:
24 OzonePlatformCaca() {}
25 virtual ~OzonePlatformCaca() {}
27 // OzonePlatform:
28 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE {
29 return surface_factory_ozone_.get();
31 virtual EventFactoryOzone* GetEventFactoryOzone() OVERRIDE {
32 return event_factory_ozone_.get();
34 virtual CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE {
35 return cursor_factory_ozone_.get();
37 virtual GpuPlatformSupport* GetGpuPlatformSupport() OVERRIDE {
38 return NULL; // no GPU support
40 virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() OVERRIDE {
41 return NULL; // no GPU support
44 #if defined(OS_CHROMEOS)
45 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
46 OVERRIDE {
47 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone());
49 virtual scoped_ptr<TouchscreenDeviceManager>
50 CreateTouchscreenDeviceManager() OVERRIDE {
51 return scoped_ptr<TouchscreenDeviceManager>(
52 new TouchscreenDeviceManagerOzone());
54 #endif
56 virtual void InitializeUI() OVERRIDE {
57 surface_factory_ozone_.reset(new CacaSurfaceFactory(&connection_));
58 event_factory_ozone_.reset(new CacaEventFactory(&connection_));
59 cursor_factory_ozone_.reset(new CursorFactoryOzone());
62 virtual void InitializeGPU() OVERRIDE {}
64 private:
65 CacaConnection connection_;
66 scoped_ptr<CacaSurfaceFactory> surface_factory_ozone_;
67 scoped_ptr<CacaEventFactory> event_factory_ozone_;
68 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_;
70 DISALLOW_COPY_AND_ASSIGN(OzonePlatformCaca);
73 } // namespace
75 OzonePlatform* CreateOzonePlatformCaca() { return new OzonePlatformCaca; }
77 } // namespace ui