fake_eche_message_receiver.cc 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright 2021 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/webui/eche_app_ui/fake_eche_message_receiver.h"
  5. namespace ash {
  6. namespace eche_app {
  7. FakeEcheMessageReceiver::FakeEcheMessageReceiver() = default;
  8. FakeEcheMessageReceiver::~FakeEcheMessageReceiver() = default;
  9. void FakeEcheMessageReceiver::FakeGetAppsAccessStateResponse(
  10. eche_app::proto::Result result,
  11. eche_app::proto::AppsAccessState status) {
  12. proto::GetAppsAccessStateResponse response;
  13. response.set_result(result);
  14. response.set_apps_access_state(status);
  15. NotifyGetAppsAccessStateResponse(response);
  16. }
  17. void FakeEcheMessageReceiver::FakeSendAppsSetupResponse(
  18. eche_app::proto::Result result,
  19. eche_app::proto::AppsAccessState status) {
  20. proto::SendAppsSetupResponse response;
  21. response.set_result(result);
  22. response.set_apps_access_state(status);
  23. NotifySendAppsSetupResponse(response);
  24. }
  25. void FakeEcheMessageReceiver::FakeStatusChange(
  26. proto::StatusChangeType status_change_type) {
  27. proto::StatusChange status_change;
  28. status_change.set_type(status_change_type);
  29. NotifyStatusChange(status_change);
  30. }
  31. void FakeEcheMessageReceiver::FakeAppPolicyStateChange(
  32. proto::AppStreamingPolicy app_policy_state) {
  33. proto::PolicyStateChange policy_state_change;
  34. policy_state_change.set_app_policy_state(app_policy_state);
  35. NotifyAppPolicyStateChange(policy_state_change);
  36. }
  37. } // namespace eche_app
  38. } // namespace ash