Chromium Code Reviews| Index: remoting/host/desktop_resizer.h |
| diff --git a/remoting/host/desktop_resizer.h b/remoting/host/desktop_resizer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..14a288b98c5b31fdf1c75901cd5a1096c851cb85 |
| --- /dev/null |
| +++ b/remoting/host/desktop_resizer.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef REMOTING_HOST_DESKTOP_RESIZER_H_ |
| +#define REMOTING_HOST_DESKTOP_RESIZER_H_ |
| + |
| +#include <list> |
| + |
| +#include "base/memory/scoped_ptr.h" |
| +#include "third_party/skia/include/core/SkRect.h" |
| + |
| +namespace remoting { |
| + |
| +class DesktopResizer { |
| + public: |
| + virtual ~DesktopResizer() {} |
| + |
| + // Create a platform-specific DesktopResizer instance. |
| + static scoped_ptr<DesktopResizer> Create(); |
| + |
| + // Return the current size of the desktop. This size will be restored upon |
| + // 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
|
| + virtual SkISize GetCurrentSize() = 0; |
| + |
| + // Get the list of supported sizes, which should ideally include |preferred|. |
| + // Implementations will generally do one of two things: |
| + // 1. Return the list of sizes supported by the underlying video driver, |
| + // regardless of |preferred|. |
| + // 2. Return a list containing just |preferred|, perhaps after imposing |
| + // some minimum size constraint. This will typically be the case if |
| + // 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.
|
| + virtual std::list<SkISize> GetSupportedSizes(const SkISize& preferred) = 0; |
| + |
| + // 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.
|
| + // previously returned by |GetSupportedSizes| or |GetCurrentSize|. |
| + virtual void SetSize(const SkISize& size) = 0; |
| +}; |
| + |
| +} // namespace remoting |
| + |
| +#endif // REMOTING_HOST_DESKTOP_RESIZER_H_ |