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

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

Issue 2511233002: Add the beginning of a simple window manager that we'll support on Windows. (Closed)
Patch Set: . Created 4 years, 1 month 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/manifest.json ('k') | mash/wm/wm.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 2016 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_WM_H_
6 #define MASH_WM_WM_H_
7
8 #include <memory>
9
10 #include "mojo/public/cpp/bindings/binding.h"
11 #include "services/service_manager/public/cpp/service.h"
12 #include "services/ui/public/cpp/window_manager_delegate.h"
13 #include "services/ui/public/cpp/window_tree_client_delegate.h"
14 #include "ui/display/display.h"
15
16 namespace mash {
17 namespace wm {
18
19 class WM : public service_manager::Service,
sky 2016/11/17 20:41:58 Could I convince you to go with a more specific na
20 public ui::WindowTreeClientDelegate,
21 public ui::WindowManagerDelegate {
22 public:
23 WM();
24 ~WM() override;
25
26 private:
27 // service_manager::Service:
28 void OnStart() override;
29 bool OnConnect(const service_manager::ServiceInfo& remote_info,
30 service_manager::InterfaceRegistry* registry) override;
31
32 // ui::WindowTreeClientDelegate:
33 void OnEmbed(ui::Window* root) override;
34 void OnLostConnection(ui::WindowTreeClient* client) override;
35 void OnEmbedRootDestroyed(ui::Window* root) override;
36 void OnPointerEventObserved(const ui::PointerEvent& event,
37 ui::Window* target) override;
38
39 // ui::WindowManagerDelegate:
40 void SetWindowManagerClient(ui::WindowManagerClient* client) override;
41 bool OnWmSetBounds(ui::Window* window, gfx::Rect* bounds) override;
42 bool OnWmSetProperty(
43 ui::Window* window,
44 const std::string& name,
45 std::unique_ptr<std::vector<uint8_t>>* new_data) override;
46 ui::Window* OnWmCreateTopLevelWindow(
47 std::map<std::string, std::vector<uint8_t>>* properties) override;
48 void OnWmClientJankinessChanged(const std::set<ui::Window*>& client_windows,
49 bool janky) override;
50 void OnWmNewDisplay(ui::Window* window,
51 const display::Display& display) override;
52 void OnWmDisplayRemoved(ui::Window* window) override;
53 void OnWmDisplayModified(const display::Display& display) override;
54 void OnWmPerformMoveLoop(ui::Window* window,
55 ui::mojom::MoveLoopSource source,
56 const gfx::Point& cursor_location,
57 const base::Callback<void(bool)>& on_done) override;
58 void OnWmCancelMoveLoop(ui::Window* window) override;
59
60 ui::Window* root_ = nullptr;
61 ui::WindowManagerClient* window_manager_client_ = nullptr;
62 std::unique_ptr<ui::WindowTreeClient> window_tree_client_;
63
64 DISALLOW_COPY_AND_ASSIGN(WM);
65 };
66
67 } // namespace wm
68 } // namespace mash
69
70 #endif // MASH_WM_WM_H_
OLDNEW
« no previous file with comments | « mash/wm/manifest.json ('k') | mash/wm/wm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698