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

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

Issue 341953002: Clean up WTH creation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « mojo/services/view_manager/screen_impl.h ('k') | mojo/views/native_widget_view_manager.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 (c) 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 view_manager {
12 namespace service {
13
14 // static
15 gfx::Screen* ScreenImpl::Create() {
16 return new ScreenImpl(gfx::Rect(0, 0, 800, 600));
17 }
18
19 ScreenImpl::~ScreenImpl() {
20 }
21
22 bool ScreenImpl::IsDIPEnabled() {
23 NOTIMPLEMENTED();
24 return true;
25 }
26
27 gfx::Point ScreenImpl::GetCursorScreenPoint() {
28 NOTIMPLEMENTED();
29 return gfx::Point();
30 }
31
32 gfx::NativeWindow ScreenImpl::GetWindowUnderCursor() {
33 return GetWindowAtScreenPoint(GetCursorScreenPoint());
34 }
35
36 gfx::NativeWindow ScreenImpl::GetWindowAtScreenPoint(const gfx::Point& point) {
37 NOTIMPLEMENTED();
38 return NULL;
39 }
40
41 int ScreenImpl::GetNumDisplays() const {
42 return 1;
43 }
44
45 std::vector<gfx::Display> ScreenImpl::GetAllDisplays() const {
46 return std::vector<gfx::Display>(1, display_);
47 }
48
49 gfx::Display ScreenImpl::GetDisplayNearestWindow(
50 gfx::NativeWindow window) const {
51 return display_;
52 }
53
54 gfx::Display ScreenImpl::GetDisplayNearestPoint(const gfx::Point& point) const {
55 return display_;
56 }
57
58 gfx::Display ScreenImpl::GetDisplayMatching(const gfx::Rect& match_rect) const {
59 return display_;
60 }
61
62 gfx::Display ScreenImpl::GetPrimaryDisplay() const {
63 return display_;
64 }
65
66 void ScreenImpl::AddObserver(gfx::DisplayObserver* observer) {
67 }
68
69 void ScreenImpl::RemoveObserver(gfx::DisplayObserver* observer) {
70 }
71
72 ScreenImpl::ScreenImpl(const gfx::Rect& screen_bounds) {
73 static int64 synthesized_display_id = 2000;
74 display_.set_id(synthesized_display_id++);
75 display_.SetScaleAndBounds(1.0f, screen_bounds);
76 }
77
78 } // namespace service
79 } // namespace view_manager
80 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/view_manager/screen_impl.h ('k') | mojo/views/native_widget_view_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698