1 // Copyright 2020 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 5 #include "chrome/browser/chromeos/input_method/input_host_helper.h" 6 7 #include "ash/public/cpp/window_properties.h" 8 #include "ash/wm/window_util.h" 9 #include "ui/aura/window.h" 10 11 namespace chromeos { 12 13 namespace input_host_helper { 14 PopulateInputHost(InputAssociatedHost * host)15void PopulateInputHost(InputAssociatedHost* host) { 16 aura::Window* window = ash::window_util::GetActiveWindow(); 17 if (window) { 18 // TODO(crbug/163645900): Get app_type via aura::client::kAppType. 19 const std::string* key = window->GetProperty(ash::kAppIDKey); 20 if (key) { 21 host->app_key = *key; 22 } 23 } 24 } 25 26 } // namespace input_host_helper 27 } // namespace chromeos 28