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

Side by Side Diff: ui/ozone/platform/egltest/ozone_platform_egltest.cc

Issue 508303002: Move touchscreen device caching to DeviceDataManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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/egltest/ozone_platform_egltest.h" 5 #include "ui/ozone/platform/egltest/ozone_platform_egltest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/environment.h" 8 #include "base/environment.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "library_loaders/libeglplatform_shim.h" 11 #include "library_loaders/libeglplatform_shim.h"
12 #include "third_party/khronos/EGL/egl.h" 12 #include "third_party/khronos/EGL/egl.h"
13 #include "ui/events/ozone/device/device_manager.h" 13 #include "ui/events/ozone/device/device_manager.h"
14 #include "ui/events/ozone/evdev/event_factory_evdev.h" 14 #include "ui/events/ozone/evdev/event_factory_evdev.h"
15 #include "ui/events/platform/platform_event_dispatcher.h" 15 #include "ui/events/platform/platform_event_dispatcher.h"
16 #include "ui/gfx/vsync_provider.h" 16 #include "ui/gfx/vsync_provider.h"
17 #include "ui/ozone/public/cursor_factory_ozone.h" 17 #include "ui/ozone/public/cursor_factory_ozone.h"
18 #include "ui/ozone/public/gpu_platform_support.h" 18 #include "ui/ozone/public/gpu_platform_support.h"
19 #include "ui/ozone/public/gpu_platform_support_host.h" 19 #include "ui/ozone/public/gpu_platform_support_host.h"
20 #include "ui/ozone/public/ozone_platform.h" 20 #include "ui/ozone/public/ozone_platform.h"
21 #include "ui/ozone/public/ozone_switches.h" 21 #include "ui/ozone/public/ozone_switches.h"
22 #include "ui/ozone/public/surface_factory_ozone.h" 22 #include "ui/ozone/public/surface_factory_ozone.h"
23 #include "ui/ozone/public/surface_ozone_egl.h" 23 #include "ui/ozone/public/surface_ozone_egl.h"
24 #include "ui/platform_window/platform_window.h" 24 #include "ui/platform_window/platform_window.h"
25 #include "ui/platform_window/platform_window_delegate.h" 25 #include "ui/platform_window/platform_window_delegate.h"
26 26
27 #if defined(OS_CHROMEOS) 27 #if defined(OS_CHROMEOS)
28 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h" 28 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h"
29 #include "ui/ozone/common/chromeos/touchscreen_device_manager_ozone.h"
30 #endif 29 #endif
31 30
32 namespace ui { 31 namespace ui {
33 32
34 namespace { 33 namespace {
35 34
36 const char kEglplatformShim[] = "EGLPLATFORM_SHIM"; 35 const char kEglplatformShim[] = "EGLPLATFORM_SHIM";
37 const char kEglplatformShimDefault[] = "libeglplatform_shim.so.1"; 36 const char kEglplatformShimDefault[] = "libeglplatform_shim.so.1";
38 const char kDefaultEglSoname[] = "libEGL.so.1"; 37 const char kDefaultEglSoname[] = "libEGL.so.1";
39 const char kDefaultGlesSoname[] = "libGLESv2.so.2"; 38 const char kDefaultGlesSoname[] = "libGLESv2.so.2";
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 &eglplatform_shim_, 335 &eglplatform_shim_,
337 event_factory_ozone_.get(), 336 event_factory_ozone_.get(),
338 bounds)); 337 bounds));
339 } 338 }
340 339
341 #if defined(OS_CHROMEOS) 340 #if defined(OS_CHROMEOS)
342 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() 341 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
343 OVERRIDE { 342 OVERRIDE {
344 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone()); 343 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone());
345 } 344 }
346 virtual scoped_ptr<TouchscreenDeviceManager>
347 CreateTouchscreenDeviceManager() OVERRIDE {
348 return scoped_ptr<TouchscreenDeviceManager>(
349 new TouchscreenDeviceManagerOzone());
350 }
351 #endif 345 #endif
352 346
353 virtual void InitializeUI() OVERRIDE { 347 virtual void InitializeUI() OVERRIDE {
354 device_manager_ = CreateDeviceManager(); 348 device_manager_ = CreateDeviceManager();
355 if (!surface_factory_ozone_) 349 if (!surface_factory_ozone_)
356 surface_factory_ozone_.reset( 350 surface_factory_ozone_.reset(
357 new SurfaceFactoryEgltest(&eglplatform_shim_)); 351 new SurfaceFactoryEgltest(&eglplatform_shim_));
358 event_factory_ozone_.reset( 352 event_factory_ozone_.reset(
359 new EventFactoryEvdev(NULL, device_manager_.get())); 353 new EventFactoryEvdev(NULL, device_manager_.get()));
360 cursor_factory_ozone_.reset(new CursorFactoryOzone()); 354 cursor_factory_ozone_.reset(new CursorFactoryOzone());
(...skipping 23 matching lines...) Expand all
384 378
385 } // namespace 379 } // namespace
386 380
387 OzonePlatform* CreateOzonePlatformEgltest() { 381 OzonePlatform* CreateOzonePlatformEgltest() {
388 OzonePlatformEgltest* platform = new OzonePlatformEgltest; 382 OzonePlatformEgltest* platform = new OzonePlatformEgltest;
389 platform->Initialize(); 383 platform->Initialize();
390 return platform; 384 return platform;
391 } 385 }
392 386
393 } // namespace ui 387 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698