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

Side by Side Diff: chrome/browser/ui/passwords/password_ui_view.h

Issue 1142693003: Implement the chrome.passwordsPrivate API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add password_ui_view_android.h. Created 5 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_BROWSER_UI_PASSWORDS_PASSWORD_UI_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_PASSWORD_UI_VIEW_H_
6 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORD_UI_VIEW_H_ 6 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORD_UI_VIEW_H_
7 7
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 10
11 namespace autofill { 11 namespace autofill {
12 struct PasswordForm; 12 struct PasswordForm;
13 } 13 }
14 14
15 class Profile; 15 class Profile;
16 16
17 // An interface for a passwords UI View. A UI view is responsible for 17 // An interface for a passwords UI View. A UI view is responsible for
18 // displaying passwords in the UI and routing UI commands to the 18 // displaying passwords in the UI and routing UI commands to the
19 // PasswordManagerPresenter. 19 // PasswordManagerPresenter.
20 class PasswordUIView { 20 class PasswordUIView {
21 public: 21 public:
22 virtual ~PasswordUIView() {} 22 virtual ~PasswordUIView() {}
23 23
24 // Returns the profile associated with the currently active profile. 24 // Returns the profile associated with the currently active profile.
25 virtual Profile* GetProfile() = 0; 25 virtual Profile* GetProfile() = 0;
26 26
27 // Reveals the password for the saved password entry at |index| in the UI. 27 // Reveals the password for the saved password entry with origin URL
28 // |origin_url| and username |username| at index |index| in the UI.
28 // |index| the index of the saved password entry. 29 // |index| the index of the saved password entry.
vabr (Chromium) 2015/05/22 09:00:25 nit: This comment line and some below seem to dupl
Kyle Horimoto 2015/05/22 17:52:53 Done.
30 // |origin_url| the URL of the saved password entry; should be obtained using
31 // GetHumanReadableOrigin().
32 // |username| the username of the saved password entry.
29 // |password_value| the value of saved password entry at |index|. 33 // |password_value| the value of saved password entry at |index|.
30 virtual void ShowPassword(size_t index, 34 virtual void ShowPassword(size_t index,
35 const std::string& origin_url,
36 const std::string& username,
31 const base::string16& password_value) = 0; 37 const base::string16& password_value) = 0;
32 38
33 // Updates the list of passwords in the UI. 39 // Updates the list of passwords in the UI.
34 // |password_list| the list of saved password entries. 40 // |password_list| the list of saved password entries.
35 // |show_passwords| true if the passwords should be shown in the UI. 41 // |show_passwords| true if the passwords should be shown in the UI.
36 virtual void SetPasswordList( 42 virtual void SetPasswordList(
37 const ScopedVector<autofill::PasswordForm>& password_list, 43 const ScopedVector<autofill::PasswordForm>& password_list,
38 bool show_passwords) = 0; 44 bool show_passwords) = 0;
39 45
40 // Updates the list of password exceptions in the UI. 46 // Updates the list of password exceptions in the UI.
41 // |password_exception_list| The list of saved password exceptions. 47 // |password_exception_list| The list of saved password exceptions.
42 virtual void SetPasswordExceptionList( 48 virtual void SetPasswordExceptionList(
43 const ScopedVector<autofill::PasswordForm>& password_exception_list) = 0; 49 const ScopedVector<autofill::PasswordForm>& password_exception_list) = 0;
44 #if !defined(OS_ANDROID) 50 #if !defined(OS_ANDROID)
45 // Returns the top level NativeWindow for the view. 51 // Returns the top level NativeWindow for the view.
46 virtual gfx::NativeWindow GetNativeWindow() const = 0; 52 virtual gfx::NativeWindow GetNativeWindow() const = 0;
47 #endif 53 #endif
48 }; 54 };
49 55
50 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORD_UI_VIEW_H_ 56 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORD_UI_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698