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..3304f02eb87da5612bf06e742e24710d5cf2be7f 100644 |
--- a/services/ui/display/platform_screen_ozone.cc |
+++ b/services/ui/display/platform_screen_ozone.cc |
@@ -64,6 +64,40 @@ 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. |
+ NOTIMPLEMENTED(); |
dcheng
2016/09/08 21:02:57
Would it be possible to just merge the implementat
kylechar
2016/09/08 21:20:53
It's not possible to implement yet. Removed.
|
+} |
+ |
+void PlatformScreenOzone::DecreaseResolution(int64_t display_id) { |
+ // TODO(kylechar): Implement. |
+ NOTIMPLEMENTED(); |
+} |
+ |
+void PlatformScreenOzone::UseDefaultResolution(int64_t display_id) { |
+ // TODO(kylechar): Implement. |
+ NOTIMPLEMENTED(); |
+} |
+ |
void PlatformScreenOzone::ProcessRemovedDisplays( |
const ui::DisplayConfigurator::DisplayStateList& snapshots) { |
std::vector<int64_t> current_ids; |
@@ -155,7 +189,7 @@ void PlatformScreenOzone::AddNewDisplays( |
primary_display_id_ = id; |
cached_displays_.push_back(DisplayInfo(id, bounds)); |
- delegate_->OnDisplayAdded(this, id, bounds); |
+ delegate_->OnDisplayAdded(id, bounds); |
} |
} |