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

Unified Diff: ui/display/ios/screen_ios.mm

Issue 1964153002: Move Screen, its impls, DisplayObserver and DisplayChangeNotifier to ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tabs Created 4 years, 7 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
« no previous file with comments | « ui/display/display_unittest.cc ('k') | ui/display/mac/screen_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/ios/screen_ios.mm
diff --git a/ui/gfx/screen_ios.mm b/ui/display/ios/screen_ios.mm
similarity index 64%
rename from ui/gfx/screen_ios.mm
rename to ui/display/ios/screen_ios.mm
index ec00c1b6401d356231c09eb2ea1fd2d0d7be4bea..08d0d921b171106439039de2e348b1aadea7c064 100644
--- a/ui/gfx/screen_ios.mm
+++ b/ui/display/ios/screen_ios.mm
@@ -2,16 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/gfx/screen.h"
+#include "ui/display/screen.h"
#import <UIKit/UIKit.h>
#include "base/logging.h"
-#include "ui/gfx/display.h"
+#include "ui/display/display.h"
+namespace display {
namespace {
-class ScreenIos : public gfx::Screen {
+class ScreenIos : public Screen {
gfx::Point GetCursorScreenPoint() override {
NOTIMPLEMENTED();
return gfx::Point(0, 0);
@@ -36,51 +37,49 @@ class ScreenIos : public gfx::Screen {
#endif
}
- std::vector<gfx::Display> GetAllDisplays() const override {
+ std::vector<Display> GetAllDisplays() const override {
NOTIMPLEMENTED();
- return std::vector<gfx::Display>(1, GetPrimaryDisplay());
+ return std::vector<Display>(1, GetPrimaryDisplay());
}
// Returns the display nearest the specified window.
- gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override {
+ Display GetDisplayNearestWindow(gfx::NativeView view) const override {
NOTIMPLEMENTED();
- return gfx::Display();
+ return Display();
}
// Returns the the display nearest the specified point.
- gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override {
+ Display GetDisplayNearestPoint(const gfx::Point& point) const override {
NOTIMPLEMENTED();
- return gfx::Display();
+ return Display();
}
// Returns the display that most closely intersects the provided bounds.
- gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override {
+ Display GetDisplayMatching(const gfx::Rect& match_rect) const override {
NOTIMPLEMENTED();
- return gfx::Display();
+ return Display();
}
// Returns the primary display.
- gfx::Display GetPrimaryDisplay() const override {
+ Display GetPrimaryDisplay() const override {
UIScreen* mainScreen = [UIScreen mainScreen];
CHECK(mainScreen);
- gfx::Display display(0, gfx::Rect(mainScreen.bounds));
+ Display display(0, gfx::Rect(mainScreen.bounds));
display.set_device_scale_factor([mainScreen scale]);
return display;
}
- void AddObserver(gfx::DisplayObserver* observer) override {
+ void AddObserver(DisplayObserver* observer) override {
// no display change on iOS.
}
- void RemoveObserver(gfx::DisplayObserver* observer) override {
+ void RemoveObserver(DisplayObserver* observer) override {
// no display change on iOS.
}
};
} // namespace
-namespace gfx {
-
Screen* CreateNativeScreen() {
return new ScreenIos;
}
« no previous file with comments | « ui/display/display_unittest.cc ('k') | ui/display/mac/screen_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698