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

Side by Side Diff: services/ui/ws/platform_display.h

Issue 2916823002: Move Mus into chrome's process when running with --mus.
Patch Set: Undo Screen TLS change, don't use Screen::GetScreen() in Mus. Created 3 years, 5 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 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_PLATFORM_DISPLAY_H_ 5 #ifndef SERVICES_UI_WS_PLATFORM_DISPLAY_H_
6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_H_ 6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "services/ui/display/viewport_metrics.h" 14 #include "services/ui/display/viewport_metrics.h"
15 #include "services/ui/public/interfaces/cursor/cursor.mojom.h" 15 #include "services/ui/public/interfaces/cursor/cursor.mojom.h"
16 #include "ui/events/event_source.h" 16 #include "ui/events/event_source.h"
17 #include "ui/gfx/native_widget_types.h" 17 #include "ui/gfx/native_widget_types.h"
18 18
19 namespace base {
20 class SingleThreadTaskRunner;
21 }
22
19 namespace ui { 23 namespace ui {
20 24
21 enum class CursorSize; 25 enum class CursorSize;
26 class ImageCursors;
22 struct TextInputState; 27 struct TextInputState;
23 28
24 namespace ws { 29 namespace ws {
25 30
26 class FrameGenerator; 31 class FrameGenerator;
27 class PlatformDisplayDelegate; 32 class PlatformDisplayDelegate;
28 class PlatformDisplayFactory; 33 class PlatformDisplayFactory;
29 class ServerWindow; 34 class ServerWindow;
30 35
31 // PlatformDisplay is used to connect the root ServerWindow to a display. 36 // PlatformDisplay is used to connect the root ServerWindow to a display.
32 class PlatformDisplay : public ui::EventSource { 37 class PlatformDisplay : public ui::EventSource {
33 public: 38 public:
34 ~PlatformDisplay() override {} 39 ~PlatformDisplay() override {}
35 40
36 static std::unique_ptr<PlatformDisplay> Create( 41 static std::unique_ptr<PlatformDisplay> Create(
37 ServerWindow* root_window, 42 ServerWindow* root_window,
38 const display::ViewportMetrics& metrics); 43 const display::ViewportMetrics& metrics,
44 scoped_refptr<base::SingleThreadTaskRunner>& resource_runner,
45 base::WeakPtr<ui::ImageCursors> image_cursors_weak_ptr);
39 46
40 virtual void Init(PlatformDisplayDelegate* delegate) = 0; 47 virtual void Init(PlatformDisplayDelegate* delegate) = 0;
41 48
42 virtual void SetViewportSize(const gfx::Size& size) = 0; 49 virtual void SetViewportSize(const gfx::Size& size) = 0;
43 50
44 virtual void SetTitle(const base::string16& title) = 0; 51 virtual void SetTitle(const base::string16& title) = 0;
45 52
46 virtual void SetCapture() = 0; 53 virtual void SetCapture() = 0;
47 54
48 virtual void ReleaseCapture() = 0; 55 virtual void ReleaseCapture() = 0;
(...skipping 26 matching lines...) Expand all
75 private: 82 private:
76 // Static factory instance (always NULL for non-test). 83 // Static factory instance (always NULL for non-test).
77 static PlatformDisplayFactory* factory_; 84 static PlatformDisplayFactory* factory_;
78 }; 85 };
79 86
80 87
81 } // namespace ws 88 } // namespace ws
82 } // namespace ui 89 } // namespace ui
83 90
84 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ 91 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698