| 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);
|
|
|