summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ash/display/display_info.cc3
-rw-r--r--ui/aura/bench/bench_main.cc12
-rw-r--r--ui/aura/remote_window_tree_host_win.cc3
-rw-r--r--ui/aura/test/test_screen.cc5
-rw-r--r--ui/aura/test/test_screen.h2
-rw-r--r--ui/aura/window_tree_host.h4
-rw-r--r--ui/aura/window_tree_host_mac.mm6
-rw-r--r--ui/aura/window_tree_host_ozone.cc6
-rw-r--r--ui/aura/window_tree_host_win.cc6
-rw-r--r--ui/aura/window_tree_host_x11.cc6
10 files changed, 15 insertions, 38 deletions
diff --git a/ash/display/display_info.cc b/ash/display/display_info.cc
index 2d18271..54380aa 100644
--- a/ash/display/display_info.cc
+++ b/ash/display/display_info.cc
@@ -114,7 +114,8 @@ DisplayInfo DisplayInfo::CreateFromSpec(const std::string& spec) {
DisplayInfo DisplayInfo::CreateFromSpecWithID(const std::string& spec,
int64 id) {
#if defined(OS_WIN)
- gfx::Rect bounds_in_native(aura::WindowTreeHost::GetNativeScreenSize());
+ gfx::Rect bounds_in_native(
+ gfx::Size(GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)));
#else
// Default bounds for a display.
const int kDefaultHostWindowX = 200;
diff --git a/ui/aura/bench/bench_main.cc b/ui/aura/bench/bench_main.cc
index 6b6bef6..ce85572 100644
--- a/ui/aura/bench/bench_main.cc
+++ b/ui/aura/bench/bench_main.cc
@@ -150,6 +150,16 @@ void ReturnMailbox(scoped_refptr<cc::ContextProvider> context_provider,
gl->ShallowFlushCHROMIUM();
}
+gfx::Size GetFullscreenSize() {
+#if defined(OS_WIN)
+ return gfx::Size(GetSystemMetrics(SM_CXSCREEN),
+ GetSystemMetrics(SM_CYSCREEN));
+#else
+ NOTIMPLEMENTED();
+ return gfx::Size(1024, 768);
+#endif
+}
+
// A benchmark that adds a texture layer that is updated every frame.
class WebGLBench : public BenchCompositorObserver {
public:
@@ -312,7 +322,7 @@ int main(int argc, char** argv) {
aura::Env::CreateInstance(true);
aura::Env::GetInstance()->set_context_factory(context_factory.get());
scoped_ptr<aura::TestScreen> test_screen(
- aura::TestScreen::CreateFullscreen());
+ aura::TestScreen::Create(GetFullscreenSize()));
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get());
scoped_ptr<aura::WindowTreeHost> host(
test_screen->CreateHostForPrimaryDisplay());
diff --git a/ui/aura/remote_window_tree_host_win.cc b/ui/aura/remote_window_tree_host_win.cc
index 681c3ce..6c43c99 100644
--- a/ui/aura/remote_window_tree_host_win.cc
+++ b/ui/aura/remote_window_tree_host_win.cc
@@ -94,7 +94,8 @@ RemoteWindowTreeHostWin::RemoteWindowTreeHostWin()
host_(NULL),
ignore_mouse_moves_until_set_cursor_ack_(0),
event_flags_(0),
- window_size_(aura::WindowTreeHost::GetNativeScreenSize()) {
+ window_size_(GetSystemMetrics(SM_CXSCREEN),
+ GetSystemMetrics(SM_CYSCREEN)) {
CHECK(!g_instance);
g_instance = this;
prop_.reset(new ui::ViewProp(NULL, kWindowTreeHostWinKey, this));
diff --git a/ui/aura/test/test_screen.cc b/ui/aura/test/test_screen.cc
index 1320b1c..bc5ceef 100644
--- a/ui/aura/test/test_screen.cc
+++ b/ui/aura/test/test_screen.cc
@@ -34,11 +34,6 @@ TestScreen* TestScreen::Create(const gfx::Size& size) {
return new TestScreen(gfx::Rect(size.IsEmpty() ? kDefaultSize : size));
}
-// static
-TestScreen* TestScreen::CreateFullscreen() {
- return new TestScreen(gfx::Rect(WindowTreeHost::GetNativeScreenSize()));
-}
-
TestScreen::~TestScreen() {
}
diff --git a/ui/aura/test/test_screen.h b/ui/aura/test/test_screen.h
index f137cd8..dd3662a 100644
--- a/ui/aura/test/test_screen.h
+++ b/ui/aura/test/test_screen.h
@@ -28,8 +28,6 @@ class TestScreen : public gfx::Screen,
// Creates a gfx::Screen of the specified size. If no size is specified, then
// creates a 800x600 screen. |size| is in physical pixels.
static TestScreen* Create(const gfx::Size& size);
- // Creates a TestScreen that uses fullscreen for the display.
- static TestScreen* CreateFullscreen();
~TestScreen() override;
WindowTreeHost* CreateHostForPrimaryDisplay();
diff --git a/ui/aura/window_tree_host.h b/ui/aura/window_tree_host.h
index 908d924..1571969 100644
--- a/ui/aura/window_tree_host.h
+++ b/ui/aura/window_tree_host.h
@@ -82,10 +82,6 @@ class AURA_EXPORT WindowTreeHost : public ui::internal::InputMethodDelegate,
// transform and insets.
virtual void UpdateRootWindowSize(const gfx::Size& host_size);
- // Returns the actual size of the screen.
- // (gfx::Screen only reports on the virtual desktop exposed by Aura.)
- static gfx::Size GetNativeScreenSize();
-
// Converts |point| from the root window's coordinate system to native
// screen's.
void ConvertPointToNativeScreen(gfx::Point* point) const;
diff --git a/ui/aura/window_tree_host_mac.mm b/ui/aura/window_tree_host_mac.mm
index 4734bf0..c6748a6 100644
--- a/ui/aura/window_tree_host_mac.mm
+++ b/ui/aura/window_tree_host_mac.mm
@@ -102,10 +102,4 @@ WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
return new WindowTreeHostMac(bounds);
}
-// static
-gfx::Size WindowTreeHost::GetNativeScreenSize() {
- NOTIMPLEMENTED();
- return gfx::Size(1024, 768);
-}
-
} // namespace aura
diff --git a/ui/aura/window_tree_host_ozone.cc b/ui/aura/window_tree_host_ozone.cc
index 90212e2..87e3368 100644
--- a/ui/aura/window_tree_host_ozone.cc
+++ b/ui/aura/window_tree_host_ozone.cc
@@ -116,10 +116,4 @@ WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
return new WindowTreeHostOzone(bounds);
}
-// static
-gfx::Size WindowTreeHost::GetNativeScreenSize() {
- NOTIMPLEMENTED();
- return gfx::Size();
-}
-
} // namespace aura
diff --git a/ui/aura/window_tree_host_win.cc b/ui/aura/window_tree_host_win.cc
index 0727401..ea7bf24 100644
--- a/ui/aura/window_tree_host_win.cc
+++ b/ui/aura/window_tree_host_win.cc
@@ -31,12 +31,6 @@ WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
return new WindowTreeHostWin(bounds);
}
-// static
-gfx::Size WindowTreeHost::GetNativeScreenSize() {
- return gfx::Size(GetSystemMetrics(SM_CXSCREEN),
- GetSystemMetrics(SM_CYSCREEN));
-}
-
WindowTreeHostWin::WindowTreeHostWin(const gfx::Rect& bounds)
: has_capture_(false),
widget_(gfx::kNullAcceleratedWidget),
diff --git a/ui/aura/window_tree_host_x11.cc b/ui/aura/window_tree_host_x11.cc
index 084296c..7f2c720 100644
--- a/ui/aura/window_tree_host_x11.cc
+++ b/ui/aura/window_tree_host_x11.cc
@@ -661,12 +661,6 @@ WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
return new WindowTreeHostX11(bounds);
}
-// static
-gfx::Size WindowTreeHost::GetNativeScreenSize() {
- ::XDisplay* xdisplay = gfx::GetXDisplay();
- return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
-}
-
namespace test {
void SetUseOverrideRedirectWindowByDefault(bool override_redirect) {