Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Unified Diff: ui/aura/single_monitor_manager.cc

Issue 9837046: Revert r128507 "Revert r128436 "relanding: disabled workspace_window_resizer test. fixed access-aft… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/single_monitor_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/single_monitor_manager.cc
diff --git a/ui/aura/single_monitor_manager.cc b/ui/aura/single_monitor_manager.cc
index 2e1d86d6a04ec575b553931fba8a651f3fe8733f..57e68acf4eea3670fe8c0943b3a55ee86704c4ae 100644
--- a/ui/aura/single_monitor_manager.cc
+++ b/ui/aura/single_monitor_manager.cc
@@ -27,19 +27,20 @@ static const int kDefaultHostWindowHeight = 1024;
}
SingleMonitorManager::SingleMonitorManager()
- : root_window_(NULL),
- monitor_(new Monitor()) {
+ : root_window_(NULL) {
Init();
}
SingleMonitorManager::~SingleMonitorManager() {
- if (root_window_)
- root_window_->RemoveObserver(this);
+ // All monitors must have been deleted when monitor manager is deleted.
+ CHECK(!root_window_);
}
-void SingleMonitorManager::OnNativeMonitorResized(const gfx::Size& size) {
+void SingleMonitorManager::OnNativeMonitorsChanged(
+ const std::vector<const Monitor*>& monitors) {
+ DCHECK(monitors.size() > 0);
if (use_fullscreen_host_window()) {
- monitor_->set_size(size);
+ monitor_->set_size(monitors[0]->bounds().size());
NotifyBoundsChanged(monitor_.get());
}
}
« no previous file with comments | « ui/aura/single_monitor_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698