OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef SERVICES_UI_DISPLAY_SCREEN_MANAGER_STUB_INTERNAL_H_ | |
6 #define SERVICES_UI_DISPLAY_SCREEN_MANAGER_STUB_INTERNAL_H_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 #include "base/memory/weak_ptr.h" | |
11 #include "services/ui/display/screen_manager.h" | |
12 #include "services/ui/display/viewport_metrics.h" | |
13 | |
14 namespace display { | |
15 | |
16 // ScreenManagerStubInternal provides the necessary functionality to configure a | |
17 // fixed | |
18 // 1024x768 display for non-ozone platforms. | |
19 class ScreenManagerStubInternal : public ScreenManager { | |
20 public: | |
21 ScreenManagerStubInternal(); | |
22 ~ScreenManagerStubInternal() override; | |
23 | |
24 private: | |
25 // Fake creation of a single 1024x768 display. | |
26 void FixedSizeScreenConfiguration(); | |
27 | |
28 // ScreenManager. | |
29 void AddInterfaces(service_manager::InterfaceRegistry* registry) override; | |
30 void Init(ScreenManagerDelegate* delegate) override; | |
31 void RequestCloseDisplay(int64_t display_id) override; | |
32 int64_t GetPrimaryDisplayId() const override; | |
33 | |
34 // Sample display information. | |
35 int64_t display_id_ = 1; | |
36 ViewportMetrics display_metrics_; | |
37 | |
38 ScreenManagerDelegate* delegate_ = nullptr; | |
39 | |
40 base::WeakPtrFactory<ScreenManagerStubInternal> weak_ptr_factory_; | |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(ScreenManagerStubInternal); | |
43 }; | |
44 | |
45 } // namespace display | |
46 | |
47 #endif // SERVICES_UI_DISPLAY_SCREEN_MANAGER_STUB_INTERNAL_H_ | |
OLD | NEW |