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

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

Issue 2497303002: Fix ws::Display initialization order. (Closed)
Patch Set: Fix use after move in test. 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 | « services/ui/ws/frame_generator.cc ('k') | services/ui/ws/platform_display.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <map>
11 #include <memory> 10 #include <memory>
12 #include <utility>
13 11
14 #include "base/macros.h" 12 #include "base/macros.h"
15 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
16 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
17 #include "build/build_config.h" 15 #include "build/build_config.h"
18 #include "services/ui/display/viewport_metrics.h" 16 #include "services/ui/display/viewport_metrics.h"
19 #include "services/ui/public/interfaces/cursor.mojom.h" 17 #include "services/ui/public/interfaces/cursor.mojom.h"
20 #include "services/ui/public/interfaces/window_manager.mojom.h" 18 #include "services/ui/public/interfaces/window_manager.mojom.h"
21 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" 19 #include "services/ui/public/interfaces/window_manager_constants.mojom.h"
22 #include "services/ui/public/interfaces/window_tree.mojom.h" 20 #include "services/ui/public/interfaces/window_tree.mojom.h"
23 #include "services/ui/ws/frame_generator.h" 21 #include "services/ui/ws/frame_generator.h"
24 #include "services/ui/ws/frame_generator_delegate.h" 22 #include "services/ui/ws/frame_generator_delegate.h"
25 #include "services/ui/ws/platform_display_delegate.h" 23 #include "services/ui/ws/platform_display_delegate.h"
26 #include "ui/display/display.h" 24 #include "ui/display/display.h"
27 #include "ui/platform_window/platform_window_delegate.h" 25 #include "ui/platform_window/platform_window_delegate.h"
28 26
29 namespace cc {
30 class CopyOutputRequest;
31 } // namespace cc
32
33 namespace gfx { 27 namespace gfx {
34 class Rect; 28 class Rect;
35 } 29 }
36 30
37 namespace gpu { 31 namespace gpu {
38 class GpuChannelHost; 32 class GpuChannelHost;
39 } 33 }
40 34
41 namespace ui { 35 namespace ui {
36
42 class CursorLoader; 37 class CursorLoader;
43 class PlatformWindow; 38 class PlatformWindow;
44 struct TextInputState; 39 struct TextInputState;
45 } // namespace ui
46
47 namespace ui {
48
49 class FrameGenerator;
50 40
51 namespace ws { 41 namespace ws {
52 42
53 class EventDispatcher;
54 class PlatformDisplayFactory; 43 class PlatformDisplayFactory;
55 struct PlatformDisplayInitParams; 44 struct PlatformDisplayInitParams;
56 class ServerWindow; 45 class ServerWindow;
57 46
58 // PlatformDisplay is used to connect the root ServerWindow to a display. 47 // PlatformDisplay is used to connect the root ServerWindow to a display.
59 class PlatformDisplay { 48 class PlatformDisplay {
60 public: 49 public:
61 virtual ~PlatformDisplay() {} 50 virtual ~PlatformDisplay() {}
62 51
63 static PlatformDisplay* Create(const PlatformDisplayInitParams& init_params); 52 static std::unique_ptr<PlatformDisplay> Create(
53 const PlatformDisplayInitParams& init_params);
64 54
65 virtual int64_t GetId() const = 0; 55 virtual int64_t GetId() const = 0;
66 56
67 virtual void Init(PlatformDisplayDelegate* delegate) = 0; 57 virtual void Init(PlatformDisplayDelegate* delegate) = 0;
68 58
69 virtual void SetViewportSize(const gfx::Size& size) = 0; 59 virtual void SetViewportSize(const gfx::Size& size) = 0;
70 60
71 virtual void SetTitle(const base::string16& title) = 0; 61 virtual void SetTitle(const base::string16& title) = 0;
72 62
73 virtual void SetCapture() = 0; 63 virtual void SetCapture() = 0;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 std::unique_ptr<ui::PlatformWindow> platform_window_; 158 std::unique_ptr<ui::PlatformWindow> platform_window_;
169 159
170 DISALLOW_COPY_AND_ASSIGN(DefaultPlatformDisplay); 160 DISALLOW_COPY_AND_ASSIGN(DefaultPlatformDisplay);
171 }; 161 };
172 162
173 } // namespace ws 163 } // namespace ws
174 164
175 } // namespace ui 165 } // namespace ui
176 166
177 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ 167 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_
OLDNEW
« no previous file with comments | « services/ui/ws/frame_generator.cc ('k') | services/ui/ws/platform_display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698