Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: remoting/host/desktop_resizer.h

Issue 10918224: Cross-platform plumbing for resize-to-client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer comments. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_HOST_DESKTOP_RESIZER_H_
6 #define REMOTING_HOST_DESKTOP_RESIZER_H_
7
8 #include <list>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "third_party/skia/include/core/SkRect.h"
12
13 namespace remoting {
14
15 class DesktopResizer {
16 public:
17 virtual ~DesktopResizer() {}
18
19 // Create a platform-specific DesktopResizer instance.
20 static scoped_ptr<DesktopResizer> Create();
21
22 // Return the current size of the desktop. This size will be restored upon
23 // disconnection.
24 virtual SkISize GetCurrentSize() = 0;
25
26 // Get the list of supported sizes, which should ideally include |preferred|.
27 // Implementations will generally do one of the following:
28 // 1. Return the list of sizes supported by the underlying video driver,
29 // regardless of |preferred|.
30 // 2. Return a list containing just |preferred|, perhaps after imposing
31 // some minimum size constraint. This will typically be the case if
32 // there are no constraints imposed by the underlying video driver.
33 // 3. Return an empty list if resize is not supported.
34 virtual std::list<SkISize> GetSupportedSizes(const SkISize& preferred) = 0;
35
36 // Set the size of the desktop. |size| is guaranteed to be one of the sizes
37 // previously returned by |GetSupportedSizes| or |GetCurrentSize|.
38 virtual void SetSize(const SkISize& size) = 0;
39 };
40
41 } // namespace remoting
42
43 #endif // REMOTING_HOST_DESKTOP_RESIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698