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

Side by Side Diff: mash/wm/window_manager.h

Issue 2029883002: Moves mash/wm into ash/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_static_assert
Patch Set: move comment Created 4 years, 6 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 | « mash/wm/user_window_controller_impl.cc ('k') | mash/wm/window_manager.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 2015 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 MASH_WM_WINDOW_MANAGER_H_
6 #define MASH_WM_WINDOW_MANAGER_H_
7
8 #include <stdint.h>
9
10 #include <memory>
11
12 #include "base/macros.h"
13 #include "components/mus/common/types.h"
14 #include "components/mus/public/cpp/window_manager_delegate.h"
15 #include "components/mus/public/cpp/window_observer.h"
16 #include "components/mus/public/cpp/window_tracker.h"
17 #include "components/mus/public/interfaces/window_manager.mojom.h"
18 #include "mash/session/public/interfaces/session.mojom.h"
19 #include "mash/wm/disconnected_app_handler.h"
20 #include "mojo/public/cpp/bindings/binding.h"
21
22 namespace mash {
23 namespace wm {
24
25 class RootWindowController;
26
27 class WindowManager : public mus::WindowTracker,
28 public mus::WindowManagerDelegate,
29 public session::mojom::ScreenlockStateListener {
30 public:
31 WindowManager();
32 ~WindowManager() override;
33
34 void Initialize(RootWindowController* root_controller,
35 session::mojom::Session* session);
36
37 mus::WindowManagerClient* window_manager_client() {
38 return window_manager_client_;
39 }
40
41 // Creates a new top level window.
42 mus::Window* NewTopLevelWindow(
43 std::map<std::string, std::vector<uint8_t>>* properties);
44
45 private:
46 gfx::Rect CalculateDefaultBounds(mus::Window* window) const;
47 gfx::Rect GetMaximizedWindowBounds() const;
48
49 // mus::WindowObserver:
50 void OnTreeChanging(const TreeChangeParams& params) override;
51
52 // WindowManagerDelegate:
53 void SetWindowManagerClient(mus::WindowManagerClient* client) override;
54 bool OnWmSetBounds(mus::Window* window, gfx::Rect* bounds) override;
55 bool OnWmSetProperty(
56 mus::Window* window,
57 const std::string& name,
58 std::unique_ptr<std::vector<uint8_t>>* new_data) override;
59 mus::Window* OnWmCreateTopLevelWindow(
60 std::map<std::string, std::vector<uint8_t>>* properties) override;
61 void OnWmClientJankinessChanged(const std::set<mus::Window*>& client_windows,
62 bool not_responding) override;
63 void OnAccelerator(uint32_t id, const ui::Event& event) override;
64
65 // session::mojom::ScreenlockStateListener:
66 void ScreenlockStateChanged(bool locked) override;
67
68 RootWindowController* root_controller_;
69 mus::WindowManagerClient* window_manager_client_;
70 DisconnectedAppHandler disconnected_app_handler_;
71
72 mojo::Binding<session::mojom::ScreenlockStateListener> binding_;
73
74 DISALLOW_COPY_AND_ASSIGN(WindowManager);
75 };
76
77 } // namespace wm
78 } // namespace mash
79
80 #endif // MASH_WM_WINDOW_MANAGER_H_
OLDNEW
« no previous file with comments | « mash/wm/user_window_controller_impl.cc ('k') | mash/wm/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698