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

Unified Diff: ash/monitor/multi_monitor_manager.h

Issue 9701098: MultiMonitor support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix shutdown order 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
Index: ash/monitor/multi_monitor_manager.h
diff --git a/ash/monitor/multi_monitor_manager.h b/ash/monitor/multi_monitor_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..19dc23cf6b43ace2943af3e0fea4dd018dd31ba1
--- /dev/null
+++ b/ash/monitor/multi_monitor_manager.h
@@ -0,0 +1,56 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_MONITOR_MULTI_MONITOR_MANAGER_H_
+#define ASH_MONITOR_MULTI_MONITOR_MANAGER_H_
+#pragma once
+
+#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/aura/monitor_manager.h"
+#include "ui/aura/window.h"
+#include "ui/aura/window_observer.h"
+
+namespace ash {
+namespace internal {
+
+class MultiMonitorManager : public aura::MonitorManager,
+ public aura::WindowObserver {
+ public:
+ MultiMonitorManager();
+ virtual ~MultiMonitorManager();
+
+ // MonitorManager overrides:
+ virtual void OnNativeMonitorResized(const gfx::Size& size);
+ 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;
+ virtual size_t GetNumMonitors() const OVERRIDE;
+ virtual aura::Monitor* GetMonitorNearestWindow(
+ const aura::Window* window) OVERRIDE;
+
+ // WindowObserver overrides:
+ virtual void OnWindowBoundsChanged(aura::Window* window,
+ const gfx::Rect& bounds) OVERRIDE;
+ virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
+
+ private:
+ void Init();
+
+ typedef std::vector<aura::Monitor*> Monitors;
Ben Goodger (Google) 2012/03/20 17:09:02 typedefs go at the start of the section
oshima 2012/03/20 19:26:36 Done.
+ Monitors monitors_;
+
+ DISALLOW_COPY_AND_ASSIGN(MultiMonitorManager);
+};
+
+extern const aura::WindowProperty<aura::Monitor*>* const kMonitorKey;
+
+} // namespace internal
+} // namespace ash
+
+#endif // ASH_MONITOR_MULTI_MONITOR_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698