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

Side by Side Diff: ash/monitor/multi_monitor_manager.cc

Issue 9808010: Keep the mouse cursor within desktop (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/monitor/multi_monitor_manager.h" 5 #include "ash/monitor/multi_monitor_manager.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 27 matching lines...) Expand all
38 using std::vector; 38 using std::vector;
39 using aura::Monitor; 39 using aura::Monitor;
40 using aura::RootWindow; 40 using aura::RootWindow;
41 using aura::Window; 41 using aura::Window;
42 42
43 MultiMonitorManager::MultiMonitorManager() { 43 MultiMonitorManager::MultiMonitorManager() {
44 Init(); 44 Init();
45 } 45 }
46 46
47 MultiMonitorManager::~MultiMonitorManager() { 47 MultiMonitorManager::~MultiMonitorManager() {
48 // All monitors must have been deleted when monitor manager is deleted. 48 // All monitors must have been deleted when root windows are deleted.
49 CHECK(!monitors_.size()); 49 DCHECK(!monitors_.size());
50 } 50 }
51 51
52 // static 52 // static
53 void MultiMonitorManager::AddRemoveMonitor() { 53 void MultiMonitorManager::AddRemoveMonitor() {
54 MultiMonitorManager* manager = static_cast<MultiMonitorManager*>( 54 MultiMonitorManager* manager = static_cast<MultiMonitorManager*>(
55 aura::Env::GetInstance()->monitor_manager()); 55 aura::Env::GetInstance()->monitor_manager());
56 manager->AddRemoveMonitorImpl(); 56 manager->AddRemoveMonitorImpl();
57 } 57 }
58 58
59 void MultiMonitorManager::CycleMonitor() { 59 void MultiMonitorManager::CycleMonitor() {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 iter != monitors_.end(); ++iter) 199 iter != monitors_.end(); ++iter)
200 new_monitors.push_back(Copy(*iter)); 200 new_monitors.push_back(Copy(*iter));
201 new_monitors.push_back(Copy(monitors_.front())); 201 new_monitors.push_back(Copy(monitors_.front()));
202 OnNativeMonitorsChanged(new_monitors); 202 OnNativeMonitorsChanged(new_monitors);
203 STLDeleteContainerPointers(new_monitors.begin(), new_monitors.end()); 203 STLDeleteContainerPointers(new_monitors.begin(), new_monitors.end());
204 } 204 }
205 } 205 }
206 206
207 } // namespace internal 207 } // namespace internal
208 } // namespace ash 208 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698