test_tray_action_client.cc 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2017 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/tray_action/test_tray_action_client.h"
  5. #include "ash/public/mojom/tray_action.mojom.h"
  6. namespace ash {
  7. TestTrayActionClient::TestTrayActionClient() = default;
  8. TestTrayActionClient::~TestTrayActionClient() = default;
  9. void TestTrayActionClient::ClearRecordedRequests() {
  10. note_origins_.clear();
  11. close_note_reasons_.clear();
  12. }
  13. void TestTrayActionClient::RequestNewLockScreenNote(
  14. mojom::LockScreenNoteOrigin origin) {
  15. note_origins_.push_back(origin);
  16. }
  17. void TestTrayActionClient::CloseLockScreenNote(
  18. mojom::CloseLockScreenNoteReason reason) {
  19. close_note_reasons_.push_back(reason);
  20. }
  21. mojo::PendingRemote<mojom::TrayActionClient>
  22. TestTrayActionClient::CreateRemoteAndBind() {
  23. mojo::PendingRemote<mojom::TrayActionClient> remote;
  24. receiver_.Bind(remote.InitWithNewPipeAndPassReceiver());
  25. return remote;
  26. }
  27. } // namespace ash