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

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

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/native_widget_view_manager.cc ('k') | mandoline/ui/aura/screen_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mandoline/ui/aura/screen_mojo.h
diff --git a/mandoline/ui/aura/screen_mojo.h b/mandoline/ui/aura/screen_mojo.h
new file mode 100644
index 0000000000000000000000000000000000000000..964c21adf9ece690ba5afccef07810e55c847887
--- /dev/null
+++ b/mandoline/ui/aura/screen_mojo.h
@@ -0,0 +1,49 @@
+// 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.
+
+#ifndef MANDOLINE_UI_AURA_SCREEN_MOJO_H_
+#define MANDOLINE_UI_AURA_SCREEN_MOJO_H_
+
+#include "base/macros.h"
+#include "ui/gfx/display.h"
+#include "ui/gfx/screen.h"
+
+namespace gfx {
+class Rect;
+class Transform;
+}
+
+namespace mandoline {
+
+// A minimal implementation of gfx::Screen for mojo.
+class ScreenMojo : public gfx::Screen {
+ public:
+ static ScreenMojo* Create();
+ ~ScreenMojo() override;
+
+ protected:
+ // gfx::Screen overrides:
+ gfx::Point GetCursorScreenPoint() override;
+ gfx::NativeWindow GetWindowUnderCursor() override;
+ gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override;
+ int GetNumDisplays() const override;
+ std::vector<gfx::Display> GetAllDisplays() const override;
+ gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override;
+ gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override;
+ gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override;
+ gfx::Display GetPrimaryDisplay() const override;
+ void AddObserver(gfx::DisplayObserver* observer) override;
+ void RemoveObserver(gfx::DisplayObserver* observer) override;
+
+ private:
+ explicit ScreenMojo(const gfx::Rect& screen_bounds);
+
+ gfx::Display display_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScreenMojo);
+};
+
+} // namespace mandoline
+
+#endif // MANDOLINE_UI_AURA_SCREEN_MOJO_H_
« no previous file with comments | « mandoline/ui/aura/native_widget_view_manager.cc ('k') | mandoline/ui/aura/screen_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698