diff options
author | scottmg <scottmg@chromium.org> | 2016-01-26 21:07:35 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-27 05:08:46 +0000 |
commit | e8b0429751298d4bff935658ad0501597bedfb54 (patch) | |
tree | 2fc8223b144eb8183f9b248b40cb13fa07f808f6 /extensions/browser/api | |
parent | fc512ffcf066bf2c50b565bd54019ee0074a542d (diff) | |
download | chromium_src-e8b0429751298d4bff935658ad0501597bedfb54.zip chromium_src-e8b0429751298d4bff935658ad0501597bedfb54.tar.gz chromium_src-e8b0429751298d4bff935658ad0501597bedfb54.tar.bz2 |
Remove now-unnecessary wrappers around gfx::Screen::GetScreen()
- ash::Shell::GetScreen()
- DisplayInfoProvider::GetActiveScreen()
Followup to https://codereview.chromium.org/1608733002/.
R=oshima@chromium.org, sky@chromium.org
BUG=558054
Review URL: https://codereview.chromium.org/1608053002
Cr-Commit-Position: refs/heads/master@{#371733}
Diffstat (limited to 'extensions/browser/api')
3 files changed, 2 insertions, 10 deletions
diff --git a/extensions/browser/api/system_display/display_info_provider.h b/extensions/browser/api/system_display/display_info_provider.h index e2fee24..1501e37 100644 --- a/extensions/browser/api/system_display/display_info_provider.h +++ b/extensions/browser/api/system_display/display_info_provider.h @@ -15,7 +15,6 @@ namespace gfx { class Display; -class Screen; } namespace extensions { @@ -49,10 +48,6 @@ class DisplayInfoProvider { const api::system_display::DisplayProperties& info, std::string* error) = 0; - // Get the screen that is always active, which will be used for monitoring - // display changes events. - virtual gfx::Screen* GetActiveScreen() = 0; - // Enable the unified desktop feature. virtual void EnableUnifiedDesktop(bool enable); diff --git a/extensions/browser/api/system_display/system_display_apitest.cc b/extensions/browser/api/system_display/system_display_apitest.cc index cdcb519..2c0548e 100644 --- a/extensions/browser/api/system_display/system_display_apitest.cc +++ b/extensions/browser/api/system_display/system_display_apitest.cc @@ -88,8 +88,6 @@ class MockDisplayInfoProvider : public DisplayInfoProvider { return true; } - gfx::Screen* GetActiveScreen() override { return NULL; } - void EnableUnifiedDesktop(bool enable) override { unified_desktop_enabled_ = enable; } diff --git a/extensions/browser/api/system_info/system_info_api.cc b/extensions/browser/api/system_info/system_info_api.cc index 74181ca..42679d6 100644 --- a/extensions/browser/api/system_info/system_info_api.cc +++ b/extensions/browser/api/system_info/system_info_api.cc @@ -20,7 +20,6 @@ #include "components/storage_monitor/storage_info.h" #include "components/storage_monitor/storage_monitor.h" #include "content/public/browser/browser_thread.h" -#include "extensions/browser/api/system_display/display_info_provider.h" #include "extensions/browser/api/system_storage/storage_info_provider.h" #include "extensions/browser/extensions_browser_client.h" #include "extensions/common/api/system_display.h" @@ -120,7 +119,7 @@ void SystemInfoEventRouter::AddEventListener(const std::string& event_name) { return; if (IsDisplayChangedEvent(event_name)) { - gfx::Screen* screen = DisplayInfoProvider::Get()->GetActiveScreen(); + gfx::Screen* screen = gfx::Screen::GetScreen(); if (screen) screen->AddObserver(this); } @@ -146,7 +145,7 @@ void SystemInfoEventRouter::RemoveEventListener(const std::string& event_name) { } if (IsDisplayChangedEvent(event_name)) { - gfx::Screen* screen = DisplayInfoProvider::Get()->GetActiveScreen(); + gfx::Screen* screen = gfx::Screen::GetScreen(); if (screen) screen->RemoveObserver(this); } |