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

Unified Diff: ui/events/platform/platform_event_source_unittest.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/platform/platform_event_dispatcher.h ('k') | ui/gl/gl_surface_glx.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/platform/platform_event_source_unittest.cc
diff --git a/ui/events/platform/platform_event_source_unittest.cc b/ui/events/platform/platform_event_source_unittest.cc
index cc3496086d64ac95c432ee03542d5a3fb4e721cb..6c5f48c9df95562a2130d7268f3b26e6d04f0d89 100644
--- a/ui/events/platform/platform_event_source_unittest.cc
+++ b/ui/events/platform/platform_event_source_unittest.cc
@@ -87,7 +87,7 @@ class TestPlatformEventDispatcher : public PlatformEventDispatcher {
PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
}
- void set_post_dispatch_action(uint32_t action) {
+ void set_post_dispatch_action(ui::PostDispatchAction action) {
post_dispatch_action_ = action;
}
@@ -97,7 +97,8 @@ class TestPlatformEventDispatcher : public PlatformEventDispatcher {
return true;
}
- virtual uint32_t DispatchEvent(const PlatformEvent& event) override {
+ virtual ui::PostDispatchAction DispatchEvent(
+ const PlatformEvent& event) override {
list_->push_back(id_);
return post_dispatch_action_;
}
@@ -105,7 +106,7 @@ class TestPlatformEventDispatcher : public PlatformEventDispatcher {
private:
int id_;
std::vector<int>* list_;
- uint32_t post_dispatch_action_;
+ ui::PostDispatchAction post_dispatch_action_;
bool stop_stream_;
DISALLOW_COPY_AND_ASSIGN(TestPlatformEventDispatcher);
@@ -342,7 +343,8 @@ class RunCallbackDuringDispatch : public TestPlatformEventDispatcher {
protected:
// PlatformEventDispatcher:
- virtual uint32_t DispatchEvent(const PlatformEvent& event) override {
+ virtual ui::PostDispatchAction DispatchEvent(
+ const PlatformEvent& event) override {
if (!callback_.is_null())
callback_.Run();
return TestPlatformEventDispatcher::DispatchEvent(event);
@@ -585,9 +587,11 @@ class DestroyScopedHandleDispatcher : public TestPlatformEventDispatcher {
return true;
}
- virtual uint32_t DispatchEvent(const PlatformEvent& event) override {
+ virtual ui::PostDispatchAction DispatchEvent(
+ const PlatformEvent& event) override {
handler_.reset();
- uint32_t action = TestPlatformEventDispatcher::DispatchEvent(event);
+ ui::PostDispatchAction action =
+ TestPlatformEventDispatcher::DispatchEvent(event);
if (!callback_.is_null()) {
callback_.Run();
callback_ = base::Closure();
« no previous file with comments | « ui/events/platform/platform_event_dispatcher.h ('k') | ui/gl/gl_surface_glx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698