| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |