Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(441)

Side by Side Diff: ash/login/mock_lock_screen_client.h

Issue 2923773003: Adding mojo calls for several lock screen related operations. (Closed)
Patch Set: comments and rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_ 5 #ifndef ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_
6 #define ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_ 6 #define ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_
7 7
8 #include "ash/public/interfaces/lock_screen.mojom.h" 8 #include "ash/public/interfaces/lock_screen.mojom.h"
9 #include "mojo/public/cpp/bindings/binding_set.h" 9 #include "mojo/public/cpp/bindings/binding_set.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 // mojom::LockScreenClient: 32 // mojom::LockScreenClient:
33 void AuthenticateUser(const AccountId& account_id, 33 void AuthenticateUser(const AccountId& account_id,
34 const std::string& password, 34 const std::string& password,
35 bool authenticated_by_pin, 35 bool authenticated_by_pin,
36 AuthenticateUserCallback callback) override; 36 AuthenticateUserCallback callback) override;
37 MOCK_METHOD1(AttemptUnlock, void(const AccountId& account_id)); 37 MOCK_METHOD1(AttemptUnlock, void(const AccountId& account_id));
38 MOCK_METHOD1(HardlockPod, void(const AccountId& account_id)); 38 MOCK_METHOD1(HardlockPod, void(const AccountId& account_id));
39 MOCK_METHOD1(RecordClickOnLockIcon, void(const AccountId& account_id)); 39 MOCK_METHOD1(RecordClickOnLockIcon, void(const AccountId& account_id));
40 MOCK_METHOD1(FocusPod, void(const AccountId& account_id));
41 MOCK_METHOD0(NoPodFocused, void());
42 MOCK_METHOD1(LoadWallpaper, void(const AccountId& account_id));
43 MOCK_METHOD0(SignOutUser, void());
44 MOCK_METHOD1(MaxIncorrectPasswordAttempts, void(const AccountId& account_id));
40 45
41 private: 46 private:
42 bool authenticate_user_callback_result_ = true; 47 bool authenticate_user_callback_result_ = true;
43 48
44 mojo::Binding<ash::mojom::LockScreenClient> binding_; 49 mojo::Binding<ash::mojom::LockScreenClient> binding_;
45 50
46 DISALLOW_COPY_AND_ASSIGN(MockLockScreenClient); 51 DISALLOW_COPY_AND_ASSIGN(MockLockScreenClient);
47 }; 52 };
48 53
49 // Helper method to bind a lock screen client so it receives all mojo calls. 54 // Helper method to bind a lock screen client so it receives all mojo calls.
50 std::unique_ptr<MockLockScreenClient> BindMockLockScreenClient(); 55 std::unique_ptr<MockLockScreenClient> BindMockLockScreenClient();
51 56
52 } // namespace ash 57 } // namespace ash
53 58
54 #endif // ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_ 59 #endif // ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698