OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BLIMP_ENGINE_APP_UI_BLIMP_SCREEN_H_ | 5 #ifndef BLIMP_ENGINE_APP_UI_BLIMP_SCREEN_H_ |
6 #define BLIMP_ENGINE_APP_UI_BLIMP_SCREEN_H_ | 6 #define BLIMP_ENGINE_APP_UI_BLIMP_SCREEN_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 void set_window_tree_host(aura::WindowTreeHost* window_tree_host) { | 28 void set_window_tree_host(aura::WindowTreeHost* window_tree_host) { |
29 window_tree_host_ = window_tree_host; | 29 window_tree_host_ = window_tree_host; |
30 } | 30 } |
31 | 31 |
32 // Updates the size reported by the primary display. | 32 // Updates the size reported by the primary display. |
33 void UpdateDisplayScaleAndSize(float scale, const gfx::Size& size); | 33 void UpdateDisplayScaleAndSize(float scale, const gfx::Size& size); |
34 | 34 |
35 // display::Screen implementation. | 35 // display::Screen implementation. |
36 gfx::Point GetCursorScreenPoint() override; | 36 gfx::Point GetCursorScreenPoint() override; |
37 gfx::NativeWindow GetWindowUnderCursor() override; | 37 bool IsWindowUnderCursor(gfx::NativeWindow window) override; |
38 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; | 38 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; |
39 int GetNumDisplays() const override; | 39 int GetNumDisplays() const override; |
40 std::vector<display::Display> GetAllDisplays() const override; | 40 std::vector<display::Display> GetAllDisplays() const override; |
41 display::Display GetDisplayNearestWindow(gfx::NativeView view) const override; | 41 display::Display GetDisplayNearestWindow(gfx::NativeView view) const override; |
42 display::Display GetDisplayNearestPoint( | 42 display::Display GetDisplayNearestPoint( |
43 const gfx::Point& point) const override; | 43 const gfx::Point& point) const override; |
44 display::Display GetDisplayMatching( | 44 display::Display GetDisplayMatching( |
45 const gfx::Rect& match_rect) const override; | 45 const gfx::Rect& match_rect) const override; |
46 display::Display GetPrimaryDisplay() const override; | 46 display::Display GetPrimaryDisplay() const override; |
47 void AddObserver(display::DisplayObserver* observer) override; | 47 void AddObserver(display::DisplayObserver* observer) override; |
48 void RemoveObserver(display::DisplayObserver* observer) override; | 48 void RemoveObserver(display::DisplayObserver* observer) override; |
49 | 49 |
50 private: | 50 private: |
51 aura::WindowTreeHost* window_tree_host_; | 51 aura::WindowTreeHost* window_tree_host_; |
52 display::Display display_; | 52 display::Display display_; |
53 base::ObserverList<display::DisplayObserver> observers_; | 53 base::ObserverList<display::DisplayObserver> observers_; |
54 DISALLOW_COPY_AND_ASSIGN(BlimpScreen); | 54 DISALLOW_COPY_AND_ASSIGN(BlimpScreen); |
55 }; | 55 }; |
56 | 56 |
57 } // namespace engine | 57 } // namespace engine |
58 } // namespace blimp | 58 } // namespace blimp |
59 | 59 |
60 #endif // BLIMP_ENGINE_APP_UI_BLIMP_SCREEN_H_ | 60 #endif // BLIMP_ENGINE_APP_UI_BLIMP_SCREEN_H_ |
OLD | NEW |