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

Unified Diff: ui/aura/monitor_manager.h

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/monitor_change_observer_x11.cc ('k') | ui/aura/monitor_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/monitor_manager.h
diff --git a/ui/aura/monitor_manager.h b/ui/aura/monitor_manager.h
index 77ad274ccffcfb94bce36dd056b231c035642581..9bbd028df9173d6d1b754d4c347a68d6ad2a10bd 100644
--- a/ui/aura/monitor_manager.h
+++ b/ui/aura/monitor_manager.h
@@ -7,6 +7,7 @@
#pragma once
#include <string>
+#include <vector>
#include "base/basictypes.h"
#include "base/observer_list.h"
@@ -27,6 +28,8 @@ class Window;
class MonitorObserver {
public:
virtual void OnMonitorBoundsChanged(const Monitor* monitor) = 0;
+ virtual void OnMonitorAdded(Monitor* new_monitor) = 0;
+ virtual void OnMonitorRemoved(const Monitor* old_monitor) = 0;
};
// MonitorManager creates, deletes and updates Monitor objects when
@@ -59,9 +62,11 @@ class AURA_EXPORT MonitorManager {
void AddObserver(MonitorObserver* observer);
void RemoveObserver(MonitorObserver* observer);
- // Called when native window's monitor size has changed.
- // TODO(oshima): multiple monitor support.
- virtual void OnNativeMonitorResized(const gfx::Size& size) = 0;
+ // Called when monitor configuration has changed. The new monitor
+ // configurations is passed as a vector of Monitor object, which
+ // contains each monitor's new infomration.
+ virtual void OnNativeMonitorsChanged(
+ const std::vector<const Monitor*>& monitors) = 0;
// Create a root window for given |monitor|.
virtual RootWindow* CreateRootWindowForMonitor(Monitor* monitor) = 0;
@@ -75,7 +80,7 @@ class AURA_EXPORT MonitorManager {
virtual const Monitor* GetMonitorNearestPoint(
const gfx::Point& point) const = 0;
- // Returns the monitor at |index|. The monitor at 0 is consiered
+ // Returns the monitor at |index|. The monitor at 0 is considered
// "primary".
virtual Monitor* GetMonitorAt(size_t index) = 0;
@@ -84,6 +89,8 @@ class AURA_EXPORT MonitorManager {
protected:
// Calls observers' OnMonitorBoundsChanged methods.
void NotifyBoundsChanged(const Monitor* monitor);
+ void NotifyMonitorAdded(Monitor* monitor);
+ void NotifyMonitorRemoved(const Monitor* monitor);
private:
// If set before the RootWindow is created, the host window will cover the
« no previous file with comments | « ui/aura/monitor_change_observer_x11.cc ('k') | ui/aura/monitor_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698