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

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

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
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 #ifndef MOJO_SERVICES_VIEW_MANAGER_SCREEN_IMPL_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_SCREEN_IMPL_H_
7
8 #include "base/compiler_specific.h"
9 #include "ui/gfx/display.h"
10 #include "ui/gfx/screen.h"
11
12 namespace gfx {
13 class Rect;
14 class Transform;
15 }
16
17 namespace mojo {
18 namespace service {
19
20 // A minimal implementation of gfx::Screen for the view manager.
21 class ScreenImpl : public gfx::Screen {
22 public:
23 static gfx::Screen* Create();
24 virtual ~ScreenImpl();
25
26 protected:
27 // gfx::Screen overrides:
28 virtual bool IsDIPEnabled() OVERRIDE;
29 virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
30 virtual gfx::NativeWindow GetWindowUnderCursor() OVERRIDE;
31 virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point)
32 OVERRIDE;
33 virtual int GetNumDisplays() const OVERRIDE;
34 virtual std::vector<gfx::Display> GetAllDisplays() const OVERRIDE;
35 virtual gfx::Display GetDisplayNearestWindow(
36 gfx::NativeView view) const OVERRIDE;
37 virtual gfx::Display GetDisplayNearestPoint(
38 const gfx::Point& point) const OVERRIDE;
39 virtual gfx::Display GetDisplayMatching(
40 const gfx::Rect& match_rect) const OVERRIDE;
41 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE;
42 virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE;
43 virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE;
44
45 private:
46 explicit ScreenImpl(const gfx::Rect& screen_bounds);
47
48 gfx::Display display_;
49
50 DISALLOW_COPY_AND_ASSIGN(ScreenImpl);
51 };
52
53 } // namespace service
54 } // namespace mojo
55
56 #endif // MOJO_SERVICES_VIEW_MANAGER_SCREEN_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/view_manager/display_manager_delegate.h ('k') | mojo/services/view_manager/screen_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698