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

Side by Side Diff: mojo/services/view_manager/screen_impl.cc

Issue 534843002: Convert view manager to surfaces with uploading shim in client lib (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove overzealous shutdown check in cc/surfaces, add NON_EXPORTED_BASE for windows build, saturate… Created 6 years, 3 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/services/view_manager/screen_impl.h ('k') | mojo/services/view_manager/server_view.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/services/view_manager/screen_impl.h"
6
7 #include "ui/gfx/native_widget_types.h"
8 #include "ui/gfx/rect_conversions.h"
9
10 namespace mojo {
11 namespace service {
12
13 // static
14 gfx::Screen* ScreenImpl::Create() {
15 return new ScreenImpl(gfx::Rect(0, 0, 800, 600));
16 }
17
18 ScreenImpl::~ScreenImpl() {
19 }
20
21 bool ScreenImpl::IsDIPEnabled() {
22 NOTIMPLEMENTED();
23 return true;
24 }
25
26 gfx::Point ScreenImpl::GetCursorScreenPoint() {
27 NOTIMPLEMENTED();
28 return gfx::Point();
29 }
30
31 gfx::NativeWindow ScreenImpl::GetWindowUnderCursor() {
32 return GetWindowAtScreenPoint(GetCursorScreenPoint());
33 }
34
35 gfx::NativeWindow ScreenImpl::GetWindowAtScreenPoint(const gfx::Point& point) {
36 NOTIMPLEMENTED();
37 return NULL;
38 }
39
40 int ScreenImpl::GetNumDisplays() const {
41 return 1;
42 }
43
44 std::vector<gfx::Display> ScreenImpl::GetAllDisplays() const {
45 return std::vector<gfx::Display>(1, display_);
46 }
47
48 gfx::Display ScreenImpl::GetDisplayNearestWindow(
49 gfx::NativeWindow window) const {
50 return display_;
51 }
52
53 gfx::Display ScreenImpl::GetDisplayNearestPoint(const gfx::Point& point) const {
54 return display_;
55 }
56
57 gfx::Display ScreenImpl::GetDisplayMatching(const gfx::Rect& match_rect) const {
58 return display_;
59 }
60
61 gfx::Display ScreenImpl::GetPrimaryDisplay() const {
62 return display_;
63 }
64
65 void ScreenImpl::AddObserver(gfx::DisplayObserver* observer) {
66 }
67
68 void ScreenImpl::RemoveObserver(gfx::DisplayObserver* observer) {
69 }
70
71 ScreenImpl::ScreenImpl(const gfx::Rect& screen_bounds) {
72 static int64 synthesized_display_id = 2000;
73 display_.set_id(synthesized_display_id++);
74 display_.SetScaleAndBounds(1.0f, screen_bounds);
75 }
76
77 } // namespace service
78 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/view_manager/screen_impl.h ('k') | mojo/services/view_manager/server_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698