summaryrefslogtreecommitdiffstats
path: root/extensions/browser/api
diff options
context:
space:
mode:
authorscottmg <scottmg@chromium.org>2016-01-26 17:30:36 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-27 01:31:58 +0000
commitfb33c340bd50b0e8a5c874e5d7c10a6361cee126 (patch)
treebb7a28d9d333accda14d8cbce5d9c6e7b4f51698 /extensions/browser/api
parentbfe14dd182c7c660eb27265dfeec462768af2422 (diff)
downloadchromium_src-fb33c340bd50b0e8a5c874e5d7c10a6361cee126.zip
chromium_src-fb33c340bd50b0e8a5c874e5d7c10a6361cee126.tar.gz
chromium_src-fb33c340bd50b0e8a5c874e5d7c10a6361cee126.tar.bz2
Remove ui/gfx/screen_type_delegate.h
This removes gfx::SCREEN_TYPE_NATIVE/SCREEN_TYPE_ALTERNATE, and there is now only one Screen instance. It's still a runtime-installed thing for test purposes. TBR=various owners for trivial changes R=oshima@chromium.org, sky@chromium.org BUG=558054 Review URL: https://codereview.chromium.org/1608733002 Cr-Commit-Position: refs/heads/master@{#371676}
Diffstat (limited to 'extensions/browser/api')
-rw-r--r--extensions/browser/api/capture_web_contents_function.cc2
-rw-r--r--extensions/browser/api/system_display/display_info_provider.cc3
-rw-r--r--extensions/browser/api/system_display/system_display_apitest.cc5
3 files changed, 4 insertions, 6 deletions
diff --git a/extensions/browser/api/capture_web_contents_function.cc b/extensions/browser/api/capture_web_contents_function.cc
index e10842d..77c8a3e 100644
--- a/extensions/browser/api/capture_web_contents_function.cc
+++ b/extensions/browser/api/capture_web_contents_function.cc
@@ -78,7 +78,7 @@ bool CaptureWebContentsFunction::RunAsync() {
const gfx::Size view_size = view->GetViewBounds().size();
gfx::Size bitmap_size = view_size;
const gfx::NativeView native_view = view->GetNativeView();
- gfx::Screen* const screen = gfx::Screen::GetScreenFor(native_view);
+ gfx::Screen* const screen = gfx::Screen::GetScreen();
const float scale =
screen->GetDisplayNearestWindow(native_view).device_scale_factor();
if (scale > 1.0f)
diff --git a/extensions/browser/api/system_display/display_info_provider.cc b/extensions/browser/api/system_display/display_info_provider.cc
index b49949b..df7b26a 100644
--- a/extensions/browser/api/system_display/display_info_provider.cc
+++ b/extensions/browser/api/system_display/display_info_provider.cc
@@ -77,8 +77,7 @@ DisplayInfoProvider::CreateDisplayUnitInfo(const gfx::Display& display,
void DisplayInfoProvider::EnableUnifiedDesktop(bool enable) {}
DisplayInfo DisplayInfoProvider::GetAllDisplaysInfo() {
- // TODO(scottmg): Native is wrong http://crbug.com/133312
- gfx::Screen* screen = gfx::Screen::GetNativeScreen();
+ gfx::Screen* screen = gfx::Screen::GetScreen();
int64_t primary_id = screen->GetPrimaryDisplay().id();
std::vector<gfx::Display> displays = screen->GetAllDisplays();
DisplayInfo all_displays;
diff --git a/extensions/browser/api/system_display/system_display_apitest.cc b/extensions/browser/api/system_display/system_display_apitest.cc
index 1f3974e..cdcb519 100644
--- a/extensions/browser/api/system_display/system_display_apitest.cc
+++ b/extensions/browser/api/system_display/system_display_apitest.cc
@@ -142,9 +142,8 @@ class SystemDisplayApiTest : public ShellApiTest {
void SetUpOnMainThread() override {
ShellApiTest::SetUpOnMainThread();
- ANNOTATE_LEAKING_OBJECT_PTR(
- gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE));
- gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
+ ANNOTATE_LEAKING_OBJECT_PTR(gfx::Screen::GetScreen());
+ gfx::Screen::SetScreenInstance(screen_.get());
DisplayInfoProvider::InitializeForTesting(provider_.get());
}