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

Unified Diff: ui/gfx/screen.h

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tidy Created 8 years, 2 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.h
diff --git a/ui/gfx/screen.h b/ui/gfx/screen.h
index bf9a8f4e17c94137b4c43b8a6daae0b8b5e8a109..b3e7129562cc92e037739706a475476a4ad3201c 100644
--- a/ui/gfx/screen.h
+++ b/ui/gfx/screen.h
@@ -10,6 +10,7 @@
#include "ui/gfx/display.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/point.h"
+#include "ui/gfx/screen_type_delegate.h"
namespace gfx {
class Rect;
@@ -20,37 +21,43 @@ class ScreenImpl;
class UI_EXPORT Screen {
public:
#if defined(USE_AURA)
- // Sets the instance to use. This takes owernship of |screen|, deleting the
- // old instance. This is used on aura to avoid circular dependencies between
- // ui and aura.
- static void SetInstance(ScreenImpl* screen);
+ // This is used on aura to avoid circular dependencies between ui and aura.
+ static void SetInstance(ScreenType type, ScreenImpl* screen);
+ // TODO(scottmg): http://crbug.com/133312
+ static void SetScreenTypeDelegate(ScreenTypeDelegate* delegate);
+ static void ForceScreenTypeOverride(ScreenType type);
#endif
// Returns true if DIP is enabled.
static bool IsDIPEnabled();
// Returns the current absolute position of the mouse pointer.
- static gfx::Point GetCursorScreenPoint();
+ static gfx::Point GetCursorScreenPoint(NativeView context);
// Returns the window under the cursor.
- static gfx::NativeWindow GetWindowAtCursorScreenPoint();
+ static gfx::NativeWindow GetWindowAtCursorScreenPoint(
+ NativeView context);
// Returns the number of displays.
// Mirrored displays are excluded; this method is intended to return the
// number of distinct, usable displays.
- static int GetNumDisplays();
+ static int GetNumDisplays(NativeView context);
// Returns the display nearest the specified window.
- static gfx::Display GetDisplayNearestWindow(gfx::NativeView view);
+ static gfx::Display GetDisplayNearestWindow(NativeView view);
// Returns the the display nearest the specified point.
- static gfx::Display GetDisplayNearestPoint(const gfx::Point& point);
+ static gfx::Display GetDisplayNearestPoint(
+ NativeView context, const gfx::Point& point);
// Returns the display that most closely intersects the provided bounds.
- static gfx::Display GetDisplayMatching(const gfx::Rect& match_rect);
+ static gfx::Display GetDisplayMatching(
+ NativeView context, const gfx::Rect& match_rect);
// Returns the primary display.
- static gfx::Display GetPrimaryDisplay();
+ static gfx::Display GetPrimaryDisplay(NativeView context);
+
+ static gfx::NativeView BadTwoWorldsContext();
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(Screen);

Powered by Google App Engine
This is Rietveld 408576698