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_WS_WINDOW_SERVER_DELEGATE_H_ | 5 #ifndef SERVICES_UI_WS_WINDOW_SERVER_DELEGATE_H_ |
6 #define SERVICES_UI_WS_WINDOW_SERVER_DELEGATE_H_ | 6 #define SERVICES_UI_WS_WINDOW_SERVER_DELEGATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "mojo/public/cpp/bindings/interface_request.h" | 13 #include "mojo/public/cpp/bindings/interface_request.h" |
14 #include "services/ui/common/types.h" | 14 #include "services/ui/common/types.h" |
15 #include "services/ui/public/interfaces/window_tree.mojom.h" | 15 #include "services/ui/public/interfaces/window_tree.mojom.h" |
16 | 16 |
| 17 namespace base { |
| 18 class SingleThreadTaskRunner; |
| 19 } |
| 20 |
17 namespace ui { | 21 namespace ui { |
18 | 22 |
| 23 class ImageCursors; |
| 24 |
19 namespace mojom { | 25 namespace mojom { |
20 class WindowTree; | 26 class WindowTree; |
21 } | 27 } |
22 | 28 |
23 namespace ws { | 29 namespace ws { |
24 | 30 |
25 class Display; | 31 class Display; |
26 class WindowServer; | 32 class WindowServer; |
27 class WindowTree; | 33 class WindowTree; |
28 class WindowTreeBinding; | 34 class WindowTreeBinding; |
(...skipping 23 matching lines...) Expand all Loading... |
52 ws::WindowTree* tree, | 58 ws::WindowTree* tree, |
53 mojom::WindowTreeRequest* tree_request, | 59 mojom::WindowTreeRequest* tree_request, |
54 mojom::WindowTreeClientPtr* client); | 60 mojom::WindowTreeClientPtr* client); |
55 | 61 |
56 // Called prior to a new WindowTree being created for a | 62 // Called prior to a new WindowTree being created for a |
57 // WindowManagerWindowTreeFactory. |automatically_create_display_roots| | 63 // WindowManagerWindowTreeFactory. |automatically_create_display_roots| |
58 // mirrors that of CreateWindowTree(). See it for details. | 64 // mirrors that of CreateWindowTree(). See it for details. |
59 virtual void OnWillCreateTreeForWindowManager( | 65 virtual void OnWillCreateTreeForWindowManager( |
60 bool automatically_create_display_roots) = 0; | 66 bool automatically_create_display_roots) = 0; |
61 | 67 |
| 68 // Returns a valid task runner which can be used to load resources. |
| 69 virtual scoped_refptr<base::SingleThreadTaskRunner>& GetResourceRunner() = 0; |
| 70 |
| 71 // The returned weak pointer can be used to manipulate the cursor, and should |
| 72 // only be dereferenced on the task runner returned by GetResourceRunner(). |
| 73 virtual base::WeakPtr<ui::ImageCursors> GetImageCursorsWeakPtr() = 0; |
| 74 |
62 protected: | 75 protected: |
63 virtual ~WindowServerDelegate() {} | 76 virtual ~WindowServerDelegate() {} |
64 }; | 77 }; |
65 | 78 |
66 } // namespace ws | 79 } // namespace ws |
67 } // namespace ui | 80 } // namespace ui |
68 | 81 |
69 #endif // SERVICES_UI_WS_WINDOW_SERVER_DELEGATE_H_ | 82 #endif // SERVICES_UI_WS_WINDOW_SERVER_DELEGATE_H_ |
OLD | NEW |