| 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_PLATFORM_SCREEN_IMPL_H_ | 5 #ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_H_ |
| 6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_H_ | 6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/weak_ptr.h" |
| 11 #include "services/ui/display/platform_screen.h" | 12 #include "services/ui/display/platform_screen.h" |
| 12 | 13 |
| 13 namespace display { | 14 namespace display { |
| 14 | 15 |
| 15 // PlatformScreenImpl provides the necessary functionality to configure all | 16 // PlatformScreenImpl provides the necessary functionality to configure all |
| 16 // attached physical displays on non-ozone platforms. | 17 // attached physical displays on non-ozone platforms. |
| 17 class PlatformScreenImpl : public PlatformScreen { | 18 class PlatformScreenImpl : public PlatformScreen { |
| 18 public: | 19 public: |
| 19 PlatformScreenImpl(); | 20 PlatformScreenImpl(); |
| 20 ~PlatformScreenImpl() override; | 21 ~PlatformScreenImpl() override; |
| 21 | 22 |
| 22 private: | 23 private: |
| 24 // Fake creation of a single 1024x768 display. |
| 25 void FixedSizeScreenConfiguration(); |
| 26 |
| 23 // PlatformScreen. | 27 // PlatformScreen. |
| 24 void Init() override; | 28 void Init(PlatformScreenDelegate* delegate) override; |
| 25 void ConfigurePhysicalDisplay( | |
| 26 const PlatformScreen::ConfiguredDisplayCallback& callback) override; | |
| 27 int64_t GetPrimaryDisplayId() const override; | 29 int64_t GetPrimaryDisplayId() const override; |
| 28 | 30 |
| 31 PlatformScreenDelegate* delegate_ = nullptr; |
| 32 |
| 33 base::WeakPtrFactory<PlatformScreenImpl> weak_ptr_factory_; |
| 34 |
| 29 DISALLOW_COPY_AND_ASSIGN(PlatformScreenImpl); | 35 DISALLOW_COPY_AND_ASSIGN(PlatformScreenImpl); |
| 30 }; | 36 }; |
| 31 | 37 |
| 32 } // namespace display | 38 } // namespace display |
| 33 | 39 |
| 34 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_H_ | 40 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_H_ |
| OLD | NEW |