| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/mus/ws/display_manager.h" | 5 #include "components/mus/ws/display_manager.h" |
| 6 | 6 |
| 7 #include "base/numerics/safe_conversions.h" | 7 #include "base/numerics/safe_conversions.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
| 10 #include "cc/output/copy_output_request.h" | 10 #include "cc/output/copy_output_request.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "components/mus/ws/server_window_surface.h" | 22 #include "components/mus/ws/server_window_surface.h" |
| 23 #include "components/mus/ws/server_window_surface_manager.h" | 23 #include "components/mus/ws/server_window_surface_manager.h" |
| 24 #include "components/mus/ws/window_coordinate_conversions.h" | 24 #include "components/mus/ws/window_coordinate_conversions.h" |
| 25 #include "mojo/converters/geometry/geometry_type_converters.h" | 25 #include "mojo/converters/geometry/geometry_type_converters.h" |
| 26 #include "mojo/converters/input_events/input_events_type_converters.h" | 26 #include "mojo/converters/input_events/input_events_type_converters.h" |
| 27 #include "mojo/converters/input_events/mojo_extended_key_event_data.h" | 27 #include "mojo/converters/input_events/mojo_extended_key_event_data.h" |
| 28 #include "mojo/converters/surfaces/surfaces_type_converters.h" | 28 #include "mojo/converters/surfaces/surfaces_type_converters.h" |
| 29 #include "mojo/converters/surfaces/surfaces_utils.h" | 29 #include "mojo/converters/surfaces/surfaces_utils.h" |
| 30 #include "mojo/converters/transform/transform_type_converters.h" | 30 #include "mojo/converters/transform/transform_type_converters.h" |
| 31 #include "mojo/shell/public/cpp/connection.h" | 31 #include "mojo/shell/public/cpp/connection.h" |
| 32 #include "mojo/shell/public/cpp/shell.h" | 32 #include "mojo/shell/public/cpp/connector.h" |
| 33 #include "third_party/skia/include/core/SkXfermode.h" | 33 #include "third_party/skia/include/core/SkXfermode.h" |
| 34 #include "ui/base/cursor/cursor_loader.h" | 34 #include "ui/base/cursor/cursor_loader.h" |
| 35 #include "ui/events/event.h" | 35 #include "ui/events/event.h" |
| 36 #include "ui/events/event_utils.h" | 36 #include "ui/events/event_utils.h" |
| 37 #include "ui/gfx/display.h" | 37 #include "ui/gfx/display.h" |
| 38 #include "ui/platform_window/platform_ime_controller.h" | 38 #include "ui/platform_window/platform_ime_controller.h" |
| 39 #include "ui/platform_window/platform_window.h" | 39 #include "ui/platform_window/platform_window.h" |
| 40 | 40 |
| 41 #if defined(OS_WIN) | 41 #if defined(OS_WIN) |
| 42 #include "ui/platform_window/win/win_window.h" | 42 #include "ui/platform_window/win/win_window.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 } | 148 } |
| 149 } | 149 } |
| 150 | 150 |
| 151 } // namespace | 151 } // namespace |
| 152 | 152 |
| 153 // static | 153 // static |
| 154 DisplayManagerFactory* DisplayManager::factory_ = nullptr; | 154 DisplayManagerFactory* DisplayManager::factory_ = nullptr; |
| 155 | 155 |
| 156 // static | 156 // static |
| 157 DisplayManager* DisplayManager::Create( | 157 DisplayManager* DisplayManager::Create( |
| 158 mojo::Shell* shell, | 158 mojo::Connector* connector, |
| 159 const scoped_refptr<GpuState>& gpu_state, | 159 const scoped_refptr<GpuState>& gpu_state, |
| 160 const scoped_refptr<SurfacesState>& surfaces_state) { | 160 const scoped_refptr<SurfacesState>& surfaces_state) { |
| 161 if (factory_) | 161 if (factory_) |
| 162 return factory_->CreateDisplayManager(shell, gpu_state, surfaces_state); | 162 return factory_->CreateDisplayManager(connector, gpu_state, surfaces_state); |
| 163 return new DefaultDisplayManager(shell, gpu_state, surfaces_state); | 163 return new DefaultDisplayManager(connector, gpu_state, surfaces_state); |
| 164 } | 164 } |
| 165 | 165 |
| 166 DefaultDisplayManager::DefaultDisplayManager( | 166 DefaultDisplayManager::DefaultDisplayManager( |
| 167 mojo::Shell* shell, | 167 mojo::Connector* connector, |
| 168 const scoped_refptr<GpuState>& gpu_state, | 168 const scoped_refptr<GpuState>& gpu_state, |
| 169 const scoped_refptr<SurfacesState>& surfaces_state) | 169 const scoped_refptr<SurfacesState>& surfaces_state) |
| 170 : shell_(shell), | 170 : connector_(connector), |
| 171 gpu_state_(gpu_state), | 171 gpu_state_(gpu_state), |
| 172 surfaces_state_(surfaces_state), | 172 surfaces_state_(surfaces_state), |
| 173 delegate_(nullptr), | 173 delegate_(nullptr), |
| 174 draw_timer_(false, false), | 174 draw_timer_(false, false), |
| 175 frame_pending_(false), | 175 frame_pending_(false), |
| 176 #if !defined(OS_ANDROID) | 176 #if !defined(OS_ANDROID) |
| 177 cursor_loader_(ui::CursorLoader::Create()), | 177 cursor_loader_(ui::CursorLoader::Create()), |
| 178 #endif | 178 #endif |
| 179 weak_factory_(this) { | 179 weak_factory_(this) { |
| 180 metrics_.size_in_pixels = mojo::Size::New(); | 180 metrics_.size_in_pixels = mojo::Size::New(); |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 | 427 |
| 428 void DefaultDisplayManager::RequestCopyOfOutput( | 428 void DefaultDisplayManager::RequestCopyOfOutput( |
| 429 scoped_ptr<cc::CopyOutputRequest> output_request) { | 429 scoped_ptr<cc::CopyOutputRequest> output_request) { |
| 430 if (top_level_display_client_) | 430 if (top_level_display_client_) |
| 431 top_level_display_client_->RequestCopyOfOutput(std::move(output_request)); | 431 top_level_display_client_->RequestCopyOfOutput(std::move(output_request)); |
| 432 } | 432 } |
| 433 | 433 |
| 434 } // namespace ws | 434 } // namespace ws |
| 435 | 435 |
| 436 } // namespace mus | 436 } // namespace mus |
| OLD | NEW |