app_launch_info.cc 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. #include "components/app_restore/app_launch_info.h"
  5. #include <utility>
  6. namespace app_restore {
  7. AppLaunchInfo::AppLaunchInfo(const std::string& app_id,
  8. int32_t window_id,
  9. apps::LaunchContainer container,
  10. WindowOpenDisposition disposition,
  11. int64_t display_id,
  12. std::vector<base::FilePath> launch_files,
  13. apps::IntentPtr intent)
  14. : app_id(app_id),
  15. window_id(window_id),
  16. container(static_cast<int32_t>(container)),
  17. disposition(static_cast<int32_t>(disposition)),
  18. display_id(display_id),
  19. file_paths(std::move(launch_files)),
  20. intent(std::move(intent)) {}
  21. AppLaunchInfo::AppLaunchInfo(const std::string& app_id, int32_t session_id)
  22. : app_id(app_id), window_id(session_id) {}
  23. AppLaunchInfo::AppLaunchInfo(const std::string& app_id,
  24. apps::LaunchContainer container,
  25. WindowOpenDisposition disposition,
  26. int64_t display_id,
  27. std::vector<base::FilePath> launch_files,
  28. apps::IntentPtr intent)
  29. : app_id(app_id),
  30. container(static_cast<int32_t>(container)),
  31. disposition(static_cast<int32_t>(disposition)),
  32. display_id(display_id),
  33. file_paths(std::move(launch_files)),
  34. intent(std::move(intent)) {}
  35. AppLaunchInfo::AppLaunchInfo(const std::string& app_id,
  36. int32_t event_flags,
  37. int32_t arc_session_id,
  38. int64_t display_id)
  39. : app_id(app_id),
  40. event_flag(event_flags),
  41. arc_session_id(arc_session_id),
  42. display_id(display_id) {}
  43. AppLaunchInfo::AppLaunchInfo(const std::string& app_id,
  44. int32_t event_flags,
  45. apps::IntentPtr intent,
  46. int32_t arc_session_id,
  47. int64_t display_id)
  48. : app_id(app_id),
  49. event_flag(event_flags),
  50. arc_session_id(arc_session_id),
  51. display_id(display_id),
  52. intent(std::move(intent)) {}
  53. AppLaunchInfo::AppLaunchInfo(const std::string& app_id,
  54. const std::string& handler_id,
  55. std::vector<base::FilePath> files)
  56. : app_id(app_id), handler_id(handler_id), file_paths(std::move(files)) {}
  57. AppLaunchInfo::~AppLaunchInfo() = default;
  58. } // namespace app_restore