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

Side by Side Diff: ui/gfx/screen.h

Issue 8549008: Extract MonitorInfoProvider from WindowSizer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add docs Created 9 years 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
« no previous file with comments | « chrome/browser/ui/window_sizer_win.cc ('k') | ui/gfx/screen_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef UI_GFX_SCREEN_H_ 5 #ifndef UI_GFX_SCREEN_H_
6 #define UI_GFX_SCREEN_H_ 6 #define UI_GFX_SCREEN_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/gfx/point.h" 10 #include "ui/gfx/point.h"
(...skipping 25 matching lines...) Expand all
36 // Returns the bounds of the monitor nearest the specified window. 36 // Returns the bounds of the monitor nearest the specified window.
37 static gfx::Rect GetMonitorAreaNearestWindow(gfx::NativeView view); 37 static gfx::Rect GetMonitorAreaNearestWindow(gfx::NativeView view);
38 38
39 // Returns the work area of the monitor nearest the specified point. 39 // Returns the work area of the monitor nearest the specified point.
40 static gfx::Rect GetMonitorWorkAreaNearestPoint(const gfx::Point& point); 40 static gfx::Rect GetMonitorWorkAreaNearestPoint(const gfx::Point& point);
41 41
42 // Returns the monitor area (not the work area, but the complete bounds) of 42 // Returns the monitor area (not the work area, but the complete bounds) of
43 // the monitor nearest the specified point. 43 // the monitor nearest the specified point.
44 static gfx::Rect GetMonitorAreaNearestPoint(const gfx::Point& point); 44 static gfx::Rect GetMonitorAreaNearestPoint(const gfx::Point& point);
45 45
46 // Returns the bounds of the work area of the primary monitor.
47 static gfx::Rect GetPrimaryMonitorWorkArea();
48
49 // Returns the bounds of the primary monitor.
50 static gfx::Rect GetPrimaryMonitorBounds();
51
52 // Returns the bounds of the work area of the monitor that most closely
53 // intersects the provided bounds.
54 static gfx::Rect GetMonitorWorkAreaMatching(
55 const gfx::Rect& match_rect);
56
46 // Returns the window under the cursor. 57 // Returns the window under the cursor.
47 static gfx::NativeWindow GetWindowAtCursorScreenPoint(); 58 static gfx::NativeWindow GetWindowAtCursorScreenPoint();
48 59
49 // Returns the dimensions of the primary monitor in pixels. 60 // Returns the dimensions of the primary monitor in pixels.
50 static gfx::Size GetPrimaryMonitorSize(); 61 static gfx::Size GetPrimaryMonitorSize();
51 62
52 // Returns the number of monitors. 63 // Returns the number of monitors.
53 // Mirrored displays are excluded; this method is intended to return the 64 // Mirrored displays are excluded; this method is intended to return the
54 // number of distinct, usable displays. 65 // number of distinct, usable displays.
55 static int GetNumMonitors(); 66 static int GetNumMonitors();
(...skipping 14 matching lines...) Expand all
70 private: 81 private:
71 #if defined(USE_AURA) 82 #if defined(USE_AURA)
72 // The singleton screen instance. Only used on aura. 83 // The singleton screen instance. Only used on aura.
73 static Screen* instance_; 84 static Screen* instance_;
74 #endif 85 #endif
75 }; 86 };
76 87
77 } // namespace gfx 88 } // namespace gfx
78 89
79 #endif // VIEWS_SCREEN_H_ 90 #endif // VIEWS_SCREEN_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/window_sizer_win.cc ('k') | ui/gfx/screen_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698