Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Side by Side Diff: services/ui/ws/window_server.cc

Issue 2592623002: mojo:: Introduce InterfaceRequest ctor that takes in InterfacePtr* (Closed)
Patch Set: Rebase + response to review Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/ws/window_manager_state_unittest.cc ('k') | services/ui/ws/window_tree_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "services/ui/ws/window_server.h" 5 #include "services/ui/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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 mojom::WindowTreeClientPtr client, 101 mojom::WindowTreeClientPtr client,
102 uint32_t flags, 102 uint32_t flags,
103 std::unique_ptr<AccessPolicy> access_policy) { 103 std::unique_ptr<AccessPolicy> access_policy) {
104 std::unique_ptr<WindowTree> tree_ptr( 104 std::unique_ptr<WindowTree> tree_ptr(
105 new WindowTree(this, user_id, root, std::move(access_policy))); 105 new WindowTree(this, user_id, root, std::move(access_policy)));
106 WindowTree* tree = tree_ptr.get(); 106 WindowTree* tree = tree_ptr.get();
107 if (flags & mojom::kEmbedFlagEmbedderInterceptsEvents) 107 if (flags & mojom::kEmbedFlagEmbedderInterceptsEvents)
108 tree->set_embedder_intercepts_events(); 108 tree->set_embedder_intercepts_events();
109 109
110 mojom::WindowTreePtr window_tree_ptr; 110 mojom::WindowTreePtr window_tree_ptr;
111 mojom::WindowTreeRequest window_tree_request = MakeRequest(&window_tree_ptr); 111 mojom::WindowTreeRequest window_tree_request(&window_tree_ptr);
112 std::unique_ptr<WindowTreeBinding> binding = 112 std::unique_ptr<WindowTreeBinding> binding =
113 delegate_->CreateWindowTreeBinding( 113 delegate_->CreateWindowTreeBinding(
114 WindowServerDelegate::BindingType::EMBED, this, tree, 114 WindowServerDelegate::BindingType::EMBED, this, tree,
115 &window_tree_request, &client); 115 &window_tree_request, &client);
116 if (!binding) { 116 if (!binding) {
117 binding = base::MakeUnique<ws::DefaultWindowTreeBinding>( 117 binding = base::MakeUnique<ws::DefaultWindowTreeBinding>(
118 tree, this, std::move(window_tree_request), std::move(client)); 118 tree, this, std::move(window_tree_request), std::move(client));
119 } 119 }
120 120
121 AddTree(std::move(tree_ptr), std::move(binding), std::move(window_tree_ptr)); 121 AddTree(std::move(tree_ptr), std::move(binding), std::move(window_tree_ptr));
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 void WindowServer::OnUserIdAdded(const UserId& id) { 821 void WindowServer::OnUserIdAdded(const UserId& id) {
822 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); 822 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr);
823 } 823 }
824 824
825 void WindowServer::OnUserIdRemoved(const UserId& id) { 825 void WindowServer::OnUserIdRemoved(const UserId& id) {
826 activity_monitor_map_.erase(id); 826 activity_monitor_map_.erase(id);
827 } 827 }
828 828
829 } // namespace ws 829 } // namespace ws
830 } // namespace ui 830 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_manager_state_unittest.cc ('k') | services/ui/ws/window_tree_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698