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

Side by Side Diff: services/ui/display/platform_screen_stub.h

Issue 2503923003: Demonstrate external-window-mode in mus-demo (Closed)
Patch Set: Wrap comment Created 4 years 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 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_DISPLAY_PLATFORM_SCREEN_STUB_H_ 5 #ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_STUB_H_
6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_STUB_H_ 6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_STUB_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "services/ui/display/platform_screen.h" 11 #include "services/ui/display/platform_screen.h"
12 #include "services/ui/display/viewport_metrics.h" 12 #include "services/ui/display/viewport_metrics.h"
13 13
14 namespace display { 14 namespace display {
15 15
16 // PlatformScreenStub provides the necessary functionality to configure a fixed 16 // PlatformScreenStub provides the necessary functionality to configure a fixed
17 // 1024x768 display for non-ozone platforms. 17 // 1024x768 display for non-ozone platforms.
18 class PlatformScreenStub : public PlatformScreen { 18 class PlatformScreenStub : public PlatformScreen {
19 public: 19 public:
20 PlatformScreenStub(); 20 PlatformScreenStub();
21 ~PlatformScreenStub() override; 21 ~PlatformScreenStub() override;
22 22
23 private: 23 private:
24 // Fake creation of a single 1024x768 display. 24 // Fake creation of a single 1024x768 display.
25 void FixedSizeScreenConfiguration(); 25 void FixedSizeScreenConfiguration();
26 26
27 // PlatformScreen. 27 // PlatformScreen.
28 void AddInterfaces(service_manager::InterfaceRegistry* registry) override; 28 void AddInterfaces(service_manager::InterfaceRegistry* registry) override;
29 void Init(PlatformScreenDelegate* delegate) override; 29 void Init(PlatformScreenDelegate* delegate, WindowMode window_mode) override;
30 void RequestCloseDisplay(int64_t display_id) override; 30 void RequestCloseDisplay(int64_t display_id) override;
31 int64_t GetPrimaryDisplayId() const override; 31 int64_t GetPrimaryDisplayId() const override;
32 32
33 // Sample display information. 33 // Sample display information.
34 int64_t display_id_ = 1; 34 int64_t display_id_ = 1;
35 ViewportMetrics display_metrics_; 35 ViewportMetrics display_metrics_;
36 36
37 PlatformScreenDelegate* delegate_ = nullptr; 37 PlatformScreenDelegate* delegate_ = nullptr;
38 38
39 base::WeakPtrFactory<PlatformScreenStub> weak_ptr_factory_; 39 base::WeakPtrFactory<PlatformScreenStub> weak_ptr_factory_;
40 40
41 DISALLOW_COPY_AND_ASSIGN(PlatformScreenStub); 41 DISALLOW_COPY_AND_ASSIGN(PlatformScreenStub);
42 }; 42 };
43 43
44 } // namespace display 44 } // namespace display
45 45
46 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_STUB_H_ 46 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_STUB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698