Chromium Code Reviews| Index: services/ui/display/platform_screen_ozone.cc |
| diff --git a/services/ui/display/platform_screen_ozone.cc b/services/ui/display/platform_screen_ozone.cc |
| index 7b4b22e24d53d0bc7cbe5a470dbf2840b1d0cb21..df677924c7bdb6f9b8b194ef87a9f8fe90cf09a9 100644 |
| --- a/services/ui/display/platform_screen_ozone.cc |
| +++ b/services/ui/display/platform_screen_ozone.cc |
| @@ -64,6 +64,37 @@ int64_t PlatformScreenOzone::GetPrimaryDisplayId() const { |
| return primary_display_id_; |
| } |
| +void PlatformScreenOzone::ToggleVirtualDisplay( |
| + const ToggleVirtualDisplayCallback& callback) { |
| + if (base::SysInfo::IsRunningOnChromeOS()) { |
| + callback.Run(false); |
| + return; |
| + } |
| + |
| + if (cached_displays_.size() == 1) { |
| + display_configurator_.AddVirtualDisplay(cached_displays_[0].bounds.size()); |
| + callback.Run(true); |
| + } else if (cached_displays_.size() > 1) { |
| + callback.Run( |
| + display_configurator_.RemoveVirtualDisplay(cached_displays_.back().id)); |
| + } else { |
| + NOTREACHED(); |
| + callback.Run(false); |
| + } |
| +} |
| + |
| +void PlatformScreenOzone::IncreaseResolution(int64_t display_id) { |
| + // TODO(kylechar): Implement. |
|
sky
2016/09/08 18:03:35
Use NOTIMPLEMENTED on all of these.
kylechar
2016/09/08 18:12:03
Done.
|
| +} |
| + |
| +void PlatformScreenOzone::DecreaseResolution(int64_t display_id) { |
| + // TODO(kylechar): Implement. |
| +} |
| + |
| +void PlatformScreenOzone::UseDefaultResolution(int64_t display_id) { |
| + // TODO(kylechar): Implement. |
| +} |
| + |
| void PlatformScreenOzone::ProcessRemovedDisplays( |
| const ui::DisplayConfigurator::DisplayStateList& snapshots) { |
| std::vector<int64_t> current_ids; |
| @@ -155,7 +186,7 @@ void PlatformScreenOzone::AddNewDisplays( |
| primary_display_id_ = id; |
| cached_displays_.push_back(DisplayInfo(id, bounds)); |
| - delegate_->OnDisplayAdded(this, id, bounds); |
| + delegate_->OnDisplayAdded(id, bounds); |
| } |
| } |