| // Copyright 2016 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_STUB_H_ |
| #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_STUB_H_ |
| |
| #include <stdint.h> |
| |
| #include "base/callback.h" |
| #include "base/memory/weak_ptr.h" |
| #include "services/ui/display/platform_screen.h" |
| |
| namespace display { |
| |
| // PlatformScreenStub provides the necessary functionality to configure a fixed |
| // 1024x768 display for non-ozone platforms. |
| class PlatformScreenStub : public PlatformScreen { |
| public: |
| PlatformScreenStub(); |
| ~PlatformScreenStub() override; |
| |
| private: |
| // Fake creation of a single 1024x768 display. |
| void FixedSizeScreenConfiguration(); |
| |
| // PlatformScreen. |
| void Init(PlatformScreenDelegate* delegate) override; |
| int64_t GetPrimaryDisplayId() const override; |
| |
| PlatformScreenDelegate* delegate_ = nullptr; |
| |
| base::WeakPtrFactory<PlatformScreenStub> weak_ptr_factory_; |
| |
| DISALLOW_COPY_AND_ASSIGN(PlatformScreenStub); |
| }; |
| |
| } // namespace display |
| |
| #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_STUB_H_ |