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

Unified Diff: remoting/host/resizing_host_observer.cc

Issue 12678008: Reworked the plumbing required to pass the client resolution to the desktop resizer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback Created 7 years, 9 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 | « remoting/host/resizing_host_observer.h ('k') | remoting/host/resizing_host_observer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/resizing_host_observer.cc
diff --git a/remoting/host/resizing_host_observer.cc b/remoting/host/resizing_host_observer.cc
index 7491eea6f759651f3b1565e048f98e5a0736b733..658a39bd44af68308fb8145a494805e86aedc86c 100644
--- a/remoting/host/resizing_host_observer.cc
+++ b/remoting/host/resizing_host_observer.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "remoting/host/desktop_resizer.h"
+#include "remoting/host/screen_resolution.h"
namespace {
@@ -108,24 +109,22 @@ ResizingHostObserver::~ResizingHostObserver() {
desktop_resizer_->RestoreSize(original_size_);
}
-void ResizingHostObserver::OnClientResolutionChanged(
- const SkIPoint& client_dpi,
- const SkISize& client_size) {
- if (client_size.isEmpty()) {
+void ResizingHostObserver::SetScreenResolution(
+ const ScreenResolution& resolution) {
+ if (resolution.IsEmpty())
return;
- }
// If the implementation returns any sizes, pick the best one according to
// the algorithm described in CandidateSize::IsBetterThen.
std::list<SkISize> sizes =
- desktop_resizer_->GetSupportedSizes(client_size);
+ desktop_resizer_->GetSupportedSizes(resolution.dimensions_);
if (sizes.empty()) {
return;
}
- CandidateSize best_size(sizes.front(), client_size);
+ CandidateSize best_size(sizes.front(), resolution.dimensions_);
for (std::list<SkISize>::const_iterator i = ++sizes.begin();
i != sizes.end(); ++i) {
- CandidateSize candidate_size(*i, client_size);
+ CandidateSize candidate_size(*i, resolution.dimensions_);
if (candidate_size.IsBetterThan(best_size)) {
best_size = candidate_size;
}
« no previous file with comments | « remoting/host/resizing_host_observer.h ('k') | remoting/host/resizing_host_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698