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

Unified Diff: services/view_manager/window_manager_access_policy.h

Issue 1536713004: Revert "Delete the ViewManager and WindowManager services." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: services/view_manager/window_manager_access_policy.h
diff --git a/services/view_manager/window_manager_access_policy.h b/services/view_manager/window_manager_access_policy.h
new file mode 100644
index 0000000000000000000000000000000000000000..1975aecfd373cc064d0199c0a57a7cbbecd640af
--- /dev/null
+++ b/services/view_manager/window_manager_access_policy.h
@@ -0,0 +1,52 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_VIEW_MANAGER_WINDOW_MANAGER_ACCESS_POLICY_H_
+#define SERVICES_VIEW_MANAGER_WINDOW_MANAGER_ACCESS_POLICY_H_
+
+#include "base/basictypes.h"
+#include "services/view_manager/access_policy.h"
+
+namespace view_manager {
+
+class AccessPolicyDelegate;
+
+class WindowManagerAccessPolicy : public AccessPolicy {
+ public:
+ WindowManagerAccessPolicy(mojo::ConnectionSpecificId connection_id,
+ AccessPolicyDelegate* delegate);
+ ~WindowManagerAccessPolicy() override;
+
+ // AccessPolicy:
+ bool CanRemoveViewFromParent(const ServerView* view) const override;
+ bool CanAddView(const ServerView* parent,
+ const ServerView* child) const override;
+ bool CanReorderView(const ServerView* view,
+ const ServerView* relative_view,
+ mojo::OrderDirection direction) const override;
+ bool CanDeleteView(const ServerView* view) const override;
+ bool CanGetViewTree(const ServerView* view) const override;
+ bool CanDescendIntoViewForViewTree(const ServerView* view) const override;
+ bool CanEmbed(const ServerView* view) const override;
+ bool CanChangeViewVisibility(const ServerView* view) const override;
+ bool CanSetViewSurfaceId(const ServerView* view) const override;
+ bool CanSetViewBounds(const ServerView* view) const override;
+ bool CanSetViewProperties(const ServerView* view) const override;
+ bool ShouldNotifyOnHierarchyChange(
+ const ServerView* view,
+ const ServerView** new_parent,
+ const ServerView** old_parent) const override;
+
+ private:
+ bool IsViewKnown(const ServerView* view) const;
+
+ const mojo::ConnectionSpecificId connection_id_;
+ AccessPolicyDelegate* delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(WindowManagerAccessPolicy);
+};
+
+} // namespace view_manager
+
+#endif // SERVICES_VIEW_MANAGER_WINDOW_MANAGER_ACCESS_POLICY_H_
« no previous file with comments | « services/view_manager/view_manager_service_unittest.cc ('k') | services/view_manager/window_manager_access_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698