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

Side by Side Diff: components/mus/ws/window_manager_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 | « components/mus/ws/display_binding.cc ('k') | components/mus/ws/window_manager_access_policy.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 #ifndef COMPONENTS_MUS_WS_WINDOW_MANAGER_ACCESS_POLICY_H_ 5 #ifndef COMPONENTS_MUS_WS_WINDOW_MANAGER_ACCESS_POLICY_H_
6 #define COMPONENTS_MUS_WS_WINDOW_MANAGER_ACCESS_POLICY_H_ 6 #define COMPONENTS_MUS_WS_WINDOW_MANAGER_ACCESS_POLICY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/mus/ws/access_policy.h" 11 #include "components/mus/ws/access_policy.h"
12 12
13 namespace mus { 13 namespace mus {
14 namespace ws { 14 namespace ws {
15 15
16 class AccessPolicyDelegate; 16 class AccessPolicyDelegate;
17 17
18 class WindowManagerAccessPolicy : public AccessPolicy { 18 class WindowManagerAccessPolicy : public AccessPolicy {
19 public: 19 public:
20 WindowManagerAccessPolicy(ConnectionSpecificId connection_id, 20 WindowManagerAccessPolicy();
21 AccessPolicyDelegate* delegate);
22 ~WindowManagerAccessPolicy() override; 21 ~WindowManagerAccessPolicy() override;
23 22
24 // AccessPolicy: 23 // AccessPolicy:
24 void Init(ConnectionSpecificId connection_id,
25 AccessPolicyDelegate* delegate) override;
25 bool CanRemoveWindowFromParent(const ServerWindow* window) const override; 26 bool CanRemoveWindowFromParent(const ServerWindow* window) const override;
26 bool CanAddWindow(const ServerWindow* parent, 27 bool CanAddWindow(const ServerWindow* parent,
27 const ServerWindow* child) const override; 28 const ServerWindow* child) const override;
28 bool CanAddTransientWindow(const ServerWindow* parent, 29 bool CanAddTransientWindow(const ServerWindow* parent,
29 const ServerWindow* child) const override; 30 const ServerWindow* child) const override;
30 bool CanRemoveTransientWindowFromParent( 31 bool CanRemoveTransientWindowFromParent(
31 const ServerWindow* window) const override; 32 const ServerWindow* window) const override;
32 bool CanSetModal(const ServerWindow* window) const override; 33 bool CanSetModal(const ServerWindow* window) const override;
33 bool CanReorderWindow(const ServerWindow* window, 34 bool CanReorderWindow(const ServerWindow* window,
34 const ServerWindow* relative_window, 35 const ServerWindow* relative_window,
(...skipping 18 matching lines...) Expand all
53 const ServerWindow** new_parent, 54 const ServerWindow** new_parent,
54 const ServerWindow** old_parent) const override; 55 const ServerWindow** old_parent) const override;
55 const ServerWindow* GetWindowForFocusChange( 56 const ServerWindow* GetWindowForFocusChange(
56 const ServerWindow* focused) override; 57 const ServerWindow* focused) override;
57 bool CanSetWindowManager() const override; 58 bool CanSetWindowManager() const override;
58 bool IsValidIdForNewWindow(const ClientWindowId& id) const override; 59 bool IsValidIdForNewWindow(const ClientWindowId& id) const override;
59 60
60 private: 61 private:
61 bool IsWindowKnown(const ServerWindow* window) const; 62 bool IsWindowKnown(const ServerWindow* window) const;
62 63
63 const ConnectionSpecificId connection_id_; 64 ConnectionSpecificId connection_id_ = 0u;
64 AccessPolicyDelegate* delegate_; 65 AccessPolicyDelegate* delegate_ = nullptr;
65 66
66 DISALLOW_COPY_AND_ASSIGN(WindowManagerAccessPolicy); 67 DISALLOW_COPY_AND_ASSIGN(WindowManagerAccessPolicy);
67 }; 68 };
68 69
69 } // namespace ws 70 } // namespace ws
70 } // namespace mus 71 } // namespace mus
71 72
72 #endif // COMPONENTS_MUS_WS_WINDOW_MANAGER_ACCESS_POLICY_H_ 73 #endif // COMPONENTS_MUS_WS_WINDOW_MANAGER_ACCESS_POLICY_H_
OLDNEW
« no previous file with comments | « components/mus/ws/display_binding.cc ('k') | components/mus/ws/window_manager_access_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698