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

Side by Side Diff: components/mus/ws/window_manager_access_policy.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: rebase Created 4 years, 11 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 | « components/mus/ws/window_finder.cc ('k') | components/mus/ws/window_manager_client_apptest.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 "components/mus/ws/window_manager_access_policy.h" 5 #include "components/mus/ws/window_manager_access_policy.h"
6 6
7 #include "components/mus/ws/access_policy_delegate.h" 7 #include "components/mus/ws/access_policy_delegate.h"
8 #include "components/mus/ws/server_window.h" 8 #include "components/mus/ws/server_window.h"
9 9
10 namespace mus { 10 namespace mus {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 bool WindowManagerAccessPolicy::CanChangeWindowVisibility( 72 bool WindowManagerAccessPolicy::CanChangeWindowVisibility(
73 const ServerWindow* window) const { 73 const ServerWindow* window) const {
74 // The WindowManager can change the visibility of the root too. 74 // The WindowManager can change the visibility of the root too.
75 return window->id().connection_id == connection_id_ || 75 return window->id().connection_id == connection_id_ ||
76 (window->GetRoot() == window); 76 (window->GetRoot() == window);
77 } 77 }
78 78
79 bool WindowManagerAccessPolicy::CanSetWindowSurface( 79 bool WindowManagerAccessPolicy::CanSetWindowSurface(
80 const ServerWindow* window, 80 const ServerWindow* window,
81 mus::mojom::SurfaceType surface_type) const { 81 mus::mojom::SurfaceType surface_type) const {
82 if (surface_type == mojom::SURFACE_TYPE_UNDERLAY) 82 if (surface_type == mojom::SurfaceType::UNDERLAY)
83 return window->id().connection_id == connection_id_; 83 return window->id().connection_id == connection_id_;
84 84
85 if (delegate_->IsWindowRootOfAnotherConnectionForAccessPolicy(window)) 85 if (delegate_->IsWindowRootOfAnotherConnectionForAccessPolicy(window))
86 return false; 86 return false;
87 return window->id().connection_id == connection_id_ || 87 return window->id().connection_id == connection_id_ ||
88 (delegate_->HasRootForAccessPolicy(window)); 88 (delegate_->HasRootForAccessPolicy(window));
89 } 89 }
90 90
91 bool WindowManagerAccessPolicy::CanSetWindowBounds( 91 bool WindowManagerAccessPolicy::CanSetWindowBounds(
92 const ServerWindow* window) const { 92 const ServerWindow* window) const {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 142
143 bool WindowManagerAccessPolicy::IsWindowKnown( 143 bool WindowManagerAccessPolicy::IsWindowKnown(
144 const ServerWindow* window) const { 144 const ServerWindow* window) const {
145 return delegate_->IsWindowKnownForAccessPolicy(window); 145 return delegate_->IsWindowKnownForAccessPolicy(window);
146 } 146 }
147 147
148 } // namespace ws 148 } // namespace ws
149 149
150 } // namespace mus 150 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/window_finder.cc ('k') | components/mus/ws/window_manager_client_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698