Fix compilation error from crrev.com/33c6f11de20
[chromium-blink-merge.git] / ash / wm / always_on_top_controller.h
blob0d26c51cf7873cfe250bd8dfc205abcaa1b65745
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_ALWAYS_ON_TOP_CONTROLLER_H_
6 #define ASH_WM_ALWAYS_ON_TOP_CONTROLLER_H_
8 #include "ash/ash_export.h"
9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h"
11 #include "ui/aura/window_observer.h"
13 namespace aura {
14 class Window;
17 namespace ash {
18 class WorkspaceLayoutManager;
20 // AlwaysOnTopController puts window into proper containers based on its
21 // 'AlwaysOnTop' property. That is, putting a window into the worskpace
22 // container if its "AlwaysOnTop" property is false. Otherwise, put it in
23 // |always_on_top_container_|.
24 class ASH_EXPORT AlwaysOnTopController : public aura::WindowObserver {
25 public:
26 explicit AlwaysOnTopController(aura::Window* viewport);
27 ~AlwaysOnTopController() override;
29 // Gets container for given |window| based on its "AlwaysOnTop" property.
30 aura::Window* GetContainer(aura::Window* window) const;
32 WorkspaceLayoutManager* GetLayoutManager() const;
34 void SetLayoutManagerForTest(WorkspaceLayoutManager* layout_manager);
36 private:
37 // Overridden from aura::WindowObserver:
38 void OnWindowAdded(aura::Window* child) override;
39 void OnWillRemoveWindow(aura::Window* child) override;
40 void OnWindowPropertyChanged(aura::Window* window,
41 const void* key,
42 intptr_t old) override;
43 void OnWindowDestroyed(aura::Window* window) override;
45 aura::Window* always_on_top_container_;
47 DISALLOW_COPY_AND_ASSIGN(AlwaysOnTopController);
50 } // namepsace ash
52 #endif // ASH_WM_ALWAYS_ON_TOP_CONTROLLER_H_