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

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
« no previous file with comments | « ash/login/lock_screen_controller_unittest.cc ('k') | ash/public/interfaces/lock_screen.mojom » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(OnFocusPod, void(const AccountId& account_id));
41 MOCK_METHOD0(OnNoPodFocused, void());
42 MOCK_METHOD1(LoadWallpaper, void(const AccountId& account_id));
43 MOCK_METHOD0(SignOutUser, void());
44 MOCK_METHOD1(OnMaxIncorrectPasswordAttempted,
45 void(const AccountId& account_id));
40 46
41 private: 47 private:
42 bool authenticate_user_callback_result_ = true; 48 bool authenticate_user_callback_result_ = true;
43 49
44 mojo::Binding<ash::mojom::LockScreenClient> binding_; 50 mojo::Binding<ash::mojom::LockScreenClient> binding_;
45 51
46 DISALLOW_COPY_AND_ASSIGN(MockLockScreenClient); 52 DISALLOW_COPY_AND_ASSIGN(MockLockScreenClient);
47 }; 53 };
48 54
49 // Helper method to bind a lock screen client so it receives all mojo calls. 55 // Helper method to bind a lock screen client so it receives all mojo calls.
50 std::unique_ptr<MockLockScreenClient> BindMockLockScreenClient(); 56 std::unique_ptr<MockLockScreenClient> BindMockLockScreenClient();
51 57
52 } // namespace ash 58 } // namespace ash
53 59
54 #endif // ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_ 60 #endif // ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_
OLDNEW
« no previous file with comments | « ash/login/lock_screen_controller_unittest.cc ('k') | ash/public/interfaces/lock_screen.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698