forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpassword_generation_utils.h
29 lines (21 loc) · 1.21 KB
/
password_generation_utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_PASSWORDS_PASSWORD_GENERATION_UTILS_H_
#define IOS_CHROME_BROWSER_PASSWORDS_PASSWORD_GENERATION_UTILS_H_
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
namespace passwords {
// Returns the frame determined by moving |inner_frame| inside |outer_frame|
// for the password generation input accessory views.
CGRect GetGenerationAccessoryFrame(CGRect outer_frame, CGRect inner_frame);
// Block types for |RunSearchPipeline|.
typedef void (^PipelineBlock)(void (^completion)(BOOL));
typedef void (^PipelineCompletionBlock)(NSUInteger index);
// Executes each PipelineBlock in |blocks| in order until one invokes its
// completion with YES, in which case |on_complete| will be invoked with the
// |index| of the succeeding block, or until they all invoke their completions
// with NO, in which case |on_complete| will be invoked with NSNotFound.
void RunSearchPipeline(NSArray* blocks, PipelineCompletionBlock on_complete);
} // namespace passwords
#endif // IOS_CHROME_BROWSER_PASSWORDS_PASSWORD_GENERATION_UTILS_H_