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

Unified Diff: components/mus/ws/access_policy.h

Issue 2119963002: Move mus to //services/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/ws/accelerator.cc ('k') | components/mus/ws/access_policy_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/access_policy.h
diff --git a/components/mus/ws/access_policy.h b/components/mus/ws/access_policy.h
deleted file mode 100644
index 2f0cb366cc5200f73c2f8220350097302ba595e5..0000000000000000000000000000000000000000
--- a/components/mus/ws/access_policy.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// 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 COMPONENTS_MUS_WS_ACCESS_POLICY_H_
-#define COMPONENTS_MUS_WS_ACCESS_POLICY_H_
-
-#include <stdint.h>
-
-#include "components/mus/public/interfaces/mus_constants.mojom.h"
-#include "components/mus/public/interfaces/window_tree.mojom.h"
-#include "components/mus/ws/ids.h"
-
-namespace mus {
-namespace ws {
-
-class AccessPolicyDelegate;
-class ServerWindow;
-
-// AccessPolicy is used by WindowTree to determine what the WindowTree is
-// allowed to do.
-class AccessPolicy {
- public:
- virtual ~AccessPolicy() {}
-
- virtual void Init(ClientSpecificId client_id,
- AccessPolicyDelegate* delegate) = 0;
-
- // Unless otherwise mentioned all arguments have been validated. That is the
- // |window| arguments are non-null unless otherwise stated (eg CanSetWindow()
- // is allowed to take a NULL window).
- virtual bool CanRemoveWindowFromParent(const ServerWindow* window) const = 0;
- virtual bool CanAddWindow(const ServerWindow* parent,
- const ServerWindow* child) const = 0;
- virtual bool CanAddTransientWindow(const ServerWindow* parent,
- const ServerWindow* child) const = 0;
- virtual bool CanRemoveTransientWindowFromParent(
- const ServerWindow* window) const = 0;
- virtual bool CanSetModal(const ServerWindow* window) const = 0;
- virtual bool CanReorderWindow(const ServerWindow* window,
- const ServerWindow* relative_window,
- mojom::OrderDirection direction) const = 0;
- virtual bool CanDeleteWindow(const ServerWindow* window) const = 0;
- virtual bool CanGetWindowTree(const ServerWindow* window) const = 0;
- // Used when building a window tree (GetWindowTree()) to decide if we should
- // descend into |window|.
- virtual bool CanDescendIntoWindowForWindowTree(
- const ServerWindow* window) const = 0;
- virtual bool CanEmbed(const ServerWindow* window) const = 0;
- virtual bool CanChangeWindowVisibility(const ServerWindow* window) const = 0;
- virtual bool CanChangeWindowOpacity(const ServerWindow* window) const = 0;
- virtual bool CanSetWindowSurface(const ServerWindow* window,
- mojom::SurfaceType surface_type) const = 0;
- virtual bool CanSetWindowBounds(const ServerWindow* window) const = 0;
- virtual bool CanSetWindowProperties(const ServerWindow* window) const = 0;
- virtual bool CanSetWindowTextInputState(const ServerWindow* window) const = 0;
- virtual bool CanSetCapture(const ServerWindow* window) const = 0;
- virtual bool CanSetFocus(const ServerWindow* window) const = 0;
- virtual bool CanSetClientArea(const ServerWindow* window) const = 0;
- virtual bool CanSetHitTestMask(const ServerWindow* window) const = 0;
- // Used for all client controllable cursor properties; which cursor should be
- // displayed, visibility, locking, etc.
- virtual bool CanSetCursorProperties(const ServerWindow* window) const = 0;
-
- // Returns whether the client should notify on a hierarchy change.
- // |new_parent| and |old_parent| are initially set to the new and old parents
- // but may be altered so that the client only sees a certain set of windows.
- virtual bool ShouldNotifyOnHierarchyChange(
- const ServerWindow* window,
- const ServerWindow** new_parent,
- const ServerWindow** old_parent) const = 0;
- virtual bool CanSetWindowManager() const = 0;
-
- // Returns the window to supply to the client when focus changes to |focused|.
- virtual const ServerWindow* GetWindowForFocusChange(
- const ServerWindow* focused) = 0;
-
- virtual bool IsValidIdForNewWindow(const ClientWindowId& id) const = 0;
-};
-
-} // namespace ws
-} // namespace mus
-
-#endif // COMPONENTS_MUS_WS_ACCESS_POLICY_H_
« no previous file with comments | « components/mus/ws/accelerator.cc ('k') | components/mus/ws/access_policy_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698