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

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

Issue 667823002: PlatformEventDispatcher::DispatchEvent() should return a PostDispatchAction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ui_enums
Patch Set: Fix platform_event_source_unittest.cc Created 6 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 unified diff | Download patch
« no previous file with comments | « ui/ozone/platform/dri/dri_window.cc ('k') | ui/platform_window/x11/x11_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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 virtual void ReleaseCapture() override; 63 virtual void ReleaseCapture() override;
64 virtual void ToggleFullscreen() override; 64 virtual void ToggleFullscreen() override;
65 virtual void Maximize() override; 65 virtual void Maximize() override;
66 virtual void Minimize() override; 66 virtual void Minimize() override;
67 virtual void Restore() override; 67 virtual void Restore() override;
68 virtual void SetCursor(PlatformCursor cursor) override; 68 virtual void SetCursor(PlatformCursor cursor) override;
69 virtual void MoveCursorTo(const gfx::Point& location) override; 69 virtual void MoveCursorTo(const gfx::Point& location) override;
70 70
71 // PlatformEventDispatcher: 71 // PlatformEventDispatcher:
72 virtual bool CanDispatchEvent(const PlatformEvent& event) override; 72 virtual bool CanDispatchEvent(const PlatformEvent& event) override;
73 virtual uint32_t DispatchEvent(const PlatformEvent& event) override; 73 virtual ui::PostDispatchAction DispatchEvent(
74 const PlatformEvent& event) override;
74 75
75 private: 76 private:
76 PlatformWindowDelegate* delegate_; 77 PlatformWindowDelegate* delegate_;
77 LibeglplatformShimLoader* eglplatform_shim_; 78 LibeglplatformShimLoader* eglplatform_shim_;
78 EventFactoryEvdev* event_factory_; 79 EventFactoryEvdev* event_factory_;
79 gfx::Rect bounds_; 80 gfx::Rect bounds_;
80 ShimNativeWindowId window_id_; 81 ShimNativeWindowId window_id_;
81 82
82 DISALLOW_COPY_AND_ASSIGN(EgltestWindow); 83 DISALLOW_COPY_AND_ASSIGN(EgltestWindow);
83 }; 84 };
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 143 }
143 144
144 void EgltestWindow::MoveCursorTo(const gfx::Point& location) { 145 void EgltestWindow::MoveCursorTo(const gfx::Point& location) {
145 event_factory_->WarpCursorTo(window_id_, location); 146 event_factory_->WarpCursorTo(window_id_, location);
146 } 147 }
147 148
148 bool EgltestWindow::CanDispatchEvent(const ui::PlatformEvent& ne) { 149 bool EgltestWindow::CanDispatchEvent(const ui::PlatformEvent& ne) {
149 return true; 150 return true;
150 } 151 }
151 152
152 uint32_t EgltestWindow::DispatchEvent(const ui::PlatformEvent& native_event) { 153 ui::PostDispatchAction EgltestWindow::DispatchEvent(
154 const ui::PlatformEvent& native_event) {
153 DispatchEventFromNativeUiEvent( 155 DispatchEventFromNativeUiEvent(
154 native_event, 156 native_event,
155 base::Bind(&PlatformWindowDelegate::DispatchEvent, 157 base::Bind(&PlatformWindowDelegate::DispatchEvent,
156 base::Unretained(delegate_))); 158 base::Unretained(delegate_)));
157 159
158 return ui::POST_DISPATCH_STOP_PROPAGATION; 160 return ui::POST_DISPATCH_STOP_PROPAGATION;
159 } 161 }
160 162
161 // EGL surface wrapper for libeglplatform_shim. 163 // EGL surface wrapper for libeglplatform_shim.
162 // 164 //
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 379
378 } // namespace 380 } // namespace
379 381
380 OzonePlatform* CreateOzonePlatformEgltest() { 382 OzonePlatform* CreateOzonePlatformEgltest() {
381 OzonePlatformEgltest* platform = new OzonePlatformEgltest; 383 OzonePlatformEgltest* platform = new OzonePlatformEgltest;
382 platform->Initialize(); 384 platform->Initialize();
383 return platform; 385 return platform;
384 } 386 }
385 387
386 } // namespace ui 388 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_window.cc ('k') | ui/platform_window/x11/x11_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698