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

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

Issue 873563002: [Ozone] Constrain the cursor when overscan insets are set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « ui/ozone/platform/dri/dri_window.cc ('k') | ui/ozone/platform/test/test_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 void Hide() override; 87 void Hide() override;
88 void Close() override; 88 void Close() override;
89 void SetCapture() override; 89 void SetCapture() override;
90 void ReleaseCapture() override; 90 void ReleaseCapture() override;
91 void ToggleFullscreen() override; 91 void ToggleFullscreen() override;
92 void Maximize() override; 92 void Maximize() override;
93 void Minimize() override; 93 void Minimize() override;
94 void Restore() override; 94 void Restore() override;
95 void SetCursor(PlatformCursor cursor) override; 95 void SetCursor(PlatformCursor cursor) override;
96 void MoveCursorTo(const gfx::Point& location) override; 96 void MoveCursorTo(const gfx::Point& location) override;
97 void ConfineCursorToBounds(const gfx::Rect& bounds) override;
97 98
98 // PlatformEventDispatcher: 99 // PlatformEventDispatcher:
99 bool CanDispatchEvent(const PlatformEvent& event) override; 100 bool CanDispatchEvent(const PlatformEvent& event) override;
100 uint32_t DispatchEvent(const PlatformEvent& event) override; 101 uint32_t DispatchEvent(const PlatformEvent& event) override;
101 102
102 private: 103 private:
103 PlatformWindowDelegate* delegate_; 104 PlatformWindowDelegate* delegate_;
104 LibeglplatformShimLoader* eglplatform_shim_; 105 LibeglplatformShimLoader* eglplatform_shim_;
105 EventFactoryEvdev* event_factory_; 106 EventFactoryEvdev* event_factory_;
106 gfx::Rect bounds_; 107 gfx::Rect bounds_;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 void EgltestWindow::Restore() { 166 void EgltestWindow::Restore() {
166 } 167 }
167 168
168 void EgltestWindow::SetCursor(PlatformCursor cursor) { 169 void EgltestWindow::SetCursor(PlatformCursor cursor) {
169 } 170 }
170 171
171 void EgltestWindow::MoveCursorTo(const gfx::Point& location) { 172 void EgltestWindow::MoveCursorTo(const gfx::Point& location) {
172 event_factory_->WarpCursorTo(window_id_, location); 173 event_factory_->WarpCursorTo(window_id_, location);
173 } 174 }
174 175
176 void EgltestWindow::ConfineCursorToBounds(const gfx::Rect& bounds) {
177 }
178
175 bool EgltestWindow::CanDispatchEvent(const ui::PlatformEvent& ne) { 179 bool EgltestWindow::CanDispatchEvent(const ui::PlatformEvent& ne) {
176 return true; 180 return true;
177 } 181 }
178 182
179 uint32_t EgltestWindow::DispatchEvent(const ui::PlatformEvent& native_event) { 183 uint32_t EgltestWindow::DispatchEvent(const ui::PlatformEvent& native_event) {
180 DCHECK(native_event); 184 DCHECK(native_event);
181 Event* event = static_cast<Event*>(native_event); 185 Event* event = static_cast<Event*>(native_event);
182 if (event->IsTouchEvent()) 186 if (event->IsTouchEvent())
183 ScaleTouchEvent(static_cast<TouchEvent*>(event), bounds_.size()); 187 ScaleTouchEvent(static_cast<TouchEvent*>(event), bounds_.size());
184 188
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 394
391 } // namespace 395 } // namespace
392 396
393 OzonePlatform* CreateOzonePlatformEgltest() { 397 OzonePlatform* CreateOzonePlatformEgltest() {
394 OzonePlatformEgltest* platform = new OzonePlatformEgltest; 398 OzonePlatformEgltest* platform = new OzonePlatformEgltest;
395 platform->Initialize(); 399 platform->Initialize();
396 return platform; 400 return platform;
397 } 401 }
398 402
399 } // namespace ui 403 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_window.cc ('k') | ui/ozone/platform/test/test_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698