| Index: ui/aura/single_monitor_manager.cc
|
| diff --git a/ui/aura/single_monitor_manager.cc b/ui/aura/single_monitor_manager.cc
|
| index 443b93976ed21f33e57a6a9733ac4ed1a7bedad8..12c484fde93e14fefc4b229b29b6cb7cb57eb3af 100644
|
| --- a/ui/aura/single_monitor_manager.cc
|
| +++ b/ui/aura/single_monitor_manager.cc
|
| @@ -10,7 +10,7 @@
|
| #include "ui/aura/aura_switches.h"
|
| #include "ui/aura/root_window.h"
|
| #include "ui/aura/root_window_host.h"
|
| -#include "ui/gfx/monitor.h"
|
| +#include "ui/gfx/display.h"
|
| #include "ui/gfx/rect.h"
|
|
|
| namespace aura {
|
| @@ -19,11 +19,11 @@ using std::string;
|
|
|
| namespace {
|
| // Default bounds for the primary monitor.
|
| -static const int kDefaultHostWindowX = 200;
|
| -static const int kDefaultHostWindowY = 200;
|
| -static const int kDefaultHostWindowWidth = 1280;
|
| -static const int kDefaultHostWindowHeight = 1024;
|
| -}
|
| +const int kDefaultHostWindowX = 200;
|
| +const int kDefaultHostWindowY = 200;
|
| +const int kDefaultHostWindowWidth = 1280;
|
| +const int kDefaultHostWindowHeight = 1024;
|
| +} // namespace
|
|
|
| SingleMonitorManager::SingleMonitorManager()
|
| : root_window_(NULL) {
|
| @@ -36,47 +36,47 @@ SingleMonitorManager::~SingleMonitorManager() {
|
| }
|
|
|
| void SingleMonitorManager::OnNativeMonitorsChanged(
|
| - const std::vector<gfx::Monitor>& monitors) {
|
| - DCHECK(monitors.size() > 0);
|
| + const std::vector<gfx::Display>& displays) {
|
| + DCHECK(displays.size() > 0);
|
| if (use_fullscreen_host_window()) {
|
| - monitor_.SetSize(monitors[0].bounds().size());
|
| - NotifyBoundsChanged(monitor_);
|
| + display_.SetSize(displays[0].bounds().size());
|
| + NotifyBoundsChanged(display_);
|
| }
|
| }
|
|
|
| RootWindow* SingleMonitorManager::CreateRootWindowForMonitor(
|
| - const gfx::Monitor& monitor) {
|
| + const gfx::Display& display) {
|
| DCHECK(!root_window_);
|
| - DCHECK_EQ(monitor_.id(), monitor.id());
|
| - root_window_ = new RootWindow(monitor.bounds());
|
| + DCHECK_EQ(display_.id(), display.id());
|
| + root_window_ = new RootWindow(display.bounds());
|
| root_window_->AddObserver(this);
|
| root_window_->Init();
|
| return root_window_;
|
| }
|
|
|
| -const gfx::Monitor& SingleMonitorManager::GetMonitorAt(size_t index) {
|
| - return monitor_;
|
| +const gfx::Display& SingleMonitorManager::GetMonitorAt(size_t index) {
|
| + return display_;
|
| }
|
|
|
| size_t SingleMonitorManager::GetNumMonitors() const {
|
| return 1;
|
| }
|
|
|
| -const gfx::Monitor& SingleMonitorManager::GetMonitorNearestWindow(
|
| +const gfx::Display& SingleMonitorManager::GetMonitorNearestWindow(
|
| const Window* window) const {
|
| - return monitor_;
|
| + return display_;
|
| }
|
|
|
| -const gfx::Monitor& SingleMonitorManager::GetMonitorNearestPoint(
|
| +const gfx::Display& SingleMonitorManager::GetMonitorNearestPoint(
|
| const gfx::Point& point) const {
|
| - return monitor_;
|
| + return display_;
|
| }
|
|
|
| void SingleMonitorManager::OnWindowBoundsChanged(
|
| Window* window, const gfx::Rect& old_bounds, const gfx::Rect& new_bounds) {
|
| if (!use_fullscreen_host_window()) {
|
| Update(new_bounds.size());
|
| - NotifyBoundsChanged(monitor_);
|
| + NotifyBoundsChanged(display_);
|
| }
|
| }
|
|
|
| @@ -88,11 +88,11 @@ void SingleMonitorManager::OnWindowDestroying(Window* window) {
|
| void SingleMonitorManager::Init() {
|
| const string size_str = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
| switches::kAuraHostWindowSize);
|
| - monitor_ = CreateMonitorFromSpec(size_str);
|
| + display_ = CreateMonitorFromSpec(size_str);
|
| }
|
|
|
| void SingleMonitorManager::Update(const gfx::Size size) {
|
| - monitor_.SetSize(size);
|
| + display_.SetSize(size);
|
| }
|
|
|
| } // namespace aura
|
|
|