OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 REMOTING_HOST_DESKTOP_RESIZER_H_ | 5 #ifndef REMOTING_HOST_DESKTOP_RESIZER_H_ |
6 #define REMOTING_HOST_DESKTOP_RESIZER_H_ | 6 #define REMOTING_HOST_DESKTOP_RESIZER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
| 9 #include <memory> |
9 | 10 |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "remoting/host/screen_resolution.h" | 11 #include "remoting/host/screen_resolution.h" |
12 | 12 |
13 namespace remoting { | 13 namespace remoting { |
14 | 14 |
15 class DesktopResizer { | 15 class DesktopResizer { |
16 public: | 16 public: |
17 virtual ~DesktopResizer() {} | 17 virtual ~DesktopResizer() {} |
18 | 18 |
19 // Create a platform-specific DesktopResizer instance. | 19 // Create a platform-specific DesktopResizer instance. |
20 static scoped_ptr<DesktopResizer> Create(); | 20 static std::unique_ptr<DesktopResizer> Create(); |
21 | 21 |
22 // Return the current resolution of the desktop. | 22 // Return the current resolution of the desktop. |
23 virtual ScreenResolution GetCurrentResolution() = 0; | 23 virtual ScreenResolution GetCurrentResolution() = 0; |
24 | 24 |
25 // Get the list of supported resolutions, which should ideally include | 25 // Get the list of supported resolutions, which should ideally include |
26 // |preferred|. Implementations will generally do one of the following: | 26 // |preferred|. Implementations will generally do one of the following: |
27 // 1. Return the list of resolutions supported by the underlying video | 27 // 1. Return the list of resolutions supported by the underlying video |
28 // driver, regardless of |preferred|. | 28 // driver, regardless of |preferred|. |
29 // 2. Return a list containing just |preferred|, perhaps after imposing | 29 // 2. Return a list containing just |preferred|, perhaps after imposing |
30 // some minimum size constraint. This will typically be the case if | 30 // some minimum size constraint. This will typically be the case if |
(...skipping 11 matching lines...) Expand all Loading... |
42 // Restore the original desktop resolution. The caller must provide the | 42 // Restore the original desktop resolution. The caller must provide the |
43 // original resolution of the desktop, as returned by |GetCurrentResolution|, | 43 // original resolution of the desktop, as returned by |GetCurrentResolution|, |
44 // as a hint. However, implementaions are free to ignore this. For example, | 44 // as a hint. However, implementaions are free to ignore this. For example, |
45 // virtual hosts will typically ignore it to avoid unnecessary resizes. | 45 // virtual hosts will typically ignore it to avoid unnecessary resizes. |
46 virtual void RestoreResolution(const ScreenResolution& original) = 0; | 46 virtual void RestoreResolution(const ScreenResolution& original) = 0; |
47 }; | 47 }; |
48 | 48 |
49 } // namespace remoting | 49 } // namespace remoting |
50 | 50 |
51 #endif // REMOTING_HOST_DESKTOP_RESIZER_H_ | 51 #endif // REMOTING_HOST_DESKTOP_RESIZER_H_ |
OLD | NEW |