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

Side by Side Diff: chrome/browser/ui/android/autofill/password_generation_popup_view_android.h

Issue 606153002: [android] Password generation UI for android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove platform guards. Created 6 years, 1 month 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
(Empty)
1 // Copyright 2014 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
5 #ifndef CHROME_BROWSER_UI_ANDROID_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_ANDROI D_H_
6 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_ANDROI D_H_
7
8 #include <jni.h>
9
10 #include "base/android/scoped_java_ref.h"
11 #include "base/compiler_specific.h"
12 #include "chrome/browser/ui/autofill/password_generation_popup_view.h"
13
14 namespace autofill {
15
16 class PasswordGenerationPopupController;
17
18 // The android implementation of the password generation UI.
19 class PasswordGenerationPopupViewAndroid : public PasswordGenerationPopupView {
20 public:
21 // Builds the UI for the |controller|.
22 explicit PasswordGenerationPopupViewAndroid(
23 PasswordGenerationPopupController* controller);
24
25 // Called from JNI when the "saved passwords" link was clicked.
26 void SavedPasswordsLinkClicked(JNIEnv* env, jobject obj);
27
28 // Called from JNI when the popup was dismissed.
29 void Dismissed(JNIEnv* env, jobject obj);
30
31 // Called from JNI when the suggested password was selected.
32 void PasswordSelected(JNIEnv* env, jobject object);
33
34 // Registers the popup with JNI.
35 static bool Register(JNIEnv* env);
36
37 private:
38 // The popup owns itself.
39 virtual ~PasswordGenerationPopupViewAndroid();
40
41 // PasswordGenerationPopupView implementation.
42 virtual void Show() override;
43 virtual void Hide() override;
44 virtual gfx::Size GetPreferredSizeOfPasswordView() override;
45 virtual void UpdateBoundsAndRedrawPopup() override;
46 virtual void PasswordSelectionUpdated() override;
47 virtual bool IsPointInPasswordBounds(const gfx::Point& point) override;
48
49 // Weak pointer to the controller.
50 PasswordGenerationPopupController* controller_;
51
52 // The corresponding java object.
53 base::android::ScopedJavaGlobalRef<jobject> java_object_;
54
55 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationPopupViewAndroid);
56 };
57
58 } // namespace autofill
59
60 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_AND ROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698