| 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_INTERNAL_H_ | 5 #ifndef SERVICES_UI_DISPLAY_SCREEN_MANAGER_STUB_INTERNAL_H_ |
| 6 #define SERVICES_UI_DISPLAY_SCREEN_MANAGER_STUB_INTERNAL_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 "ui/display/display.h" | 12 #include "ui/display/display.h" |
| 13 | 13 |
| 14 namespace display { | 14 namespace display { |
| 15 | 15 |
| 16 class ScreenBase; |
| 17 |
| 16 // ScreenManagerStubInternal provides the necessary functionality to configure a | 18 // ScreenManagerStubInternal provides the necessary functionality to configure a |
| 17 // fixed 1024x768 display for non-ozone platforms. | 19 // fixed 1024x768 display for non-ozone platforms. |
| 18 class ScreenManagerStubInternal : public ScreenManager { | 20 class ScreenManagerStubInternal : public ScreenManager { |
| 19 public: | 21 public: |
| 20 ScreenManagerStubInternal(); | 22 ScreenManagerStubInternal(); |
| 21 ~ScreenManagerStubInternal() override; | 23 ~ScreenManagerStubInternal() override; |
| 22 | 24 |
| 23 private: | 25 private: |
| 24 // Fake creation of a single 1024x768 display. | 26 // Fake creation of a single 1024x768 display. |
| 25 void FixedSizeScreenConfiguration(); | 27 void FixedSizeScreenConfiguration(); |
| 26 | 28 |
| 27 // ScreenManager. | 29 // ScreenManager. |
| 28 void AddInterfaces(service_manager::BinderRegistry* registry) override; | 30 void AddInterfaces(service_manager::BinderRegistry* registry) override; |
| 29 void Init(ScreenManagerDelegate* delegate) override; | 31 void Init(ScreenManagerDelegate* delegate) override; |
| 30 void RequestCloseDisplay(int64_t display_id) override; | 32 void RequestCloseDisplay(int64_t display_id) override; |
| 33 display::ScreenBase* GetScreen() override; |
| 31 | 34 |
| 32 // Sample display information. | 35 // Sample display information. |
| 33 Display display_; | 36 Display display_; |
| 34 | 37 |
| 35 ScreenManagerDelegate* delegate_ = nullptr; | 38 ScreenManagerDelegate* delegate_ = nullptr; |
| 36 | 39 |
| 40 std::unique_ptr<ScreenBase> screen_; |
| 41 |
| 37 base::WeakPtrFactory<ScreenManagerStubInternal> weak_ptr_factory_; | 42 base::WeakPtrFactory<ScreenManagerStubInternal> weak_ptr_factory_; |
| 38 | 43 |
| 39 DISALLOW_COPY_AND_ASSIGN(ScreenManagerStubInternal); | 44 DISALLOW_COPY_AND_ASSIGN(ScreenManagerStubInternal); |
| 40 }; | 45 }; |
| 41 | 46 |
| 42 } // namespace display | 47 } // namespace display |
| 43 | 48 |
| 44 #endif // SERVICES_UI_DISPLAY_SCREEN_MANAGER_STUB_INTERNAL_H_ | 49 #endif // SERVICES_UI_DISPLAY_SCREEN_MANAGER_STUB_INTERNAL_H_ |
| OLD | NEW |