Port Android relocation packer to chromium build
[chromium-blink-merge.git] / ash / wm / ash_focus_rules.h
blob0249eb04f29431e689d0d3eb323cffa34430ba1d
1 // Copyright (c) 2012 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.
5 #ifndef ASH_WM_ASH_FOCUS_RULES_H_
6 #define ASH_WM_ASH_FOCUS_RULES_H_
8 #include "ash/ash_export.h"
9 #include "ash/shell_observer.h"
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "ui/wm/core/base_focus_rules.h"
14 namespace ash {
15 namespace wm {
17 class ASH_EXPORT AshFocusRules : public ::wm::BaseFocusRules,
18 public ash::ShellObserver {
19 public:
20 AshFocusRules();
21 ~AshFocusRules() override;
23 // Tests if the given |window| can be activated, ignoring the system modal
24 // dialog state.
25 bool IsWindowConsideredActivatable(aura::Window* window) const;
27 private:
28 // ::wm::BaseFocusRules:
29 bool SupportsChildActivation(aura::Window* window) const override;
30 bool IsWindowConsideredVisibleForActivation(
31 aura::Window* window) const override;
32 bool CanActivateWindow(aura::Window* window) const override;
33 aura::Window* GetNextActivatableWindow(aura::Window* ignore) const override;
35 // ash::ShellObserver:
36 void OnAppTerminating() override;
38 aura::Window* GetTopmostWindowToActivateForContainerIndex(
39 int index,
40 aura::Window* ignore) const;
41 aura::Window* GetTopmostWindowToActivateInContainer(
42 aura::Window* container,
43 aura::Window* ignore) const;
45 bool is_shutting_down_;
47 DISALLOW_COPY_AND_ASSIGN(AshFocusRules);
50 } // namespace wm
51 } // namespace ash
53 #endif // ASH_WM_ASH_FOCUS_RULES_H_