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

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 new addition 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());
« no previous file with comments | « chrome/browser/notifications/balloon_collection_impl.cc ('k') | chrome/browser/thumbnails/thumbnail_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698