| 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_H_ | 5 #ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_H_ |
| 6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_H_ | 6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // Creates a singleton PlatformScreen instance. | 26 // Creates a singleton PlatformScreen instance. |
| 27 static std::unique_ptr<PlatformScreen> Create(); | 27 static std::unique_ptr<PlatformScreen> Create(); |
| 28 static PlatformScreen* GetInstance(); | 28 static PlatformScreen* GetInstance(); |
| 29 | 29 |
| 30 // Registers Mojo interfaces provided. | 30 // Registers Mojo interfaces provided. |
| 31 virtual void AddInterfaces(service_manager::InterfaceRegistry* registry) = 0; | 31 virtual void AddInterfaces(service_manager::InterfaceRegistry* registry) = 0; |
| 32 | 32 |
| 33 // Triggers initial display configuration to start. On device this will | 33 // Triggers initial display configuration to start. On device this will |
| 34 // configuration the connected displays. Off device this will create one or | 34 // configuration the connected displays. Off device this will create one or |
| 35 // more fake displays and pretend to configure them. A non-null |delegate| | 35 // more fake displays and pretend to configure them. In external window mode, |
| 36 // must be provided that will receive notifications when displays are added, | 36 // no initial display will be created. A non-null |delegate| must be provided |
| 37 // removed or modified. | 37 // that will receive notifications when displays are added, removed or |
| 38 virtual void Init(PlatformScreenDelegate* delegate) = 0; | 38 // modified. |
| 39 virtual void Init(PlatformScreenDelegate* delegate, |
| 40 bool external_window_mode) = 0; |
| 39 | 41 |
| 40 // Handle requests from the platform to close a display. | 42 // Handle requests from the platform to close a display. |
| 41 virtual void RequestCloseDisplay(int64_t display_id) = 0; | 43 virtual void RequestCloseDisplay(int64_t display_id) = 0; |
| 42 | 44 |
| 43 virtual int64_t GetPrimaryDisplayId() const = 0; | 45 virtual int64_t GetPrimaryDisplayId() const = 0; |
| 44 | 46 |
| 45 private: | 47 private: |
| 46 static PlatformScreen* instance_; // Instance is not owned. | 48 static PlatformScreen* instance_; // Instance is not owned. |
| 47 | 49 |
| 48 DISALLOW_COPY_AND_ASSIGN(PlatformScreen); | 50 DISALLOW_COPY_AND_ASSIGN(PlatformScreen); |
| 49 }; | 51 }; |
| 50 | 52 |
| 51 } // namespace display | 53 } // namespace display |
| 52 | 54 |
| 53 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_H_ | 55 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_H_ |
| OLD | NEW |