| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ws/window_server.h" | 5 #include "components/mus/ws/window_server.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 ClientSpecificId WindowServer::GetAndAdvanceNextClientId() { | 66 ClientSpecificId WindowServer::GetAndAdvanceNextClientId() { |
| 67 const ClientSpecificId id = next_client_id_++; | 67 const ClientSpecificId id = next_client_id_++; |
| 68 DCHECK_LT(id, next_client_id_); | 68 DCHECK_LT(id, next_client_id_); |
| 69 return id; | 69 return id; |
| 70 } | 70 } |
| 71 | 71 |
| 72 WindowTree* WindowServer::EmbedAtWindow( | 72 WindowTree* WindowServer::EmbedAtWindow( |
| 73 ServerWindow* root, | 73 ServerWindow* root, |
| 74 const UserId& user_id, | 74 const UserId& user_id, |
| 75 mojom::WindowTreeClientPtr client, | 75 mojom::WindowTreeClientPtr client, |
| 76 uint32_t flags, |
| 76 std::unique_ptr<AccessPolicy> access_policy) { | 77 std::unique_ptr<AccessPolicy> access_policy) { |
| 77 std::unique_ptr<WindowTree> tree_ptr( | 78 std::unique_ptr<WindowTree> tree_ptr( |
| 78 new WindowTree(this, user_id, root, std::move(access_policy))); | 79 new WindowTree(this, user_id, root, std::move(access_policy))); |
| 79 WindowTree* tree = tree_ptr.get(); | 80 WindowTree* tree = tree_ptr.get(); |
| 81 if (flags & mojom::kEmbedFlagEmbedderInterceptsEvents) |
| 82 tree->set_embedder_intercepts_events(); |
| 80 | 83 |
| 81 mojom::WindowTreePtr window_tree_ptr; | 84 mojom::WindowTreePtr window_tree_ptr; |
| 82 mojom::WindowTreeRequest window_tree_request = GetProxy(&window_tree_ptr); | 85 mojom::WindowTreeRequest window_tree_request = GetProxy(&window_tree_ptr); |
| 83 std::unique_ptr<WindowTreeBinding> binding = | 86 std::unique_ptr<WindowTreeBinding> binding = |
| 84 delegate_->CreateWindowTreeBinding( | 87 delegate_->CreateWindowTreeBinding( |
| 85 WindowServerDelegate::BindingType::EMBED, this, tree, | 88 WindowServerDelegate::BindingType::EMBED, this, tree, |
| 86 &window_tree_request, &client); | 89 &window_tree_request, &client); |
| 87 if (!binding) { | 90 if (!binding) { |
| 88 binding.reset(new ws::DefaultWindowTreeBinding( | 91 binding.reset(new ws::DefaultWindowTreeBinding( |
| 89 tree, this, std::move(window_tree_request), std::move(client))); | 92 tree, this, std::move(window_tree_request), std::move(client))); |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 void WindowServer::OnFirstDisplayReady() { | 658 void WindowServer::OnFirstDisplayReady() { |
| 656 delegate_->OnFirstDisplayReady(); | 659 delegate_->OnFirstDisplayReady(); |
| 657 } | 660 } |
| 658 | 661 |
| 659 void WindowServer::OnNoMoreDisplays() { | 662 void WindowServer::OnNoMoreDisplays() { |
| 660 delegate_->OnNoMoreDisplays(); | 663 delegate_->OnNoMoreDisplays(); |
| 661 } | 664 } |
| 662 | 665 |
| 663 } // namespace ws | 666 } // namespace ws |
| 664 } // namespace mus | 667 } // namespace mus |
| OLD | NEW |