window_tree_host_lookup.cc 570 B

123456789101112131415161718
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "ash/public/cpp/window_tree_host_lookup.h"
  5. #include "ash/root_window_controller.h"
  6. #include "ash/shell.h"
  7. namespace ash {
  8. aura::WindowTreeHost* GetWindowTreeHostForDisplay(int64_t display_id) {
  9. auto* root_window_controller =
  10. Shell::GetRootWindowControllerWithDisplayId(display_id);
  11. return root_window_controller ? root_window_controller->GetHost() : nullptr;
  12. }
  13. } // namespace ash