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