| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 ClientSpecificId WindowServer::GetAndAdvanceNextClientId() { | 67 ClientSpecificId WindowServer::GetAndAdvanceNextClientId() { |
| 68 const ClientSpecificId id = next_client_id_++; | 68 const ClientSpecificId id = next_client_id_++; |
| 69 DCHECK_LT(id, next_client_id_); | 69 DCHECK_LT(id, next_client_id_); |
| 70 return id; | 70 return id; |
| 71 } | 71 } |
| 72 | 72 |
| 73 WindowTree* WindowServer::EmbedAtWindow( | 73 WindowTree* WindowServer::EmbedAtWindow( |
| 74 ServerWindow* root, | 74 ServerWindow* root, |
| 75 const UserId& user_id, | 75 const UserId& user_id, |
| 76 mojom::WindowTreeClientPtr client, | 76 mojom::WindowTreeClientPtr client, |
| 77 uint32_t flags, |
| 77 std::unique_ptr<AccessPolicy> access_policy) { | 78 std::unique_ptr<AccessPolicy> access_policy) { |
| 78 std::unique_ptr<WindowTree> tree_ptr( | 79 std::unique_ptr<WindowTree> tree_ptr( |
| 79 new WindowTree(this, user_id, root, std::move(access_policy))); | 80 new WindowTree(this, user_id, root, std::move(access_policy))); |
| 80 WindowTree* tree = tree_ptr.get(); | 81 WindowTree* tree = tree_ptr.get(); |
| 82 if (flags & mojom::kEmbedFlagEmbedderInterceptsEvents) |
| 83 tree->set_embedder_intercepts_events(); |
| 81 | 84 |
| 82 mojom::WindowTreePtr window_tree_ptr; | 85 mojom::WindowTreePtr window_tree_ptr; |
| 83 mojom::WindowTreeRequest window_tree_request = GetProxy(&window_tree_ptr); | 86 mojom::WindowTreeRequest window_tree_request = GetProxy(&window_tree_ptr); |
| 84 std::unique_ptr<WindowTreeBinding> binding = | 87 std::unique_ptr<WindowTreeBinding> binding = |
| 85 delegate_->CreateWindowTreeBinding( | 88 delegate_->CreateWindowTreeBinding( |
| 86 WindowServerDelegate::BindingType::EMBED, this, tree, | 89 WindowServerDelegate::BindingType::EMBED, this, tree, |
| 87 &window_tree_request, &client); | 90 &window_tree_request, &client); |
| 88 if (!binding) { | 91 if (!binding) { |
| 89 binding.reset(new ws::DefaultWindowTreeBinding( | 92 binding.reset(new ws::DefaultWindowTreeBinding( |
| 90 tree, this, std::move(window_tree_request), std::move(client))); | 93 tree, this, std::move(window_tree_request), std::move(client))); |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 } | 678 } |
| 676 | 679 |
| 677 WindowManagerState* WindowServer::GetWindowManagerStateForUser( | 680 WindowManagerState* WindowServer::GetWindowManagerStateForUser( |
| 678 const UserId& user_id) { | 681 const UserId& user_id) { |
| 679 return window_manager_window_tree_factory_set_.GetWindowManagerStateForUser( | 682 return window_manager_window_tree_factory_set_.GetWindowManagerStateForUser( |
| 680 user_id); | 683 user_id); |
| 681 } | 684 } |
| 682 | 685 |
| 683 } // namespace ws | 686 } // namespace ws |
| 684 } // namespace mus | 687 } // namespace mus |
| OLD | NEW |