| 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 SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_ | 5 #ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_OZONE_H_ |
| 6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_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 "services/ui/display/platform_screen.h" | 15 #include "services/ui/display/platform_screen.h" |
| 16 #include "ui/display/chromeos/display_configurator.h" | 16 #include "ui/display/chromeos/display_configurator.h" |
| 17 #include "ui/display/display.h" | 17 #include "ui/display/display.h" |
| 18 | 18 |
| 19 namespace display { | 19 namespace display { |
| 20 | 20 |
| 21 // PlatformScreenImplOzone provides the necessary functionality to configure all | 21 // PlatformScreenOzone provides the necessary functionality to configure all |
| 22 // attached physical displays on the ozone platform. | 22 // attached physical displays on the ozone platform. |
| 23 class PlatformScreenImplOzone : public PlatformScreen, | 23 class PlatformScreenOzone : public PlatformScreen, |
| 24 public ui::DisplayConfigurator::Observer { | 24 public ui::DisplayConfigurator::Observer { |
| 25 public: | 25 public: |
| 26 PlatformScreenImplOzone(); | 26 PlatformScreenOzone(); |
| 27 ~PlatformScreenImplOzone() override; | 27 ~PlatformScreenOzone() override; |
| 28 | 28 |
| 29 // PlatformScreen: | 29 // PlatformScreen: |
| 30 void Init(PlatformScreenDelegate* delegate) override; | 30 void Init(PlatformScreenDelegate* delegate) override; |
| 31 int64_t GetPrimaryDisplayId() const override; | 31 int64_t GetPrimaryDisplayId() const override; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 // TODO(kylechar): This struct is just temporary until we migrate | 34 // TODO(kylechar): This struct is just temporary until we migrate |
| 35 // DisplayManager code out of ash so it can be used here. | 35 // DisplayManager code out of ash so it can be used here. |
| 36 struct DisplayInfo { | 36 struct DisplayInfo { |
| 37 DisplayInfo(int64_t new_id, const gfx::Rect& new_bounds) | 37 DisplayInfo(int64_t new_id, const gfx::Rect& new_bounds) |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 ui::MultipleDisplayState failed_new_state) override; | 85 ui::MultipleDisplayState failed_new_state) override; |
| 86 | 86 |
| 87 PlatformScreenDelegate* delegate_ = nullptr; | 87 PlatformScreenDelegate* delegate_ = nullptr; |
| 88 ui::DisplayConfigurator display_configurator_; | 88 ui::DisplayConfigurator display_configurator_; |
| 89 | 89 |
| 90 // TODO(kylechar): These values can/should be replaced by DisplayLayout. | 90 // TODO(kylechar): These values can/should be replaced by DisplayLayout. |
| 91 int64_t primary_display_id_ = display::Display::kInvalidDisplayID; | 91 int64_t primary_display_id_ = display::Display::kInvalidDisplayID; |
| 92 std::vector<DisplayInfo> cached_displays_; | 92 std::vector<DisplayInfo> cached_displays_; |
| 93 gfx::Point next_display_origin_; | 93 gfx::Point next_display_origin_; |
| 94 | 94 |
| 95 DISALLOW_COPY_AND_ASSIGN(PlatformScreenImplOzone); | 95 DISALLOW_COPY_AND_ASSIGN(PlatformScreenOzone); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace display | 98 } // namespace display |
| 99 | 99 |
| 100 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_ | 100 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_OZONE_H_ |
| OLD | NEW |