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

Unified Diff: ui/gfx/screen_android.cc

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: review fixes 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_android.cc
diff --git a/ui/gfx/screen_android.cc b/ui/gfx/screen_android.cc
index a2e5a5ddb7aec36dbb0e8095c2749c095f6f29ac..21116613727b7bbb832a8b1fab2a1c60224ef84a 100644
--- a/ui/gfx/screen_android.cc
+++ b/ui/gfx/screen_android.cc
@@ -9,29 +9,51 @@
namespace gfx {
-// static
-bool Screen::IsDIPEnabled() {
- return false;
-}
-
-// static
-gfx::Display Screen::GetPrimaryDisplay() {
- NOTIMPLEMENTED() << "crbug.com/117839 tracks implementation";
- return gfx::Display(0, gfx::Rect(0, 0, 1, 1));
-}
-
-// static
-gfx::Display Screen::GetDisplayNearestWindow(gfx::NativeView view) {
- return GetPrimaryDisplay();
-}
-
-// static
-gfx::Display Screen::GetDisplayNearestPoint(const gfx::Point& point) {
- return GetPrimaryDisplay();
-}
-
-int Screen::GetNumDisplays() {
- return 1;
+class ScreenAndroid : public Screen {
+ public:
+ ScreenAndroid() {}
+
+ bool IsDIPEnabled() OVERRIDE {
+ return false;
+ }
+
+ gfx::Point GetCursorScreenPoint() OVERRIDE {
+ return gfx::Point();
+ }
+
+ gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE {
+ NOTIMPLEMENTED();
+ return NULL;
+ }
+
+ gfx::Display GetPrimaryDisplay() const OVERRIDE {
+ NOTIMPLEMENTED() << "crbug.com/117839 tracks implementation";
+ return gfx::Display(0, gfx::Rect(0, 0, 1, 1));
+ }
+
+ gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const OVERRIDE {
+ return GetPrimaryDisplay();
+ }
+
+ gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const OVERRIDE {
+ return GetPrimaryDisplay();
+ }
+
+ int GetNumDisplays() OVERRIDE {
+ return 1;
+ }
+
+ virtual gfx::Display GetDisplayMatching(
+ const gfx::Rect& match_rect) const OVERRIDE {
+ return GetPrimaryDisplay();
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ScreenAndroid);
+};
+
+Screen* CreateNativeScreen() {
+ return new ScreenAndroid;
}
} // namespace gfx
« ui/gfx/screen.cc ('K') | « ui/gfx/screen.cc ('k') | ui/gfx/screen_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698