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

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

Issue 2523723002: Update display::Display::kInvalidDisplayID constant. (Closed)
Patch Set: Fix includes. Created 4 years 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_PLATFORM_SCREEN_OZONE_H_ 5 #ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_OZONE_H_
6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_OZONE_H_ 6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_OZONE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "mojo/public/cpp/bindings/binding_set.h" 15 #include "mojo/public/cpp/bindings/binding_set.h"
16 #include "services/service_manager/public/cpp/connection.h" 16 #include "services/service_manager/public/cpp/connection.h"
17 #include "services/service_manager/public/cpp/interface_factory.h" 17 #include "services/service_manager/public/cpp/interface_factory.h"
18 #include "services/ui/display/platform_screen.h" 18 #include "services/ui/display/platform_screen.h"
19 #include "services/ui/display/viewport_metrics.h" 19 #include "services/ui/display/viewport_metrics.h"
20 #include "services/ui/public/interfaces/display/display_controller.mojom.h" 20 #include "services/ui/public/interfaces/display/display_controller.mojom.h"
21 #include "services/ui/public/interfaces/display/test_display_controller.mojom.h" 21 #include "services/ui/public/interfaces/display/test_display_controller.mojom.h"
22 #include "ui/display/chromeos/display_configurator.h" 22 #include "ui/display/chromeos/display_configurator.h"
23 #include "ui/display/display.h" 23 #include "ui/display/display.h"
24 #include "ui/display/types/display_constants.h"
24 #include "ui/display/types/fake_display_controller.h" 25 #include "ui/display/types/fake_display_controller.h"
25 26
26 namespace display { 27 namespace display {
27 28
28 // PlatformScreenOzone provides the necessary functionality to configure all 29 // PlatformScreenOzone provides the necessary functionality to configure all
29 // attached physical displays on the ozone platform. 30 // attached physical displays on the ozone platform.
30 class PlatformScreenOzone 31 class PlatformScreenOzone
31 : public PlatformScreen, 32 : public PlatformScreen,
32 public ui::DisplayConfigurator::Observer, 33 public ui::DisplayConfigurator::Observer,
33 public ui::DisplayConfigurator::StateController, 34 public ui::DisplayConfigurator::StateController,
(...skipping 24 matching lines...) Expand all
58 private: 59 private:
59 friend class PlatformScreenOzoneTest; 60 friend class PlatformScreenOzoneTest;
60 61
61 // TODO(kylechar): This struct is just temporary until we migrate 62 // TODO(kylechar): This struct is just temporary until we migrate
62 // DisplayManager code out of ash so it can be used here. 63 // DisplayManager code out of ash so it can be used here.
63 struct DisplayInfo { 64 struct DisplayInfo {
64 DisplayInfo(); 65 DisplayInfo();
65 DisplayInfo(const DisplayInfo& other); 66 DisplayInfo(const DisplayInfo& other);
66 ~DisplayInfo(); 67 ~DisplayInfo();
67 68
68 int64_t id = Display::kInvalidDisplayID; 69 int64_t id = kInvalidDisplayId;
69 // Information about display viewport. 70 // Information about display viewport.
70 ViewportMetrics metrics; 71 ViewportMetrics metrics;
71 // Last insets received from WM. 72 // Last insets received from WM.
72 gfx::Insets last_work_area_insets; 73 gfx::Insets last_work_area_insets;
73 74
74 // Temporary hack to allow changing display resolution. 75 // Temporary hack to allow changing display resolution.
75 std::vector<gfx::Size> supported_sizes; 76 std::vector<gfx::Size> supported_sizes;
76 gfx::Size requested_size; 77 gfx::Size requested_size;
77 78
78 // The display bounds have been modified and delegate should be updated. 79 // The display bounds have been modified and delegate should be updated.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 144
144 // If not null it provides a way to modify the display state when running off 145 // If not null it provides a way to modify the display state when running off
145 // device (eg. running mustash on Linux). 146 // device (eg. running mustash on Linux).
146 FakeDisplayController* fake_display_controller_ = nullptr; 147 FakeDisplayController* fake_display_controller_ = nullptr;
147 148
148 // Tracks if we've made a display configuration change and want to wait for 149 // Tracks if we've made a display configuration change and want to wait for
149 // the display configuration to update before making further changes. 150 // the display configuration to update before making further changes.
150 bool wait_for_display_config_update_ = false; 151 bool wait_for_display_config_update_ = false;
151 152
152 // TODO(kylechar): These values can/should be replaced by DisplayLayout. 153 // TODO(kylechar): These values can/should be replaced by DisplayLayout.
153 int64_t primary_display_id_ = display::Display::kInvalidDisplayID; 154 int64_t primary_display_id_ = display::kInvalidDisplayId;
154 std::vector<DisplayInfo> cached_displays_; 155 std::vector<DisplayInfo> cached_displays_;
155 gfx::Point next_display_origin_; 156 gfx::Point next_display_origin_;
156 157
157 mojo::BindingSet<mojom::DisplayController> controller_bindings_; 158 mojo::BindingSet<mojom::DisplayController> controller_bindings_;
158 mojo::BindingSet<mojom::TestDisplayController> test_bindings_; 159 mojo::BindingSet<mojom::TestDisplayController> test_bindings_;
159 160
160 DISALLOW_COPY_AND_ASSIGN(PlatformScreenOzone); 161 DISALLOW_COPY_AND_ASSIGN(PlatformScreenOzone);
161 }; 162 };
162 163
163 } // namespace display 164 } // namespace display
164 165
165 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_OZONE_H_ 166 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_OZONE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/display_overscan_handler.cc ('k') | services/ui/display/platform_screen_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698