| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 private: | 76 private: |
| 77 WindowTreeClientImpl* tree_client_impl_; | 77 WindowTreeClientImpl* tree_client_impl_; |
| 78 | 78 |
| 79 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImplPrivate); | 79 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImplPrivate); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 class WindowTreeSetup { | 82 class WindowTreeSetup { |
| 83 public: | 83 public: |
| 84 WindowTreeSetup() : tree_client_(&window_tree_delegate_, nullptr, nullptr) { | 84 WindowTreeSetup() : tree_client_(&window_tree_delegate_, nullptr, nullptr) { |
| 85 WindowTreeClientImplPrivate(&tree_client_) | 85 WindowTreeClientImplPrivate(&tree_client_) |
| 86 .Init(&window_tree_, mojom::WindowTree::ACCESS_POLICY_DEFAULT); | 86 .Init(&window_tree_, mojom::WindowTree::kAccessPolicyDefault); |
| 87 window_tree_.GetAndClearChangeId(nullptr); | 87 window_tree_.GetAndClearChangeId(nullptr); |
| 88 } | 88 } |
| 89 | 89 |
| 90 WindowTreeConnection* window_tree_connection() { | 90 WindowTreeConnection* window_tree_connection() { |
| 91 return static_cast<WindowTreeConnection*>(&tree_client_); | 91 return static_cast<WindowTreeConnection*>(&tree_client_); |
| 92 } | 92 } |
| 93 | 93 |
| 94 mojom::WindowTreeClient* window_tree_client() { | 94 mojom::WindowTreeClient* window_tree_client() { |
| 95 return static_cast<mojom::WindowTreeClient*>(&tree_client_); | 95 return static_cast<mojom::WindowTreeClient*>(&tree_client_); |
| 96 } | 96 } |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 root1->AddTransientWindow(root2); | 657 root1->AddTransientWindow(root2); |
| 658 | 658 |
| 659 WindowTracker tracker; | 659 WindowTracker tracker; |
| 660 tracker.Add(root1); | 660 tracker.Add(root1); |
| 661 tracker.Add(root2); | 661 tracker.Add(root2); |
| 662 setup.reset(); | 662 setup.reset(); |
| 663 EXPECT_TRUE(tracker.windows().empty()); | 663 EXPECT_TRUE(tracker.windows().empty()); |
| 664 } | 664 } |
| 665 | 665 |
| 666 } // namespace mus | 666 } // namespace mus |
| OLD | NEW |