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

Unified Diff: ui/display/fake_display_delegate.cc

Issue 2356913002: Pass device scale factor from display to ws. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« ui/base/resource/resource_bundle.cc ('K') | « ui/base/resource/resource_bundle.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/fake_display_delegate.cc
diff --git a/ui/display/fake_display_delegate.cc b/ui/display/fake_display_delegate.cc
index 8f02397c2c9efb9885ca16622b83e5b12371edca..d88556f2e0fcb8fcdb2f3553d72219bb3e9f750e 100644
--- a/ui/display/fake_display_delegate.cc
+++ b/ui/display/fake_display_delegate.cc
@@ -134,7 +134,20 @@ void FakeDisplayDelegate::Configure(const ui::DisplaySnapshot& output,
const ui::DisplayMode* mode,
const gfx::Point& origin,
const ui::ConfigureCallback& callback) {
- callback.Run(true);
+ DVLOG(1) << "Configure display id=" << output.display_id()
+ << " with mode=" << (mode ? mode->ToString() : "nullptr")
+ << " and origin=" << origin.ToString();
+
+ for (auto& display : displays_) {
+ if (display->display_id() == output.display_id()) {
+ display->set_current_mode(mode);
+ display->set_origin(origin);
+ callback.Run(true);
+ return;
+ }
+ }
+
+ callback.Run(false);
}
void FakeDisplayDelegate::CreateFrameBuffer(const gfx::Size& size) {}
« ui/base/resource/resource_bundle.cc ('K') | « ui/base/resource/resource_bundle.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698