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

Unified Diff: ui/wm/core/focus_rules.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 | « ui/wm/core/focus_controller_unittest.cc ('k') | ui/wm/core/image_grid.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/focus_rules.h
diff --git a/ui/wm/core/focus_rules.h b/ui/wm/core/focus_rules.h
deleted file mode 100644
index cb9a4ddbd8fa5d0d6a59227d19385a3c9031a9ae..0000000000000000000000000000000000000000
--- a/ui/wm/core/focus_rules.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2012 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 UI_WM_CORE_FOCUS_RULES_H_
-#define UI_WM_CORE_FOCUS_RULES_H_
-
-#include "ui/wm/wm_export.h"
-
-namespace aura {
-class Window;
-}
-
-namespace wm {
-
-// Implemented by an object that establishes the rules about what can be
-// focused or activated.
-class WM_EXPORT FocusRules {
- public:
- virtual ~FocusRules() {}
-
- // Returns true if |window| is a toplevel window. Whether or not a window
- // is considered toplevel is determined by a similar set of rules that
- // govern activation and focus. Not all toplevel windows are activatable,
- // call CanActivateWindow() to determine if a window can be activated.
- virtual bool IsToplevelWindow(aura::Window* window) const = 0;
- // Returns true if |window| can be activated or focused.
- virtual bool CanActivateWindow(aura::Window* window) const = 0;
- // For CanFocusWindow(), NULL is supported, because NULL is a valid focusable
- // window (in the case of clearing focus).
- virtual bool CanFocusWindow(aura::Window* window) const = 0;
-
- // Returns the toplevel window containing |window|. Not all toplevel windows
- // are activatable, call GetActivatableWindow() instead to return the
- // activatable window, which might be in a different hierarchy.
- // Will return NULL if |window| is not contained by a window considered to be
- // a toplevel window.
- virtual aura::Window* GetToplevelWindow(aura::Window* window) const = 0;
- // Returns the activatable or focusable window given an attempt to activate or
- // focus |window|. Some possible scenarios (not intended to be exhaustive):
- // - |window| is a child of a non-focusable window and so focus must be set
- // according to rules defined by the delegate, e.g. to a parent.
- // - |window| is an activatable window that is the transient parent of a modal
- // window, so attempts to activate |window| should result in the modal
- // transient being activated instead.
- // These methods may return NULL if they are unable to find an activatable
- // or focusable window given |window|.
- virtual aura::Window* GetActivatableWindow(aura::Window* window) const = 0;
- virtual aura::Window* GetFocusableWindow(aura::Window* window) const = 0;
-
- // Returns the next window to activate in the event that |ignore| is no longer
- // activatable. This function is called when something is happening to
- // |ignore| that means it can no longer have focus or activation, including
- // but not limited to:
- // - it or its parent hierarchy is being hidden, or removed from the
- // RootWindow.
- // - it is being destroyed.
- // - it is being explicitly deactivated.
- // |ignore| cannot be NULL.
- virtual aura::Window* GetNextActivatableWindow(
- aura::Window* ignore) const = 0;
-};
-
-} // namespace wm
-
-#endif // UI_WM_CORE_FOCUS_RULES_H_
« no previous file with comments | « ui/wm/core/focus_controller_unittest.cc ('k') | ui/wm/core/image_grid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698