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

Unified Diff: ash/monitor/multi_monitor_manager.h

Issue 9960042: Refactor screen/monitor so that gfx::Screen returns monitor object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 8 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 | « ash/monitor/monitor_controller.cc ('k') | ash/monitor/multi_monitor_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/monitor/multi_monitor_manager.h
diff --git a/ash/monitor/multi_monitor_manager.h b/ash/monitor/multi_monitor_manager.h
index 2bbfcbb4b73cbdf8fd6c0acaf177cfac6694646d..6ecd8a799934e28a25b24506a2f518246cd4d554 100644
--- a/ash/monitor/multi_monitor_manager.h
+++ b/ash/monitor/multi_monitor_manager.h
@@ -13,6 +13,11 @@
#include "ui/aura/root_window_observer.h"
#include "ui/aura/window.h"
+namespace gfx {
+class Insets;
+class Monitor;
+}
+
namespace ash {
namespace internal {
@@ -33,37 +38,40 @@ class ASH_EXPORT MultiMonitorManager : public aura::MonitorManager,
static void AddRemoveMonitor();
static void CycleMonitor();
+ bool UpdateWorkAreaOfMonitorNearestWindow(const aura::Window* window,
+ const gfx::Insets& insets);
+
// MonitorManager overrides:
virtual void OnNativeMonitorsChanged(
- const std::vector<const aura::Monitor*>& monitors) OVERRIDE;
+ const std::vector<gfx::Monitor>& monitors) OVERRIDE;
virtual aura::RootWindow* CreateRootWindowForMonitor(
- aura::Monitor* monitor) OVERRIDE;
- virtual const aura::Monitor* GetMonitorNearestWindow(
- const aura::Window* window) const OVERRIDE;
- virtual const aura::Monitor* GetMonitorNearestPoint(
- const gfx::Point& point) const OVERRIDE;
- virtual aura::Monitor* GetMonitorAt(size_t index) OVERRIDE;
+ const gfx::Monitor& monitor) OVERRIDE;
+ virtual const gfx::Monitor& GetMonitorAt(size_t index) OVERRIDE;
+
virtual size_t GetNumMonitors() const OVERRIDE;
- virtual aura::Monitor* GetMonitorNearestWindow(
- const aura::Window* window) OVERRIDE;
+ virtual const gfx::Monitor& GetMonitorNearestPoint(
+ const gfx::Point& point) const OVERRIDE;
+ virtual const gfx::Monitor& GetMonitorNearestWindow(
+ const aura::Window* window) const OVERRIDE;
// RootWindowObserver overrides:
virtual void OnRootWindowResized(const aura::RootWindow* root,
const gfx::Size& new_size) OVERRIDE;
private:
- typedef std::vector<aura::Monitor*> Monitors;
+ typedef std::vector<gfx::Monitor> Monitors;
void Init();
void AddRemoveMonitorImpl();
void CycleMonitorImpl();
+ gfx::Monitor& FindMonitorById(int id);
Monitors monitors_;
DISALLOW_COPY_AND_ASSIGN(MultiMonitorManager);
};
-extern const aura::WindowProperty<aura::Monitor*>* const kMonitorKey;
+extern const aura::WindowProperty<int>* const kMonitorIdKey;
} // namespace internal
} // namespace ash
« no previous file with comments | « ash/monitor/monitor_controller.cc ('k') | ash/monitor/multi_monitor_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698