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

Unified Diff: ui/ozone/platform/caca/ozone_platform_caca.cc

Issue 2445323002: Ozone: Remove the caca platform from the tree (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/caca/ozone_platform_caca.cc
diff --git a/ui/ozone/platform/caca/ozone_platform_caca.cc b/ui/ozone/platform/caca/ozone_platform_caca.cc
deleted file mode 100644
index 536a6d29ba2c696f0b06a7f87f45f0c479f92a8f..0000000000000000000000000000000000000000
--- a/ui/ozone/platform/caca/ozone_platform_caca.cc
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/ozone/platform/caca/ozone_platform_caca.h"
-
-#include "base/macros.h"
-#include "base/memory/ptr_util.h"
-#include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
-#include "ui/events/ozone/layout/no/no_keyboard_layout_engine.h"
-#include "ui/ozone/common/native_display_delegate_ozone.h"
-#include "ui/ozone/common/stub_overlay_manager.h"
-#include "ui/ozone/platform/caca/caca_event_source.h"
-#include "ui/ozone/platform/caca/caca_window.h"
-#include "ui/ozone/platform/caca/caca_window_manager.h"
-#include "ui/ozone/public/cursor_factory_ozone.h"
-#include "ui/ozone/public/gpu_platform_support_host.h"
-#include "ui/ozone/public/input_controller.h"
-#include "ui/ozone/public/ozone_platform.h"
-#include "ui/ozone/public/system_input_injector.h"
-
-namespace ui {
-
-namespace {
-
-class OzonePlatformCaca : public OzonePlatform {
- public:
- OzonePlatformCaca() {}
- ~OzonePlatformCaca() override {}
-
- // OzonePlatform:
- ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() override {
- return window_manager_.get();
- }
- OverlayManagerOzone* GetOverlayManager() override {
- return overlay_manager_.get();
- }
- CursorFactoryOzone* GetCursorFactoryOzone() override {
- return cursor_factory_ozone_.get();
- }
- InputController* GetInputController() override {
- return input_controller_.get();
- }
- GpuPlatformSupportHost* GetGpuPlatformSupportHost() override {
- return gpu_platform_support_host_.get();
- }
- std::unique_ptr<SystemInputInjector> CreateSystemInputInjector() override {
- return nullptr; // no input injection support.
- }
- std::unique_ptr<PlatformWindow> CreatePlatformWindow(
- PlatformWindowDelegate* delegate,
- const gfx::Rect& bounds) override {
- std::unique_ptr<CacaWindow> caca_window(new CacaWindow(
- delegate, window_manager_.get(), event_source_.get(), bounds));
- if (!caca_window->Initialize())
- return nullptr;
- return std::move(caca_window);
- }
- std::unique_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
- override {
- return base::MakeUnique<NativeDisplayDelegateOzone>();
- }
-
- void InitializeUI() override {
- window_manager_.reset(new CacaWindowManager);
- overlay_manager_.reset(new StubOverlayManager());
- event_source_.reset(new CacaEventSource());
- cursor_factory_ozone_.reset(new CursorFactoryOzone());
- gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost());
- input_controller_ = CreateStubInputController();
- KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
- base::MakeUnique<NoKeyboardLayoutEngine>());
- }
-
- void InitializeGPU() override {
- if (!window_manager_) {
- // The return value of GetSurfaceFactoryOzone() must be non-null so a
- // dummy instance of CacaWindowManager is needed to make the GPU
- // initialization gracefully fail.
- window_manager_.reset(new CacaWindowManager);
- }
- }
-
- private:
- std::unique_ptr<CacaWindowManager> window_manager_;
- std::unique_ptr<CacaEventSource> event_source_;
- std::unique_ptr<CursorFactoryOzone> cursor_factory_ozone_;
- std::unique_ptr<GpuPlatformSupportHost> gpu_platform_support_host_;
- std::unique_ptr<InputController> input_controller_;
- std::unique_ptr<OverlayManagerOzone> overlay_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(OzonePlatformCaca);
-};
-
-} // namespace
-
-OzonePlatform* CreateOzonePlatformCaca() {
- return new OzonePlatformCaca;
-}
-
-} // namespace ui
« 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