summaryrefslogtreecommitdiffstats
path: root/ios/chrome/browser/passwords/password_generation_utils.h
diff options
context:
space:
mode:
authordroger <droger@chromium.org>2015-03-23 10:51:03 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-23 17:51:56 +0000
commit69b5fc8fc036b5ade5e1498d368ef5c49fb74e48 (patch)
tree928eef46c2a61c848b40c8b2cabab66cfa2686a0 /ios/chrome/browser/passwords/password_generation_utils.h
parent744256e2f3933feaa05c967541afac36825056fa (diff)
downloadchromium_src-69b5fc8fc036b5ade5e1498d368ef5c49fb74e48.zip
chromium_src-69b5fc8fc036b5ade5e1498d368ef5c49fb74e48.tar.gz
chromium_src-69b5fc8fc036b5ade5e1498d368ef5c49fb74e48.tar.bz2
[iOS] Upstream files in //ios/chrome/browser/autofill
BUG=437508 Review URL: https://codereview.chromium.org/1022463002 Cr-Commit-Position: refs/heads/master@{#321805}
Diffstat (limited to 'ios/chrome/browser/passwords/password_generation_utils.h')
-rw-r--r--ios/chrome/browser/passwords/password_generation_utils.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/ios/chrome/browser/passwords/password_generation_utils.h b/ios/chrome/browser/passwords/password_generation_utils.h
new file mode 100644
index 0000000..63e485b
--- /dev/null
+++ b/ios/chrome/browser/passwords/password_generation_utils.h
@@ -0,0 +1,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_