Path: blob/main/gpu_display/src/gpu_display_win/window_manager.rs
5394 views
// Copyright 2023 The ChromiumOS Authors1// Use of this source code is governed by a BSD-style license that can be2// found in the LICENSE file.34use std::rc::Rc;56use anyhow::Result;7use base::Tube;89use super::math_util::Size;10use super::surface::DisplayProperties;11use super::window::GuiWindow;12use super::window_message_processor::WindowPosMessage;1314pub(crate) struct NoopWindowManager {}1516impl NoopWindowManager {17/// If initialized in fullscreen mode, we would use 16:9 aspect ratio when switching to windowed18/// mode. Note that the caller should call `set_initial_window_pos()` after window messages can19/// be routed to `WindowManager`.20pub fn new(21_window: &GuiWindow,22_display_properties: &DisplayProperties,23_initial_host_viewport_size: Size,24_gpu_main_display_tube: Option<Rc<Tube>>,25) -> Result<Self> {26Ok(Self {})27}2829/// This should be called only after window messages can be routed to `WindowManager`, since we30/// rely on them to properly set the host viewport size after resizing the window.31pub fn set_initial_window_pos(&mut self, _window: &GuiWindow) -> Result<()> {32Ok(())33}3435pub fn handle_display_change(&mut self, _window: &GuiWindow) {}3637pub fn handle_window_pos_message(&mut self, _window: &GuiWindow, _message: &WindowPosMessage) {}38}394041