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

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

Issue 2916823002: Move Mus into chrome's process when running with --mus.
Patch Set: Removing debug include. 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
« no previous file with comments | « services/ui/ws/platform_display.cc ('k') | services/ui/ws/platform_display_default.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_DEFAULT_H_ 5 #ifndef SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_
6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_ 6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "services/ui/display/viewport_metrics.h" 11 #include "services/ui/display/viewport_metrics.h"
12 #include "services/ui/ws/frame_generator.h" 12 #include "services/ui/ws/frame_generator.h"
13 #include "services/ui/ws/platform_display.h" 13 #include "services/ui/ws/platform_display.h"
14 #include "services/ui/ws/platform_display_delegate.h" 14 #include "services/ui/ws/platform_display_delegate.h"
15 #include "services/ui/ws/server_window.h" 15 #include "services/ui/ws/server_window.h"
16 #include "ui/platform_window/platform_window_delegate.h" 16 #include "ui/platform_window/platform_window_delegate.h"
17 17
18 namespace ui { 18 namespace ui {
19 19
20 class EventSink; 20 class EventSink;
21 class ImageCursors;
22 class PlatformWindow; 21 class PlatformWindow;
23 22
24 namespace ws { 23 namespace ws {
25 24
25 class ThreadedImageCursors;
26
26 // PlatformDisplay implementation that connects to a PlatformWindow and 27 // PlatformDisplay implementation that connects to a PlatformWindow and
27 // FrameGenerator for Chrome OS. 28 // FrameGenerator for Chrome OS.
28 class PlatformDisplayDefault : public PlatformDisplay, 29 class PlatformDisplayDefault : public PlatformDisplay,
29 public ui::PlatformWindowDelegate { 30 public ui::PlatformWindowDelegate {
30 public: 31 public:
31 // |image_cursors| may be null, for example on Android or in tests. 32 // |image_cursors| may be null, for example on Android or in tests.
32 PlatformDisplayDefault(ServerWindow* root_window, 33 PlatformDisplayDefault(ServerWindow* root_window,
33 const display::ViewportMetrics& metrics, 34 const display::ViewportMetrics& metrics,
34 std::unique_ptr<ImageCursors> image_cursors); 35 std::unique_ptr<ThreadedImageCursors> image_cursors);
35 ~PlatformDisplayDefault() override; 36 ~PlatformDisplayDefault() override;
36 37
37 // EventSource:: 38 // EventSource::
38 EventSink* GetEventSink() override; 39 EventSink* GetEventSink() override;
39 40
40 // PlatformDisplay: 41 // PlatformDisplay:
41 void Init(PlatformDisplayDelegate* delegate) override; 42 void Init(PlatformDisplayDelegate* delegate) override;
42 void SetViewportSize(const gfx::Size& size) override; 43 void SetViewportSize(const gfx::Size& size) override;
43 void SetTitle(const base::string16& title) override; 44 void SetTitle(const base::string16& title) override;
44 void SetCapture() override; 45 void SetCapture() override;
(...skipping 16 matching lines...) Expand all
61 void OnClosed() override; 62 void OnClosed() override;
62 void OnWindowStateChanged(ui::PlatformWindowState new_state) override; 63 void OnWindowStateChanged(ui::PlatformWindowState new_state) override;
63 void OnLostCapture() override; 64 void OnLostCapture() override;
64 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget, 65 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget,
65 float device_scale_factor) override; 66 float device_scale_factor) override;
66 void OnAcceleratedWidgetDestroyed() override; 67 void OnAcceleratedWidgetDestroyed() override;
67 void OnActivationChanged(bool active) override; 68 void OnActivationChanged(bool active) override;
68 69
69 ServerWindow* root_window_; 70 ServerWindow* root_window_;
70 71
71 std::unique_ptr<ui::ImageCursors> image_cursors_; 72 std::unique_ptr<ThreadedImageCursors> image_cursors_;
72 73
73 PlatformDisplayDelegate* delegate_ = nullptr; 74 PlatformDisplayDelegate* delegate_ = nullptr;
74 std::unique_ptr<FrameGenerator> frame_generator_; 75 std::unique_ptr<FrameGenerator> frame_generator_;
75 76
76 display::ViewportMetrics metrics_; 77 display::ViewportMetrics metrics_;
77 std::unique_ptr<ui::PlatformWindow> platform_window_; 78 std::unique_ptr<ui::PlatformWindow> platform_window_;
78 gfx::AcceleratedWidget widget_; 79 gfx::AcceleratedWidget widget_;
79 80
80 DISALLOW_COPY_AND_ASSIGN(PlatformDisplayDefault); 81 DISALLOW_COPY_AND_ASSIGN(PlatformDisplayDefault);
81 }; 82 };
82 83
83 } // namespace ws 84 } // namespace ws
84 } // namespace ui 85 } // namespace ui
85 86
86 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_ 87 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_
OLDNEW
« no previous file with comments | « services/ui/ws/platform_display.cc ('k') | services/ui/ws/platform_display_default.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698