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

Side by Side Diff: ash/common/wm/always_on_top_controller.h

Issue 2734653002: chromeos: Move files in //ash/common to //ash (Closed)
Patch Set: fix a11y tests, fix docs Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « ash/common/wm/OWNERS ('k') | ash/common/wm/always_on_top_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef ASH_COMMON_WM_ALWAYS_ON_TOP_CONTROLLER_H_
6 #define ASH_COMMON_WM_ALWAYS_ON_TOP_CONTROLLER_H_
7
8 #include <memory>
9
10 #include "ash/ash_export.h"
11 #include "base/macros.h"
12 #include "ui/aura/window_observer.h"
13
14 namespace ash {
15
16 class WmWindow;
17 class WorkspaceLayoutManager;
18
19 // AlwaysOnTopController puts window into proper containers based on its
20 // 'AlwaysOnTop' property. That is, putting a window into the worskpace
21 // container if its "AlwaysOnTop" property is false. Otherwise, put it in
22 // |always_on_top_container_|.
23 class ASH_EXPORT AlwaysOnTopController : public aura::WindowObserver {
24 public:
25 explicit AlwaysOnTopController(WmWindow* viewport);
26 ~AlwaysOnTopController() override;
27
28 // Gets container for given |window| based on its "AlwaysOnTop" property.
29 WmWindow* GetContainer(WmWindow* window) const;
30
31 WorkspaceLayoutManager* GetLayoutManager() const;
32
33 void SetLayoutManagerForTest(
34 std::unique_ptr<WorkspaceLayoutManager> layout_manager);
35
36 private:
37 // Overridden from aura::WindowObserver:
38 void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override;
39 void OnWindowPropertyChanged(aura::Window* window,
40 const void* key,
41 intptr_t old) override;
42 void OnWindowDestroying(aura::Window* window) override;
43
44 WmWindow* always_on_top_container_;
45
46 DISALLOW_COPY_AND_ASSIGN(AlwaysOnTopController);
47 };
48
49 } // namepsace ash
50
51 #endif // ASH_COMMON_WM_ALWAYS_ON_TOP_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/common/wm/OWNERS ('k') | ash/common/wm/always_on_top_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698