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

Unified Diff: ui/gfx/screen_impl.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
Index: ui/gfx/screen_impl.h
diff --git a/ui/gfx/screen_impl.h b/ui/gfx/screen_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..021a1c6062bb2dfc323d79587ecf2ae0017b8738
--- /dev/null
+++ b/ui/gfx/screen_impl.h
@@ -0,0 +1,39 @@
+// 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 UI_GFX_SCREEN_IMPL_H_
+#define UI_GFX_SCREEN_IMPL_H_
+#pragma once
+
+#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/point.h"
+
+namespace gfx {
+
+class Monitor;
+class MonitorObserver;
+class ScreenImpl;
+
+// A class that provides |gfx::Screen|'s implementation on aura.
+class UI_EXPORT ScreenImpl {
+ public:
+ virtual ~ScreenImpl() {}
+
+ virtual gfx::Point GetCursorScreenPoint() = 0;
+ virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() = 0;
+
+ virtual int GetNumMonitors() = 0;
+ virtual const gfx::Monitor* GetMonitorNearestWindow(
+ gfx::NativeView view) = 0;
+ virtual const gfx::Monitor* GetMonitorNearestPoint(
+ const gfx::Point& point) = 0;
+ virtual const gfx::Monitor* GetPrimaryMonitor() = 0;
+
+ virtual void AddMonitorObserver(MonitorObserver* observer) = 0;
+ virtual void RemoveMonitorObserver(MonitorObserver* observer) = 0;
+};
+
+} // namespace gfx
+
+#endif // UI_GFX_SCREEN_IMPL_H_
« no previous file with comments | « ui/gfx/screen_gtk.cc ('k') | ui/gfx/screen_mac.mm » ('j') | ui/gfx/screen_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698