OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 UI_VIEWS_MUS_SCREEN_MUS_H_ | 5 #ifndef UI_VIEWS_MUS_SCREEN_MUS_H_ |
6 #define UI_VIEWS_MUS_SCREEN_MUS_H_ | 6 #define UI_VIEWS_MUS_SCREEN_MUS_H_ |
7 | 7 |
8 #include "mojo/public/cpp/bindings/binding.h" | 8 #include "mojo/public/cpp/bindings/binding.h" |
9 #include "services/ui/public/interfaces/display_manager.mojom.h" | 9 #include "services/ui/public/interfaces/display_manager.mojom.h" |
10 #include "ui/display/screen_base.h" | 10 #include "ui/display/screen_base.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 : public display::ScreenBase, | 23 : public display::ScreenBase, |
24 public NON_EXPORTED_BASE(ui::mojom::DisplayManagerObserver) { | 24 public NON_EXPORTED_BASE(ui::mojom::DisplayManagerObserver) { |
25 public: | 25 public: |
26 explicit ScreenMus(ScreenMusDelegate* delegate); | 26 explicit ScreenMus(ScreenMusDelegate* delegate); |
27 ~ScreenMus() override; | 27 ~ScreenMus() override; |
28 | 28 |
29 void Init(service_manager::Connector* connector); | 29 void Init(service_manager::Connector* connector); |
30 | 30 |
31 private: | 31 private: |
32 // display::Screen: | 32 // display::Screen: |
33 display::Display GetDisplayNearestWindow(gfx::NativeView view) const override; | 33 display::Display GetDisplayNearestWindow( |
| 34 gfx::NativeWindow window) const override; |
34 gfx::Point GetCursorScreenPoint() override; | 35 gfx::Point GetCursorScreenPoint() override; |
35 bool IsWindowUnderCursor(gfx::NativeWindow window) override; | 36 bool IsWindowUnderCursor(gfx::NativeWindow window) override; |
36 aura::Window* GetWindowAtScreenPoint(const gfx::Point& point) override; | 37 aura::Window* GetWindowAtScreenPoint(const gfx::Point& point) override; |
37 | 38 |
38 // ui::mojom::DisplayManager: | 39 // ui::mojom::DisplayManager: |
39 void OnDisplays(std::vector<ui::mojom::WsDisplayPtr> ws_displays, | 40 void OnDisplays(std::vector<ui::mojom::WsDisplayPtr> ws_displays, |
40 int64_t primary_display_id, | 41 int64_t primary_display_id, |
41 int64_t internal_display_id) override; | 42 int64_t internal_display_id) override; |
42 void OnDisplaysChanged( | 43 void OnDisplaysChanged( |
43 std::vector<ui::mojom::WsDisplayPtr> ws_displays) override; | 44 std::vector<ui::mojom::WsDisplayPtr> ws_displays) override; |
44 void OnDisplayRemoved(int64_t display_id) override; | 45 void OnDisplayRemoved(int64_t display_id) override; |
45 void OnPrimaryDisplayChanged(int64_t primary_display_id) override; | 46 void OnPrimaryDisplayChanged(int64_t primary_display_id) override; |
46 | 47 |
47 ScreenMusDelegate* delegate_; | 48 ScreenMusDelegate* delegate_; |
48 ui::mojom::DisplayManagerPtr display_manager_; | 49 ui::mojom::DisplayManagerPtr display_manager_; |
49 mojo::Binding<ui::mojom::DisplayManagerObserver> | 50 mojo::Binding<ui::mojom::DisplayManagerObserver> |
50 display_manager_observer_binding_; | 51 display_manager_observer_binding_; |
51 | 52 |
52 DISALLOW_COPY_AND_ASSIGN(ScreenMus); | 53 DISALLOW_COPY_AND_ASSIGN(ScreenMus); |
53 }; | 54 }; |
54 | 55 |
55 } // namespace views | 56 } // namespace views |
56 | 57 |
57 #endif // UI_VIEWS_MUS_SCREEN_MUS_H_ | 58 #endif // UI_VIEWS_MUS_SCREEN_MUS_H_ |
OLD | NEW |