| OLD | NEW |
| 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 void EgltestWindow::MoveCursorTo(const gfx::Point& location) { | 144 void EgltestWindow::MoveCursorTo(const gfx::Point& location) { |
| 145 event_factory_->WarpCursorTo(window_id_, location); | 145 event_factory_->WarpCursorTo(window_id_, location); |
| 146 } | 146 } |
| 147 | 147 |
| 148 bool EgltestWindow::CanDispatchEvent(const ui::PlatformEvent& ne) { | 148 bool EgltestWindow::CanDispatchEvent(const ui::PlatformEvent& ne) { |
| 149 return true; | 149 return true; |
| 150 } | 150 } |
| 151 | 151 |
| 152 uint32_t EgltestWindow::DispatchEvent(const ui::PlatformEvent& native_event) { | 152 uint32_t EgltestWindow::DispatchEvent(const ui::PlatformEvent& native_event) { |
| 153 DispatchEventFromNativeUiEvent( | 153 DispatchEventFromNativeUiEvent( |
| 154 native_event, | 154 native_event, base::Bind(&PlatformWindowDelegate::DispatchEvent, |
| 155 base::Bind(&PlatformWindowDelegate::DispatchEvent, | 155 base::Unretained(delegate_))); |
| 156 base::Unretained(delegate_))); | |
| 157 | 156 |
| 158 return ui::POST_DISPATCH_STOP_PROPAGATION; | 157 return ui::POST_DISPATCH_STOP_PROPAGATION; |
| 159 } | 158 } |
| 160 | 159 |
| 161 // EGL surface wrapper for libeglplatform_shim. | 160 // EGL surface wrapper for libeglplatform_shim. |
| 162 // | 161 // |
| 163 // This just manages the native window lifetime using | 162 // This just manages the native window lifetime using |
| 164 // ShimGetNativeWindow & ShimReleaseNativeWindow. | 163 // ShimGetNativeWindow & ShimReleaseNativeWindow. |
| 165 class SurfaceOzoneEgltest : public SurfaceOzoneEGL { | 164 class SurfaceOzoneEgltest : public SurfaceOzoneEGL { |
| 166 public: | 165 public: |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 | 376 |
| 378 } // namespace | 377 } // namespace |
| 379 | 378 |
| 380 OzonePlatform* CreateOzonePlatformEgltest() { | 379 OzonePlatform* CreateOzonePlatformEgltest() { |
| 381 OzonePlatformEgltest* platform = new OzonePlatformEgltest; | 380 OzonePlatformEgltest* platform = new OzonePlatformEgltest; |
| 382 platform->Initialize(); | 381 platform->Initialize(); |
| 383 return platform; | 382 return platform; |
| 384 } | 383 } |
| 385 | 384 |
| 386 } // namespace ui | 385 } // namespace ui |
| OLD | NEW |