shell_app_window_client_aura.cc 843 B

12345678910111213141516171819202122232425
  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
  3. // found in the LICENSE file.
  4. #include "extensions/shell/browser/shell_app_window_client.h"
  5. #include <memory>
  6. #include "extensions/browser/app_window/app_window.h"
  7. #include "extensions/shell/browser/desktop_controller.h"
  8. #include "extensions/shell/browser/shell_native_app_window_aura.h"
  9. namespace extensions {
  10. std::unique_ptr<NativeAppWindow> ShellAppWindowClient::CreateNativeAppWindow(
  11. AppWindow* window,
  12. AppWindow::CreateParams* params) {
  13. auto native_app_window =
  14. std::make_unique<ShellNativeAppWindowAura>(window, *params);
  15. DesktopController::instance()->AddAppWindow(
  16. window, native_app_window->GetNativeWindow());
  17. return native_app_window;
  18. }
  19. } // namespace extensions