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

Side by Side Diff: mojo/services/view_manager/window_manager_access_policy.h

Issue 421693002: Adds an AccessPolicy that is queried to determine what a connection can do (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wrap Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_SERVICES_VIEW_MANAGER_WINDOW_MANAGER_ACCESS_POLICY_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_WINDOW_MANAGER_ACCESS_POLICY_H_
7
8 #include "base/basictypes.h"
9 #include "mojo/services/view_manager/access_policy.h"
10
11 namespace mojo {
12 namespace service {
13
14 class AccessPolicyDelegate;
15
16 class WindowManagerAccessPolicy : public AccessPolicy {
17 public:
18 WindowManagerAccessPolicy(ConnectionSpecificId connection_id,
19 AccessPolicyDelegate* delegate);
20 virtual ~WindowManagerAccessPolicy();
21
22 // AccessPolicy:
23 virtual bool CanRemoveNodeFromParent(const Node* node) const OVERRIDE;
24 virtual bool CanAddNode(const Node* parent, const Node* child) const OVERRIDE;
25 virtual bool CanReorderNode(const Node* node,
26 const Node* relative_node,
27 OrderDirection direction) const OVERRIDE;
28 virtual bool CanDeleteNode(const Node* node) const OVERRIDE;
29 virtual bool CanDeleteView(const View* view) const OVERRIDE;
30 virtual bool CanSetView(const Node* node, const View* view) const OVERRIDE;
31 virtual bool CanSetFocus(const Node* node) const OVERRIDE;
32 virtual bool CanGetNodeTree(const Node* node) const OVERRIDE;
33 virtual bool CanDescendIntoNodeForNodeTree(const Node* node) const OVERRIDE;
34 virtual bool CanEmbed(const Node* node) const OVERRIDE;
35 virtual bool CanChangeNodeVisibility(const Node* node) const OVERRIDE;
36 virtual bool CanSetViewContents(const View* view) const OVERRIDE;
37 virtual bool CanSetNodeBounds(const Node* node) const OVERRIDE;
38 virtual bool ShouldNotifyOnHierarchyChange(
39 const Node* node,
40 const Node** new_parent,
41 const Node** old_parent) const OVERRIDE;
42 virtual Id GetViewIdToSend(const Node* node, const View* view) const OVERRIDE;
43 virtual bool ShouldSendViewDeleted(const ViewId& view_id) const OVERRIDE;
44
45 private:
46 bool IsNodeKnown(const Node* node) const;
47
48 const ConnectionSpecificId connection_id_;
49 AccessPolicyDelegate* delegate_;
50
51 DISALLOW_COPY_AND_ASSIGN(WindowManagerAccessPolicy);
52 };
53
54 } // namespace service
55 } // namespace mojo
56
57 #endif // MOJO_SERVICES_VIEW_MANAGER_WINDOW_MANAGER_ACCESS_POLICY_H_
OLDNEW
« no previous file with comments | « mojo/services/view_manager/view_manager_unittest.cc ('k') | mojo/services/view_manager/window_manager_access_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698