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

Side by Side Diff: components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc

Issue 1949823002: WIP: Eliminate event.target() usage from TrayEventFilter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: container delegate Created 4 years, 7 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/mus/public/cpp/lib/window_tree_client_impl.h" 5 #include "components/mus/public/cpp/lib/window_tree_client_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 TestWindowTreeDelegate() {} 53 TestWindowTreeDelegate() {}
54 ~TestWindowTreeDelegate() override {} 54 ~TestWindowTreeDelegate() override {}
55 55
56 ui::Event* last_event_observed() { return last_event_observed_.get(); } 56 ui::Event* last_event_observed() { return last_event_observed_.get(); }
57 57
58 void Reset() { last_event_observed_.reset(); } 58 void Reset() { last_event_observed_.reset(); }
59 59
60 // WindowTreeDelegate: 60 // WindowTreeDelegate:
61 void OnEmbed(Window* root) override {} 61 void OnEmbed(Window* root) override {}
62 void OnConnectionLost(WindowTreeConnection* connection) override {} 62 void OnConnectionLost(WindowTreeConnection* connection) override {}
63 void OnEventObserved(const ui::Event& event) override { 63 void OnEventObserved(const ui::Event& event, Window* target) override {
64 last_event_observed_ = ui::Event::Clone(event); 64 last_event_observed_ = ui::Event::Clone(event);
65 } 65 }
66 66
67 private: 67 private:
68 std::unique_ptr<ui::Event> last_event_observed_; 68 std::unique_ptr<ui::Event> last_event_observed_;
69 69
70 DISALLOW_COPY_AND_ASSIGN(TestWindowTreeDelegate); 70 DISALLOW_COPY_AND_ASSIGN(TestWindowTreeDelegate);
71 }; 71 };
72 72
73 class WindowTreeClientImplPrivate { 73 class WindowTreeClientImplPrivate {
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 1050
1051 setup.window_tree_client()->OnChangeCompleted(change_id2, false); 1051 setup.window_tree_client()->OnChangeCompleted(change_id2, false);
1052 EXPECT_FALSE(child->HasCapture()); 1052 EXPECT_FALSE(child->HasCapture());
1053 EXPECT_TRUE(root->HasCapture()); 1053 EXPECT_TRUE(root->HasCapture());
1054 1054
1055 setup.window_tree_client()->OnLostCapture(server_id(root)); 1055 setup.window_tree_client()->OnLostCapture(server_id(root));
1056 EXPECT_FALSE(root->HasCapture()); 1056 EXPECT_FALSE(root->HasCapture());
1057 } 1057 }
1058 1058
1059 } // namespace mus 1059 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/public/cpp/tests/window_server_test_base.cc ('k') | components/mus/public/cpp/window_tree_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698