| 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 #include "services/ui/ws/platform_display_default.h" | 5 #include "services/ui/ws/platform_display_default.h" |
| 6 | 6 |
| 7 #include "gpu/ipc/client/gpu_channel_host.h" | 7 #include "gpu/ipc/client/gpu_channel_host.h" |
| 8 #include "services/ui/display/platform_screen.h" | 8 #include "services/ui/display/platform_screen.h" |
| 9 #include "services/ui/ws/platform_display_init_params.h" | 9 #include "services/ui/ws/platform_display_init_params.h" |
| 10 #include "services/ui/ws/server_window.h" | 10 #include "services/ui/ws/server_window.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 void PlatformDisplayDefault::SetImeVisibility(bool visible) { | 118 void PlatformDisplayDefault::SetImeVisibility(bool visible) { |
| 119 ui::PlatformImeController* ime = platform_window_->GetPlatformImeController(); | 119 ui::PlatformImeController* ime = platform_window_->GetPlatformImeController(); |
| 120 if (ime) | 120 if (ime) |
| 121 ime->SetImeVisibility(visible); | 121 ime->SetImeVisibility(visible); |
| 122 } | 122 } |
| 123 | 123 |
| 124 gfx::Rect PlatformDisplayDefault::GetBounds() const { | 124 gfx::Rect PlatformDisplayDefault::GetBounds() const { |
| 125 return metrics_.bounds; | 125 return metrics_.bounds; |
| 126 } | 126 } |
| 127 | 127 |
| 128 void PlatformDisplayDefault::OnGpuChannelEstablished( | |
| 129 scoped_refptr<gpu::GpuChannelHost> channel) { | |
| 130 frame_generator_->OnGpuChannelEstablished(channel); | |
| 131 } | |
| 132 | |
| 133 bool PlatformDisplayDefault::UpdateViewportMetrics( | 128 bool PlatformDisplayDefault::UpdateViewportMetrics( |
| 134 const display::ViewportMetrics& metrics) { | 129 const display::ViewportMetrics& metrics) { |
| 135 if (metrics_ == metrics) | 130 if (metrics_ == metrics) |
| 136 return false; | 131 return false; |
| 137 | 132 |
| 138 gfx::Rect bounds = platform_window_->GetBounds(); | 133 gfx::Rect bounds = platform_window_->GetBounds(); |
| 139 if (bounds.size() != metrics.pixel_size) { | 134 if (bounds.size() != metrics.pixel_size) { |
| 140 bounds.set_size(metrics.pixel_size); | 135 bounds.set_size(metrics.pixel_size); |
| 141 platform_window_->SetBounds(bounds); | 136 platform_window_->SetBounds(bounds); |
| 142 } | 137 } |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 } | 235 } |
| 241 | 236 |
| 242 void PlatformDisplayDefault::OnActivationChanged(bool active) {} | 237 void PlatformDisplayDefault::OnActivationChanged(bool active) {} |
| 243 | 238 |
| 244 bool PlatformDisplayDefault::IsInHighContrastMode() { | 239 bool PlatformDisplayDefault::IsInHighContrastMode() { |
| 245 return delegate_ ? delegate_->IsInHighContrastMode() : false; | 240 return delegate_ ? delegate_->IsInHighContrastMode() : false; |
| 246 } | 241 } |
| 247 | 242 |
| 248 } // namespace ws | 243 } // namespace ws |
| 249 } // namespace ui | 244 } // namespace ui |
| OLD | NEW |