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

Unified Diff: mandoline/ui/aura/screen_mojo.cc

Issue 1123643007: Restore aura support from Mojo repo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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 | « mandoline/ui/aura/screen_mojo.h ('k') | mandoline/ui/aura/surface_binding.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mandoline/ui/aura/screen_mojo.cc
diff --git a/mandoline/ui/aura/screen_mojo.cc b/mandoline/ui/aura/screen_mojo.cc
new file mode 100644
index 0000000000000000000000000000000000000000..65cc23565be48e7c1964ad697afeeb5c6195f002
--- /dev/null
+++ b/mandoline/ui/aura/screen_mojo.cc
@@ -0,0 +1,71 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "mandoline/ui/aura/screen_mojo.h"
+
+#include "ui/gfx/geometry/rect_conversions.h"
+#include "ui/gfx/native_widget_types.h"
+
+namespace mandoline {
+
+// static
+ScreenMojo* ScreenMojo::Create() {
+ return new ScreenMojo(gfx::Rect(0, 0, 800, 600));
+}
+
+ScreenMojo::~ScreenMojo() {
+}
+
+gfx::Point ScreenMojo::GetCursorScreenPoint() {
+ NOTIMPLEMENTED();
+ return gfx::Point();
+}
+
+gfx::NativeWindow ScreenMojo::GetWindowUnderCursor() {
+ return GetWindowAtScreenPoint(GetCursorScreenPoint());
+}
+
+gfx::NativeWindow ScreenMojo::GetWindowAtScreenPoint(const gfx::Point& point) {
+ NOTIMPLEMENTED();
+ return NULL;
+}
+
+int ScreenMojo::GetNumDisplays() const {
+ return 1;
+}
+
+std::vector<gfx::Display> ScreenMojo::GetAllDisplays() const {
+ return std::vector<gfx::Display>(1, display_);
+}
+
+gfx::Display ScreenMojo::GetDisplayNearestWindow(
+ gfx::NativeWindow window) const {
+ return display_;
+}
+
+gfx::Display ScreenMojo::GetDisplayNearestPoint(const gfx::Point& point) const {
+ return display_;
+}
+
+gfx::Display ScreenMojo::GetDisplayMatching(const gfx::Rect& match_rect) const {
+ return display_;
+}
+
+gfx::Display ScreenMojo::GetPrimaryDisplay() const {
+ return display_;
+}
+
+void ScreenMojo::AddObserver(gfx::DisplayObserver* observer) {
+}
+
+void ScreenMojo::RemoveObserver(gfx::DisplayObserver* observer) {
+}
+
+ScreenMojo::ScreenMojo(const gfx::Rect& screen_bounds) {
+ static int64 synthesized_display_id = 2000;
+ display_.set_id(synthesized_display_id++);
+ display_.SetScaleAndBounds(1.0f, screen_bounds);
+}
+
+} // namespace mandoline
« no previous file with comments | « mandoline/ui/aura/screen_mojo.h ('k') | mandoline/ui/aura/surface_binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698