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

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

Issue 2277563002: Wires up immersive mode for chrome and mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 years, 4 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.cc ('k') | ui/views/mus/native_widget_mus.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_tree.h" 5 #include "services/ui/ws/window_tree.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 } 1285 }
1286 1286
1287 void WindowTree::AttachSurface(Id transport_window_id, 1287 void WindowTree::AttachSurface(Id transport_window_id,
1288 mojom::SurfaceType type, 1288 mojom::SurfaceType type,
1289 mojo::InterfaceRequest<mojom::Surface> surface, 1289 mojo::InterfaceRequest<mojom::Surface> surface,
1290 mojom::SurfaceClientPtr client) { 1290 mojom::SurfaceClientPtr client) {
1291 ServerWindow* window = 1291 ServerWindow* window =
1292 GetWindowByClientId(ClientWindowId(transport_window_id)); 1292 GetWindowByClientId(ClientWindowId(transport_window_id));
1293 const bool success = 1293 const bool success =
1294 window && access_policy_->CanSetWindowSurface(window, type); 1294 window && access_policy_->CanSetWindowSurface(window, type);
1295 if (!success) 1295 if (!success) {
1296 DVLOG(1) << "request to AttachSurface failed";
1296 return; 1297 return;
1298 }
1297 window->CreateSurface(type, std::move(surface), std::move(client)); 1299 window->CreateSurface(type, std::move(surface), std::move(client));
1298 } 1300 }
1299 1301
1300 void WindowTree::SetWindowTextInputState(Id transport_window_id, 1302 void WindowTree::SetWindowTextInputState(Id transport_window_id,
1301 mojo::TextInputStatePtr state) { 1303 mojo::TextInputStatePtr state) {
1302 ServerWindow* window = 1304 ServerWindow* window =
1303 GetWindowByClientId(ClientWindowId(transport_window_id)); 1305 GetWindowByClientId(ClientWindowId(transport_window_id));
1304 bool success = window && access_policy_->CanSetWindowTextInputState(window); 1306 bool success = window && access_policy_->CanSetWindowTextInputState(window);
1305 if (success) 1307 if (success)
1306 window->SetTextInputState(state.To<ui::TextInputState>()); 1308 window->SetTextInputState(state.To<ui::TextInputState>());
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 } 1676 }
1675 1677
1676 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy( 1678 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy(
1677 const ServerWindow* window) const { 1679 const ServerWindow* window) const {
1678 WindowTree* tree = window_server_->GetTreeWithRoot(window); 1680 WindowTree* tree = window_server_->GetTreeWithRoot(window);
1679 return tree && tree != this; 1681 return tree && tree != this;
1680 } 1682 }
1681 1683
1682 } // namespace ws 1684 } // namespace ws
1683 } // namespace ui 1685 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_manager_state.cc ('k') | ui/views/mus/native_widget_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698