OLD | NEW |
| (Empty) |
1 // Copyright 2015 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 BLIMP_ENGINE_APP_UI_BLIMP_SCREEN_H_ | |
6 #define BLIMP_ENGINE_APP_UI_BLIMP_SCREEN_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "base/macros.h" | |
11 #include "base/observer_list.h" | |
12 #include "ui/display/display.h" | |
13 #include "ui/display/screen_base.h" | |
14 | |
15 namespace aura { | |
16 class WindowTreeHost; | |
17 } | |
18 | |
19 namespace blimp { | |
20 namespace engine { | |
21 | |
22 // Presents the client's single screen. | |
23 class BlimpScreen : public display::ScreenBase { | |
24 public: | |
25 BlimpScreen(); | |
26 ~BlimpScreen() override; | |
27 | |
28 void set_window_tree_host(aura::WindowTreeHost* window_tree_host) { | |
29 window_tree_host_ = window_tree_host; | |
30 } | |
31 | |
32 // Updates the size reported by the primary display. | |
33 void UpdateDisplayScaleAndSize(float scale, const gfx::Size& size); | |
34 | |
35 // display::Screen implementation. | |
36 gfx::Point GetCursorScreenPoint() override; | |
37 bool IsWindowUnderCursor(gfx::NativeWindow window) override; | |
38 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; | |
39 display::Display GetDisplayNearestWindow(gfx::NativeView view) const override; | |
40 | |
41 private: | |
42 aura::WindowTreeHost* window_tree_host_; | |
43 DISALLOW_COPY_AND_ASSIGN(BlimpScreen); | |
44 }; | |
45 | |
46 } // namespace engine | |
47 } // namespace blimp | |
48 | |
49 #endif // BLIMP_ENGINE_APP_UI_BLIMP_SCREEN_H_ | |
OLD | NEW |