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

Unified Diff: remoting/host/desktop_resizer.h

Issue 47653003: Make DesktopResizer use ScreenResolution to facilitate DPI-awareness. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/desktop_resizer_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_resizer.h
diff --git a/remoting/host/desktop_resizer.h b/remoting/host/desktop_resizer.h
index 22439172c0abd5a13e4afe05a6568afdf56dc7de..945605a13aafd94845a55e837f5053d098d7dcd4 100644
--- a/remoting/host/desktop_resizer.h
+++ b/remoting/host/desktop_resizer.h
@@ -8,6 +8,7 @@
#include <list>
#include "base/memory/scoped_ptr.h"
+#include "remoting/host/screen_resolution.h"
#include "third_party/skia/include/core/SkRect.h"
namespace remoting {
@@ -19,30 +20,31 @@ class DesktopResizer {
// Create a platform-specific DesktopResizer instance.
static scoped_ptr<DesktopResizer> Create();
- // Return the current size of the desktop.
- virtual SkISize GetCurrentSize() = 0;
+ // Return the current resolution of the desktop.
+ virtual ScreenResolution GetCurrentResolution() = 0;
- // Get the list of supported sizes, which should ideally include |preferred|.
- // Implementations will generally do one of the following:
- // 1. Return the list of sizes supported by the underlying video driver,
- // regardless of |preferred|.
+ // Get the list of supported resolutions, which should ideally include
+ // |preferred|. Implementations will generally do one of the following:
+ // 1. Return the list of resolutions 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.
// 3. Return an empty list if resize is not supported.
- virtual std::list<SkISize> GetSupportedSizes(const SkISize& preferred) = 0;
-
- // Set the size of the desktop. |size| must be one of the sizes previously
- // returned by |GetSupportedSizes|. Note that implementations should fail
- // gracefully if the specified size is no longer supported, since monitor
- // configurations may change on the fly.
- virtual void SetSize(const SkISize& size) = 0;
-
- // Restore the original desktop size. The caller must provide the original
- // size of the desktop, as returned by |GetCurrentSize|, as a hint. However,
- // implementaions are free to ignore this. For example, virtual hosts will
- // typically ignore it to avoid unnecessary resize operations.
- virtual void RestoreSize(const SkISize& original) = 0;
+ virtual std::list<ScreenResolution> GetSupportedResolutions(
+ const ScreenResolution& preferred) = 0;
+
+ // Set the resolution of the desktop. |resolution| must be one of the
+ // resolutions previously returned by |GetSupportedResolutions|. Note that
+ // implementations should fail gracefully if the specified resolution is no
+ // longer supported, since monitor configurations may change on the fly.
+ virtual void SetResolution(const ScreenResolution& resolution) = 0;
+
+ // Restore the original desktop resolution. The caller must provide the
+ // original resolution of the desktop, as returned by |GetCurrentResolution|,
+ // as a hint. However, implementaions are free to ignore this. For example,
+ // virtual hosts will typically ignore it to avoid unnecessary resizes.
+ virtual void RestoreResolution(const ScreenResolution& original) = 0;
};
} // namespace remoting
« no previous file with comments | « no previous file | remoting/host/desktop_resizer_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698