| 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 19 matching lines...) Expand all Loading... |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 void DoNothingBool(bool result) {} | 32 void DoNothingBool(bool result) {} |
| 33 | 33 |
| 34 } // namespace | 34 } // namespace |
| 35 | 35 |
| 36 namespace mus { | 36 namespace mus { |
| 37 | 37 |
| 38 mojo::Array<uint8_t> Int32ToPropertyTransportValue(int32_t value) { | 38 mojo::Array<uint8_t> Int32ToPropertyTransportValue(int32_t value) { |
| 39 const std::vector<uint8_t> bytes = | 39 const std::vector<uint8_t> bytes = |
| 40 mojo::TypeConverter<const std::vector<uint8_t>, int32_t>::Convert(value); | 40 mojo::ConvertTo<std::vector<uint8_t>>(value); |
| 41 mojo::Array<uint8_t> transport_value; | 41 mojo::Array<uint8_t> transport_value; |
| 42 transport_value.resize(bytes.size()); | 42 transport_value.resize(bytes.size()); |
| 43 memcpy(&transport_value.front(), &(bytes.front()), bytes.size()); | 43 memcpy(&transport_value.front(), &(bytes.front()), bytes.size()); |
| 44 return transport_value; | 44 return transport_value; |
| 45 } | 45 } |
| 46 | 46 |
| 47 class TestWindowTreeDelegate : public WindowTreeDelegate { | 47 class TestWindowTreeDelegate : public WindowTreeDelegate { |
| 48 public: | 48 public: |
| 49 TestWindowTreeDelegate() {} | 49 TestWindowTreeDelegate() {} |
| 50 ~TestWindowTreeDelegate() override {} | 50 ~TestWindowTreeDelegate() override {} |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 | 816 |
| 817 setup.window_tree_client()->OnChangeCompleted(change_id2, false); | 817 setup.window_tree_client()->OnChangeCompleted(change_id2, false); |
| 818 EXPECT_FALSE(child->HasCapture()); | 818 EXPECT_FALSE(child->HasCapture()); |
| 819 EXPECT_TRUE(root->HasCapture()); | 819 EXPECT_TRUE(root->HasCapture()); |
| 820 | 820 |
| 821 setup.window_tree_client()->OnLostCapture(root->id()); | 821 setup.window_tree_client()->OnLostCapture(root->id()); |
| 822 EXPECT_FALSE(root->HasCapture()); | 822 EXPECT_FALSE(root->HasCapture()); |
| 823 } | 823 } |
| 824 | 824 |
| 825 } // namespace mus | 825 } // namespace mus |
| OLD | NEW |