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

Unified Diff: chrome/browser/speech/speech_recognition_bubble.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some new gfx::Screen additions Created 8 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
Index: chrome/browser/speech/speech_recognition_bubble.cc
diff --git a/chrome/browser/speech/speech_recognition_bubble.cc b/chrome/browser/speech/speech_recognition_bubble.cc
index c768e6455b711ab2459a1f0466c914643dc3c58d..cbe62b3d08937ac868e004e2d51c157c10f41558 100644
--- a/chrome/browser/speech/speech_recognition_bubble.cc
+++ b/chrome/browser/speech/speech_recognition_bubble.cc
@@ -130,8 +130,9 @@ SpeechRecognitionBubbleBase::SpeechRecognitionBubbleBase(
display_mode_(DISPLAY_MODE_RECORDING),
web_contents_(web_contents),
scale_factor_(ui::SCALE_FACTOR_NONE) {
- gfx::Display display = gfx::Screen::GetDisplayNearestWindow(
- web_contents_ ? web_contents_->GetNativeView() : NULL);
+ gfx::NativeView view = web_contents_ ? web_contents_->GetNativeView() : NULL;
+ gfx::Screen* screen = gfx::Screen::GetScreenFor(view);
+ gfx::Display display = screen->GetDisplayNearestWindow(view);
scale_factor_ = ui::GetScaleFactorFromScale(
display.device_scale_factor());

Powered by Google App Engine
This is Rietveld 408576698