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

Side by Side Diff: components/mus/example/wm/window_manager_impl.h

Issue 1406153004: components/mus/public/interfaces View => Window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yet another rebase Created 5 years, 2 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_MUS_EXAMPLE_WM_WINDOW_MANAGER_IMPL_H_ 5 #ifndef COMPONENTS_MUS_EXAMPLE_WM_WINDOW_MANAGER_IMPL_H_
6 #define COMPONENTS_MUS_EXAMPLE_WM_WINDOW_MANAGER_IMPL_H_ 6 #define COMPONENTS_MUS_EXAMPLE_WM_WINDOW_MANAGER_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/mus/public/cpp/types.h" 11 #include "components/mus/public/cpp/types.h"
12 #include "components/mus/public/cpp/window_observer.h" 12 #include "components/mus/public/cpp/window_observer.h"
13 #include "components/mus/public/interfaces/window_manager.mojom.h" 13 #include "components/mus/public/interfaces/window_manager.mojom.h"
14 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" 14 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
15 15
16 class WindowManagerApplication; 16 class WindowManagerApplication;
17 17
18 using WindowManagerErrorCodeCallback = 18 using WindowManagerErrorCodeCallback =
19 const mojo::Callback<void(mus::mojom::WindowManagerErrorCode)>; 19 const mojo::Callback<void(mus::mojom::WindowManagerErrorCode)>;
20 20
21 class WindowManagerImpl : public mus::mojom::WindowManager, 21 class WindowManagerImpl : public mus::mojom::WindowManager,
22 public mus::WindowObserver { 22 public mus::WindowObserver {
23 public: 23 public:
24 WindowManagerImpl(WindowManagerApplication* state, 24 WindowManagerImpl(WindowManagerApplication* state,
25 mojo::InterfaceRequest<mus::mojom::WindowManager> request); 25 mojo::InterfaceRequest<mus::mojom::WindowManager> request);
26 ~WindowManagerImpl() override; 26 ~WindowManagerImpl() override;
27 27
28 private: 28 private:
29 // mus::mojom::WindowManager: 29 // mus::mojom::WindowManager:
30 void OpenWindow(mojo::ViewTreeClientPtr client) override; 30 void OpenWindow(mus::mojom::WindowTreeClientPtr client) override;
31 void CenterWindow(mus::Id window_id, 31 void CenterWindow(mus::Id window_id,
32 mojo::SizePtr size, 32 mojo::SizePtr size,
33 const WindowManagerErrorCodeCallback& callback) override; 33 const WindowManagerErrorCodeCallback& callback) override;
34 void SetBounds(mus::Id window_id, 34 void SetBounds(mus::Id window_id,
35 mojo::RectPtr bounds, 35 mojo::RectPtr bounds,
36 const WindowManagerErrorCodeCallback& callback) override; 36 const WindowManagerErrorCodeCallback& callback) override;
37 void GetDisplays(const GetDisplaysCallback& callback) override; 37 void GetDisplays(const GetDisplaysCallback& callback) override;
38 38
39 // mus::WindowObserver: 39 // mus::WindowObserver:
40 void OnWindowDestroyed(mus::Window* window) override; 40 void OnWindowDestroyed(mus::Window* window) override;
41 41
42 WindowManagerApplication* state_; 42 WindowManagerApplication* state_;
43 mojo::StrongBinding<mus::mojom::WindowManager> binding_; 43 mojo::StrongBinding<mus::mojom::WindowManager> binding_;
44 std::set<mus::Id> windows_; 44 std::set<mus::Id> windows_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(WindowManagerImpl); 46 DISALLOW_COPY_AND_ASSIGN(WindowManagerImpl);
47 }; 47 };
48 48
49 #endif // COMPONENTS_MUS_EXAMPLE_WM_WINDOW_MANAGER_IMPL_H_ 49 #endif // COMPONENTS_MUS_EXAMPLE_WM_WINDOW_MANAGER_IMPL_H_
OLDNEW
« no previous file with comments | « components/mus/example/wm/window_manager_apptest.cc ('k') | components/mus/example/wm/window_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698