Commit 31eac833 authored by oshima's avatar oshima Committed by Commit bot

This API wasn't working on non chromeos platforms because

it wasn't observing the display change.

BUG=316217
TEST=install the test app attached in the bug and change the scree resolution.

Review URL: https://codereview.chromium.org/581023003

Cr-Commit-Position: refs/heads/master@{#295733}
parent d7dd48b1
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include "chrome/browser/extensions/display_info_provider_aura.h" #include "chrome/browser/extensions/display_info_provider_aura.h"
#include "ui/gfx/screen.h"
namespace extensions { namespace extensions {
DisplayInfoProviderAura::DisplayInfoProviderAura() { DisplayInfoProviderAura::DisplayInfoProviderAura() {
...@@ -27,7 +29,7 @@ void DisplayInfoProviderAura::UpdateDisplayUnitInfoForPlatform( ...@@ -27,7 +29,7 @@ void DisplayInfoProviderAura::UpdateDisplayUnitInfoForPlatform(
} }
gfx::Screen* DisplayInfoProviderAura::GetActiveScreen() { gfx::Screen* DisplayInfoProviderAura::GetActiveScreen() {
return NULL; return gfx::Screen::GetNativeScreen();
} }
// static // static
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include "chrome/browser/extensions/display_info_provider_mac.h" #include "chrome/browser/extensions/display_info_provider_mac.h"
#include "ui/gfx/screen.h"
namespace extensions { namespace extensions {
DisplayInfoProviderMac::DisplayInfoProviderMac() { DisplayInfoProviderMac::DisplayInfoProviderMac() {
...@@ -27,7 +29,7 @@ void DisplayInfoProviderMac::UpdateDisplayUnitInfoForPlatform( ...@@ -27,7 +29,7 @@ void DisplayInfoProviderMac::UpdateDisplayUnitInfoForPlatform(
} }
gfx::Screen* DisplayInfoProviderMac::GetActiveScreen() { gfx::Screen* DisplayInfoProviderMac::GetActiveScreen() {
return NULL; return gfx::Screen::GetNativeScreen();
} }
// static // static
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/win/win_util.h" #include "base/win/win_util.h"
#include "extensions/common/api/system_display.h" #include "extensions/common/api/system_display.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/size.h" #include "ui/gfx/size.h"
#include "ui/gfx/win/dpi.h" #include "ui/gfx/win/dpi.h"
...@@ -81,7 +82,8 @@ void DisplayInfoProviderWin::UpdateDisplayUnitInfoForPlatform( ...@@ -81,7 +82,8 @@ void DisplayInfoProviderWin::UpdateDisplayUnitInfoForPlatform(
} }
gfx::Screen* DisplayInfoProviderWin::GetActiveScreen() { gfx::Screen* DisplayInfoProviderWin::GetActiveScreen() {
return NULL; // TODO(scottmg): native screen is wrong http://crbug.com/133312
return gfx::Screen::GetNativeScreen();
} }
// static // static
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment