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

Side by Side Diff: services/ui/display/screen_manager_ozone_internal.h

Issue 2685003002: Rename ScreeManagerOzone to ScreenManagerOzoneInternal (Closed)
Patch Set: patch for landing Created 3 years, 10 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
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 SERVICES_UI_DISPLAY_SCREEN_MANAGER_OZONE_H_ 5 #ifndef SERVICES_UI_DISPLAY_SCREEN_MANAGER_OZONE_INTERNAL_H_
6 #define SERVICES_UI_DISPLAY_SCREEN_MANAGER_OZONE_H_ 6 #define SERVICES_UI_DISPLAY_SCREEN_MANAGER_OZONE_INTERNAL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "mojo/public/cpp/bindings/binding_set.h" 13 #include "mojo/public/cpp/bindings/binding_set.h"
14 #include "services/service_manager/public/cpp/connection.h" 14 #include "services/service_manager/public/cpp/connection.h"
15 #include "services/service_manager/public/cpp/interface_factory.h" 15 #include "services/service_manager/public/cpp/interface_factory.h"
16 #include "services/ui/display/screen_manager.h" 16 #include "services/ui/display/screen_manager.h"
17 #include "services/ui/display/viewport_metrics.h" 17 #include "services/ui/display/viewport_metrics.h"
18 #include "services/ui/public/interfaces/display/display_controller.mojom.h" 18 #include "services/ui/public/interfaces/display/display_controller.mojom.h"
19 #include "services/ui/public/interfaces/display/test_display_controller.mojom.h" 19 #include "services/ui/public/interfaces/display/test_display_controller.mojom.h"
20 #include "ui/display/display.h" 20 #include "ui/display/display.h"
21 #include "ui/display/display_observer.h" 21 #include "ui/display/display_observer.h"
22 #include "ui/display/manager/chromeos/display_configurator.h" 22 #include "ui/display/manager/chromeos/display_configurator.h"
23 #include "ui/display/manager/display_manager.h" 23 #include "ui/display/manager/display_manager.h"
24 #include "ui/display/types/display_constants.h" 24 #include "ui/display/types/display_constants.h"
25 25
26 namespace display { 26 namespace display {
27 27
28 class DisplayChangeObserver; 28 class DisplayChangeObserver;
29 class FakeDisplayController; 29 class FakeDisplayController;
30 class ScreenBase; 30 class ScreenBase;
31 class TouchTransformController; 31 class TouchTransformController;
32 32
33 // ScreenManagerOzone provides the necessary functionality to configure all 33 // ScreenManagerOzoneInternal provides the necessary functionality to configure
34 // attached physical displays on the ozone platform. 34 // all attached physical displays on the the ozone platform when operating in
35 class ScreenManagerOzone 35 // internal window mode.
36 class ScreenManagerOzoneInternal
36 : public ScreenManager, 37 : public ScreenManager,
37 public mojom::TestDisplayController, 38 public mojom::TestDisplayController,
38 public mojom::DisplayController, 39 public mojom::DisplayController,
39 public DisplayObserver, 40 public DisplayObserver,
40 public DisplayManager::Delegate, 41 public DisplayManager::Delegate,
41 public service_manager::InterfaceFactory<mojom::DisplayController>, 42 public service_manager::InterfaceFactory<mojom::DisplayController>,
42 public service_manager::InterfaceFactory<mojom::TestDisplayController> { 43 public service_manager::InterfaceFactory<mojom::TestDisplayController> {
43 public: 44 public:
44 ScreenManagerOzone(); 45 ScreenManagerOzoneInternal();
45 ~ScreenManagerOzone() override; 46 ~ScreenManagerOzoneInternal() override;
46 47
47 void SetPrimaryDisplayId(int64_t display_id); 48 void SetPrimaryDisplayId(int64_t display_id);
48 49
49 // ScreenManager: 50 // ScreenManager:
50 void AddInterfaces(service_manager::InterfaceRegistry* registry) override; 51 void AddInterfaces(service_manager::InterfaceRegistry* registry) override;
51 void Init(ScreenManagerDelegate* delegate) override; 52 void Init(ScreenManagerDelegate* delegate) override;
52 void RequestCloseDisplay(int64_t display_id) override; 53 void RequestCloseDisplay(int64_t display_id) override;
53 int64_t GetPrimaryDisplayId() const override; 54 int64_t GetPrimaryDisplayId() const override;
54 55
55 // mojom::TestDisplayController: 56 // mojom::TestDisplayController:
56 void ToggleAddRemoveDisplay() override; 57 void ToggleAddRemoveDisplay() override;
57 void ToggleDisplayResolution() override; 58 void ToggleDisplayResolution() override;
58 59
59 // mojom::DisplayController: 60 // mojom::DisplayController:
60 void IncreaseInternalDisplayZoom() override; 61 void IncreaseInternalDisplayZoom() override;
61 void DecreaseInternalDisplayZoom() override; 62 void DecreaseInternalDisplayZoom() override;
62 void ResetInternalDisplayZoom() override; 63 void ResetInternalDisplayZoom() override;
63 void RotateCurrentDisplayCW() override; 64 void RotateCurrentDisplayCW() override;
64 void SwapPrimaryDisplay() override; 65 void SwapPrimaryDisplay() override;
65 void ToggleMirrorMode() override; 66 void ToggleMirrorMode() override;
66 void SetDisplayWorkArea(int64_t display_id, 67 void SetDisplayWorkArea(int64_t display_id,
67 const gfx::Size& size, 68 const gfx::Size& size,
68 const gfx::Insets& insets) override; 69 const gfx::Insets& insets) override;
69 void TakeDisplayControl(const TakeDisplayControlCallback& callback) override; 70 void TakeDisplayControl(const TakeDisplayControlCallback& callback) override;
70 void RelinquishDisplayControl( 71 void RelinquishDisplayControl(
71 const RelinquishDisplayControlCallback& callback) override; 72 const RelinquishDisplayControlCallback& callback) override;
72 73
73 private: 74 private:
74 friend class ScreenManagerOzoneTest; 75 friend class ScreenManagerOzoneInternalTest;
75 76
76 ViewportMetrics GetViewportMetricsForDisplay(const Display& display); 77 ViewportMetrics GetViewportMetricsForDisplay(const Display& display);
77 78
78 // DisplayObserver: 79 // DisplayObserver:
79 void OnDisplayAdded(const Display& new_display) override; 80 void OnDisplayAdded(const Display& new_display) override;
80 void OnDisplayRemoved(const Display& old_display) override; 81 void OnDisplayRemoved(const Display& old_display) override;
81 void OnDisplayMetricsChanged(const Display& display, 82 void OnDisplayMetricsChanged(const Display& display,
82 uint32_t changed_metrics) override; 83 uint32_t changed_metrics) override;
83 84
84 // DisplayManager::Delegate: 85 // DisplayManager::Delegate:
(...skipping 24 matching lines...) Expand all
109 110
110 // If not null it provides a way to modify the display state when running off 111 // If not null it provides a way to modify the display state when running off
111 // device (eg. running mustash on Linux). 112 // device (eg. running mustash on Linux).
112 FakeDisplayController* fake_display_controller_ = nullptr; 113 FakeDisplayController* fake_display_controller_ = nullptr;
113 114
114 int64_t primary_display_id_ = kInvalidDisplayId; 115 int64_t primary_display_id_ = kInvalidDisplayId;
115 116
116 mojo::BindingSet<mojom::DisplayController> controller_bindings_; 117 mojo::BindingSet<mojom::DisplayController> controller_bindings_;
117 mojo::BindingSet<mojom::TestDisplayController> test_bindings_; 118 mojo::BindingSet<mojom::TestDisplayController> test_bindings_;
118 119
119 DISALLOW_COPY_AND_ASSIGN(ScreenManagerOzone); 120 DISALLOW_COPY_AND_ASSIGN(ScreenManagerOzoneInternal);
120 }; 121 };
121 122
122 } // namespace display 123 } // namespace display
123 124
124 #endif // SERVICES_UI_DISPLAY_SCREEN_MANAGER_OZONE_H_ 125 #endif // SERVICES_UI_DISPLAY_SCREEN_MANAGER_OZONE_INTERNAL_H_
OLDNEW
« no previous file with comments | « services/ui/display/screen_manager_ozone.cc ('k') | services/ui/display/screen_manager_ozone_internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698