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

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: Missed reviewer comments and trybot fixes. 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.
Wez 2012/09/20 21:35:15 This interface has no concept of disconnection; do
Jamie 2012/09/20 22:59:59 No, I meant disconnection. I was trying to give an
Wez 2012/09/21 00:59:32 As I commented elsewhere, I think you need an expl
Jamie 2012/09/24 22:49:15 I think the method should stay, so that we can tur
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 two things:
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.
Wez 2012/09/20 21:35:15 3. Return no sizes if resize is not supported.
Jamie 2012/09/20 22:59:59 Done.
33 virtual std::list<SkISize> GetSupportedSizes(const SkISize& preferred) = 0;
34
35 // Set the size of the desktop. |size| is guaranteed to be one of the sizes
Wez 2012/09/20 21:35:15 |size| must be one of the sizes previously returne
Jamie 2012/09/20 22:59:59 I'm not sure what you're suggesting here. Are you
Wez 2012/09/21 00:59:32 No, I'm asking that the comment state that the cal
Jamie 2012/09/24 22:49:15 Done.
36 // previously returned by |GetSupportedSizes| or |GetCurrentSize|.
37 virtual void SetSize(const SkISize& size) = 0;
38 };
39
40 } // namespace remoting
41
42 #endif // REMOTING_HOST_DESKTOP_RESIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698