Battery Status API: add UMA logging for Linux.
[chromium-blink-merge.git] / mojo / services / view_manager / screen_impl.h
blob79a6454b4b6edf4f0b04e065d21b94df9bc8cbef
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.
5 #ifndef MOJO_SERVICES_VIEW_MANAGER_SCREEN_IMPL_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_SCREEN_IMPL_H_
8 #include "base/compiler_specific.h"
9 #include "ui/gfx/display.h"
10 #include "ui/gfx/screen.h"
12 namespace gfx {
13 class Rect;
14 class Transform;
17 namespace mojo {
18 namespace service {
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();
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;
45 private:
46 explicit ScreenImpl(const gfx::Rect& screen_bounds);
48 gfx::Display display_;
50 DISALLOW_COPY_AND_ASSIGN(ScreenImpl);
53 } // namespace service
54 } // namespace mojo
56 #endif // MOJO_SERVICES_VIEW_MANAGER_SCREEN_IMPL_H_