1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18

ash / window_tree_host_lookup.cc [blame]

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ash/public/cpp/window_tree_host_lookup.h"

#include "ash/root_window_controller.h"
#include "ash/shell.h"

namespace ash {

aura::WindowTreeHost* GetWindowTreeHostForDisplay(int64_t display_id) {
  auto* root_window_controller =
      Shell::GetRootWindowControllerWithDisplayId(display_id);
  return root_window_controller ? root_window_controller->GetHost() : nullptr;
}

}  // namespace ash