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

Unified Diff: components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc

Issue 1891413002: mash: Convert OnWindowInputEventAck to use an enum for handled status (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed a file Created 4 years, 8 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
Index: components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
diff --git a/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc b/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
index d80e1171159525644ff847860c8ad18dda2e4655..05adc19682dd0d639941d3e176e49f2fd1cab73d 100644
--- a/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
+++ b/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
@@ -31,7 +31,7 @@ namespace mus {
namespace {
-void DoNothingBool(bool result) {}
+void DoNothingWithEventResult(mojom::EventResult result) {}
Id server_id(mus::Window* window) {
return WindowPrivate(window).server_id();
@@ -130,22 +130,22 @@ class TestInputEventHandler : public InputEventHandler {
void AckEvent() {
DCHECK(should_manually_ack_);
DCHECK(!ack_callback_.is_null());
- ack_callback_.Run(true);
- ack_callback_ = base::Bind(&DoNothingBool);
+ ack_callback_.Run(mojom::EventResult::HANDLED);
+ ack_callback_ = base::Bind(&DoNothingWithEventResult);
}
void Reset() {
received_event_ = false;
- ack_callback_ = base::Bind(&DoNothingBool);
+ ack_callback_ = base::Bind(&DoNothingWithEventResult);
}
bool received_event() const { return received_event_; }
private:
// InputEventHandler:
- void OnWindowInputEvent(
- Window* target,
- const ui::Event& event,
- scoped_ptr<base::Callback<void(bool)>>* ack_callback) override {
+ void OnWindowInputEvent(Window* target,
+ const ui::Event& event,
+ scoped_ptr<base::Callback<void(mojom::EventResult)>>*
+ ack_callback) override {
EXPECT_FALSE(received_event_)
<< "Observer was not reset after receiving event.";
received_event_ = true;
@@ -157,7 +157,7 @@ class TestInputEventHandler : public InputEventHandler {
bool received_event_;
bool should_manually_ack_;
- base::Callback<void(bool)> ack_callback_;
+ base::Callback<void(mojom::EventResult)> ack_callback_;
DISALLOW_COPY_AND_ASSIGN(TestInputEventHandler);
};
« no previous file with comments | « components/mus/public/cpp/tests/test_window_tree.cc ('k') | components/mus/public/interfaces/window_tree.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698