OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_ | 5 #ifndef SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_ |
6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_ | 6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/atomicops.h" | 16 #include "base/atomicops.h" |
17 #include "base/macros.h" | 17 #include "base/macros.h" |
18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
19 #include "base/observer_list.h" | 19 #include "base/observer_list.h" |
20 #include "mojo/public/cpp/bindings/associated_binding.h" | 20 #include "mojo/public/cpp/bindings/associated_binding.h" |
21 #include "mojo/public/cpp/bindings/strong_binding.h" | 21 #include "mojo/public/cpp/bindings/strong_binding.h" |
22 #include "services/ui/common/types.h" | 22 #include "services/ui/common/types.h" |
| 23 #include "services/ui/public/cpp/ui_export.h" |
23 #include "services/ui/public/cpp/window.h" | 24 #include "services/ui/public/cpp/window.h" |
24 #include "services/ui/public/cpp/window_manager_delegate.h" | 25 #include "services/ui/public/cpp/window_manager_delegate.h" |
25 #include "services/ui/public/interfaces/window_tree.mojom.h" | 26 #include "services/ui/public/interfaces/window_tree.mojom.h" |
26 | 27 |
27 namespace display { | 28 namespace display { |
28 class Display; | 29 class Display; |
29 } | 30 } |
30 | 31 |
31 namespace gfx { | 32 namespace gfx { |
32 class Insets; | 33 class Insets; |
(...skipping 18 matching lines...) Expand all Loading... |
51 // configured to delete when there are no roots (true if the WindowTreeClient | 52 // configured to delete when there are no roots (true if the WindowTreeClient |
52 // is created with a mojom::WindowTreeClientRequest). This happens | 53 // is created with a mojom::WindowTreeClientRequest). This happens |
53 // if the owner of the roots Embed()s another app in all the roots, or all | 54 // if the owner of the roots Embed()s another app in all the roots, or all |
54 // the roots are explicitly deleted. | 55 // the roots are explicitly deleted. |
55 // . The connection to mus is lost. | 56 // . The connection to mus is lost. |
56 // . Explicitly by way of calling delete. | 57 // . Explicitly by way of calling delete. |
57 // | 58 // |
58 // When WindowTreeClient is deleted all windows are deleted (and observers | 59 // When WindowTreeClient is deleted all windows are deleted (and observers |
59 // notified). This is followed by calling | 60 // notified). This is followed by calling |
60 // WindowTreeClientDelegate::OnDidDestroyClient(). | 61 // WindowTreeClientDelegate::OnDidDestroyClient(). |
61 class WindowTreeClient : public mojom::WindowTreeClient, | 62 class UI_EXPORT WindowTreeClient |
62 public mojom::WindowManager, | 63 : NON_EXPORTED_BASE(public mojom::WindowTreeClient), |
63 public WindowManagerClient { | 64 NON_EXPORTED_BASE(public mojom::WindowManager), |
| 65 public WindowManagerClient { |
64 public: | 66 public: |
65 WindowTreeClient(WindowTreeClientDelegate* delegate, | 67 WindowTreeClient(WindowTreeClientDelegate* delegate, |
66 WindowManagerDelegate* window_manager_delegate, | 68 WindowManagerDelegate* window_manager_delegate, |
67 mojom::WindowTreeClientRequest request); | 69 mojom::WindowTreeClientRequest request); |
68 ~WindowTreeClient() override; | 70 ~WindowTreeClient() override; |
69 | 71 |
70 // Establishes the connection by way of the WindowTreeFactory. | 72 // Establishes the connection by way of the WindowTreeFactory. |
71 void ConnectViaWindowTreeFactory(shell::Connector* connector); | 73 void ConnectViaWindowTreeFactory(shell::Connector* connector); |
72 | 74 |
73 // Establishes the connection by way of WindowManagerWindowTreeFactory. | 75 // Establishes the connection by way of WindowManagerWindowTreeFactory. |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 base::Callback<void(bool)> on_current_move_finished_; | 433 base::Callback<void(bool)> on_current_move_finished_; |
432 | 434 |
433 base::WeakPtrFactory<WindowTreeClient> weak_factory_; | 435 base::WeakPtrFactory<WindowTreeClient> weak_factory_; |
434 | 436 |
435 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient); | 437 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient); |
436 }; | 438 }; |
437 | 439 |
438 } // namespace ui | 440 } // namespace ui |
439 | 441 |
440 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_ | 442 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_H_ |
OLD | NEW |