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

Side by Side Diff: mojo/aura/screen_mojo.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « mojo/aura/screen_mojo.h ('k') | mojo/aura/surface_binding.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "mojo/aura/screen_mojo.h"
6
7 #include "ui/gfx/native_widget_types.h"
8 #include "ui/gfx/rect_conversions.h"
9
10 namespace mojo {
11
12 // static
13 ScreenMojo* ScreenMojo::Create() {
14 return new ScreenMojo(gfx::Rect(0, 0, 800, 600));
15 }
16
17 ScreenMojo::~ScreenMojo() {
18 }
19
20 bool ScreenMojo::IsDIPEnabled() {
21 NOTIMPLEMENTED();
22 return true;
23 }
24
25 gfx::Point ScreenMojo::GetCursorScreenPoint() {
26 NOTIMPLEMENTED();
27 return gfx::Point();
28 }
29
30 gfx::NativeWindow ScreenMojo::GetWindowUnderCursor() {
31 return GetWindowAtScreenPoint(GetCursorScreenPoint());
32 }
33
34 gfx::NativeWindow ScreenMojo::GetWindowAtScreenPoint(const gfx::Point& point) {
35 NOTIMPLEMENTED();
36 return NULL;
37 }
38
39 int ScreenMojo::GetNumDisplays() const {
40 return 1;
41 }
42
43 std::vector<gfx::Display> ScreenMojo::GetAllDisplays() const {
44 return std::vector<gfx::Display>(1, display_);
45 }
46
47 gfx::Display ScreenMojo::GetDisplayNearestWindow(
48 gfx::NativeWindow window) const {
49 return display_;
50 }
51
52 gfx::Display ScreenMojo::GetDisplayNearestPoint(const gfx::Point& point) const {
53 return display_;
54 }
55
56 gfx::Display ScreenMojo::GetDisplayMatching(const gfx::Rect& match_rect) const {
57 return display_;
58 }
59
60 gfx::Display ScreenMojo::GetPrimaryDisplay() const {
61 return display_;
62 }
63
64 void ScreenMojo::AddObserver(gfx::DisplayObserver* observer) {
65 }
66
67 void ScreenMojo::RemoveObserver(gfx::DisplayObserver* observer) {
68 }
69
70 ScreenMojo::ScreenMojo(const gfx::Rect& screen_bounds) {
71 static int64 synthesized_display_id = 2000;
72 display_.set_id(synthesized_display_id++);
73 display_.SetScaleAndBounds(1.0f, screen_bounds);
74 }
75
76 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/aura/screen_mojo.h ('k') | mojo/aura/surface_binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698