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

Side by Side Diff: components/mus/ws/access_policy.h

Issue 1782123003: Makes WindowTree take the AccessPolicy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 9 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 | « no previous file | components/mus/ws/connection_manager.h » ('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 #ifndef COMPONENTS_MUS_WS_ACCESS_POLICY_H_ 5 #ifndef COMPONENTS_MUS_WS_ACCESS_POLICY_H_
6 #define COMPONENTS_MUS_WS_ACCESS_POLICY_H_ 6 #define COMPONENTS_MUS_WS_ACCESS_POLICY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "components/mus/public/interfaces/mus_constants.mojom.h" 10 #include "components/mus/public/interfaces/mus_constants.mojom.h"
11 #include "components/mus/public/interfaces/window_tree.mojom.h" 11 #include "components/mus/public/interfaces/window_tree.mojom.h"
12 #include "components/mus/ws/ids.h" 12 #include "components/mus/ws/ids.h"
13 13
14 namespace mus { 14 namespace mus {
15 namespace ws { 15 namespace ws {
16 16
17 class AccessPolicyDelegate;
17 class ServerWindow; 18 class ServerWindow;
18 19
19 // AccessPolicy is used by WindowTree to determine what the WindowTree is 20 // AccessPolicy is used by WindowTree to determine what the WindowTree is
20 // allowed to do. 21 // allowed to do.
21 class AccessPolicy { 22 class AccessPolicy {
22 public: 23 public:
23 virtual ~AccessPolicy() {} 24 virtual ~AccessPolicy() {}
24 25
26 virtual void Init(ConnectionSpecificId connection_id,
27 AccessPolicyDelegate* delegate) = 0;
28
25 // Unless otherwise mentioned all arguments have been validated. That is the 29 // Unless otherwise mentioned all arguments have been validated. That is the
26 // |window| arguments are non-null unless otherwise stated (eg CanSetWindow() 30 // |window| arguments are non-null unless otherwise stated (eg CanSetWindow()
27 // is allowed to take a NULL window). 31 // is allowed to take a NULL window).
28 virtual bool CanRemoveWindowFromParent(const ServerWindow* window) const = 0; 32 virtual bool CanRemoveWindowFromParent(const ServerWindow* window) const = 0;
29 virtual bool CanAddWindow(const ServerWindow* parent, 33 virtual bool CanAddWindow(const ServerWindow* parent,
30 const ServerWindow* child) const = 0; 34 const ServerWindow* child) const = 0;
31 virtual bool CanAddTransientWindow(const ServerWindow* parent, 35 virtual bool CanAddTransientWindow(const ServerWindow* parent,
32 const ServerWindow* child) const = 0; 36 const ServerWindow* child) const = 0;
33 virtual bool CanRemoveTransientWindowFromParent( 37 virtual bool CanRemoveTransientWindowFromParent(
34 const ServerWindow* window) const = 0; 38 const ServerWindow* window) const = 0;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 virtual const ServerWindow* GetWindowForFocusChange( 73 virtual const ServerWindow* GetWindowForFocusChange(
70 const ServerWindow* focused) = 0; 74 const ServerWindow* focused) = 0;
71 75
72 virtual bool IsValidIdForNewWindow(const ClientWindowId& id) const = 0; 76 virtual bool IsValidIdForNewWindow(const ClientWindowId& id) const = 0;
73 }; 77 };
74 78
75 } // namespace ws 79 } // namespace ws
76 } // namespace mus 80 } // namespace mus
77 81
78 #endif // COMPONENTS_MUS_WS_ACCESS_POLICY_H_ 82 #endif // COMPONENTS_MUS_WS_ACCESS_POLICY_H_
OLDNEW
« no previous file with comments | « no previous file | components/mus/ws/connection_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698