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

Unified Diff: components/view_manager/window_manager_access_policy.cc

Issue 1344573002: Mandoline: Rename components/view_manager to components/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 3 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/view_manager/window_manager_access_policy.h ('k') | components/web_view/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/view_manager/window_manager_access_policy.cc
diff --git a/components/view_manager/window_manager_access_policy.cc b/components/view_manager/window_manager_access_policy.cc
deleted file mode 100644
index 7a6751c7f23d524b629ad7ae1453ee06a251015e..0000000000000000000000000000000000000000
--- a/components/view_manager/window_manager_access_policy.cc
+++ /dev/null
@@ -1,115 +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.
-
-#include "components/view_manager/window_manager_access_policy.h"
-
-#include "components/view_manager/access_policy_delegate.h"
-#include "components/view_manager/server_view.h"
-
-namespace view_manager {
-
-// TODO(sky): document why this differs from default for each case. Maybe want
-// to subclass DefaultAccessPolicy.
-
-WindowManagerAccessPolicy::WindowManagerAccessPolicy(
- mojo::ConnectionSpecificId connection_id,
- AccessPolicyDelegate* delegate)
- : connection_id_(connection_id), delegate_(delegate) {
-}
-
-WindowManagerAccessPolicy::~WindowManagerAccessPolicy() {
-}
-
-bool WindowManagerAccessPolicy::CanRemoveViewFromParent(
- const ServerView* view) const {
- return true;
-}
-
-bool WindowManagerAccessPolicy::CanAddView(const ServerView* parent,
- const ServerView* child) const {
- return true;
-}
-
-bool WindowManagerAccessPolicy::CanReorderView(
- const ServerView* view,
- const ServerView* relative_view,
- mojo::OrderDirection direction) const {
- return true;
-}
-
-bool WindowManagerAccessPolicy::CanDeleteView(const ServerView* view) const {
- return view->id().connection_id == connection_id_;
-}
-
-bool WindowManagerAccessPolicy::CanGetViewTree(const ServerView* view) const {
- return true;
-}
-
-bool WindowManagerAccessPolicy::CanDescendIntoViewForViewTree(
- const ServerView* view) const {
- return true;
-}
-
-bool WindowManagerAccessPolicy::CanEmbed(const ServerView* view) const {
- return !delegate_->IsRootForAccessPolicy(view->id());
-}
-
-bool WindowManagerAccessPolicy::CanChangeViewVisibility(
- const ServerView* view) const {
- // The WindowManager can change the visibility of the root too.
- return view->id().connection_id == connection_id_ ||
- (view->GetRoot() == view);
-}
-
-bool WindowManagerAccessPolicy::CanSetViewSurfaceId(
- const ServerView* view) const {
- if (delegate_->IsViewRootOfAnotherConnectionForAccessPolicy(view))
- return false;
- return view->id().connection_id == connection_id_ ||
- (delegate_->IsRootForAccessPolicy(view->id()));
-}
-
-bool WindowManagerAccessPolicy::CanSetViewBounds(const ServerView* view) const {
- return view->id().connection_id == connection_id_;
-}
-
-bool WindowManagerAccessPolicy::CanSetViewProperties(
- const ServerView* view) const {
- return view->id().connection_id == connection_id_;
-}
-
-bool WindowManagerAccessPolicy::CanSetViewTextInputState(
- const ServerView* view) const {
- return view->id().connection_id == connection_id_;
-}
-
-bool WindowManagerAccessPolicy::CanSetFocus(const ServerView* view) const {
- return true;
-}
-
-bool WindowManagerAccessPolicy::CanSetAccessPolicy(
- const ServerView* view) const {
- return true;
-}
-
-bool WindowManagerAccessPolicy::ShouldNotifyOnHierarchyChange(
- const ServerView* view,
- const ServerView** new_parent,
- const ServerView** old_parent) const {
- // Notify if we've already told the window manager about the view, or if we've
- // already told the window manager about the parent. The later handles the
- // case of a view that wasn't parented to the root getting added to the root.
- return IsViewKnown(view) || (*new_parent && IsViewKnown(*new_parent));
-}
-
-const ServerView* WindowManagerAccessPolicy::GetViewForFocusChange(
- const ServerView* focused) {
- return focused;
-}
-
-bool WindowManagerAccessPolicy::IsViewKnown(const ServerView* view) const {
- return delegate_->IsViewKnownForAccessPolicy(view);
-}
-
-} // namespace view_manager
« no previous file with comments | « components/view_manager/window_manager_access_policy.h ('k') | components/web_view/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698