Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_MUS_WS_PLATFORM_SCREEN_H_ | |
| 6 #define COMPONENTS_MUS_WS_PLATFORM_SCREEN_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include "base/callback.h" | |
| 11 | |
| 12 namespace gfx { | |
| 13 class Rect; | |
| 14 } | |
| 15 | |
| 16 namespace mus { | |
| 17 namespace ws { | |
| 18 | |
| 19 // PlatformScreen provides the necessary functionality to configure all | |
| 20 // attached physical displays. | |
| 21 class PlatformScreen { | |
| 22 public: | |
| 23 PlatformScreen(); | |
|
sky
2016/05/04 17:05:44
You shouldn't need to have this.
rjkroege
2016/05/04 22:50:13
Done.
| |
| 24 virtual ~PlatformScreen(); | |
|
sky
2016/05/04 17:05:44
And inline this (we generally inline destructor fo
rjkroege
2016/05/04 22:50:13
Done. Aside: wasn't there a time when destructors
| |
| 25 | |
| 26 // Creates a PlatformScreen instance. | |
| 27 static std::unique_ptr<PlatformScreen> Create(); | |
| 28 | |
| 29 // Initializes platform specific screen resources. | |
| 30 virtual void Init() = 0; | |
| 31 | |
| 32 using ConfiguredDisplayCallback = base::Callback<void(int64_t, gfx::Rect)>; | |
|
sky
2016/05/04 17:05:44
const gfx::Rect&
rjkroege
2016/05/04 22:50:13
Done.
| |
| 33 | |
| 34 // ConfigurePhysicalDisplay() configures a single physical display and returns | |
| 35 // its id and bounds for it via |callback|. | |
| 36 virtual void ConfigurePhysicalDisplay( | |
| 37 const ConfiguredDisplayCallback& callback) = 0; | |
|
sky
2016/05/04 17:05:44
Do you expect this to be called more than once? It
rjkroege
2016/05/04 22:50:13
Eventually yes: split-mus restarting the mus-gpu o
| |
| 38 }; | |
| 39 | |
| 40 } // namespace ws | |
| 41 } // namespace mus | |
| 42 | |
| 43 #endif // COMPONENTS_MUS_WS_PLATFORM_SCREEN_H_ | |
| OLD | NEW |