Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / ui / passwords / password_ui_view.h
blob3bc7732d99fb9fe15452860ab82167e682edc2cb
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_PASSWORDS_PASSWORD_UI_VIEW_H_
6 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORD_UI_VIEW_H_
8 #include "base/memory/scoped_vector.h"
9 #include "ui/gfx/native_widget_types.h"
11 namespace autofill {
12 struct PasswordForm;
15 class Profile;
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
19 // PasswordManagerPresenter.
20 class PasswordUIView {
21 public:
22 virtual ~PasswordUIView() {}
24 // Returns the profile associated with the currently active profile.
25 virtual Profile* GetProfile() = 0;
27 // Reveals the password for the saved password entry.
28 // |index| the index of the saved password entry.
29 // |origin_url| the URL of the saved password entry; obtained via
30 // GetHumanReadableOrigin().
31 // |username| the username of the saved password entry.
32 // |password_value| the value of saved password entry at |index|.
33 virtual void ShowPassword(size_t index,
34 const std::string& origin_url,
35 const std::string& username,
36 const base::string16& password_value) = 0;
38 // Updates the list of passwords in the UI.
39 // |password_list| the list of saved password entries.
40 // |show_passwords| true if the passwords should be shown in the UI.
41 virtual void SetPasswordList(
42 const ScopedVector<autofill::PasswordForm>& password_list,
43 bool show_passwords) = 0;
45 // Updates the list of password exceptions in the UI.
46 // |password_exception_list| The list of saved password exceptions.
47 virtual void SetPasswordExceptionList(
48 const ScopedVector<autofill::PasswordForm>& password_exception_list) = 0;
49 #if !defined(OS_ANDROID)
50 // Returns the top level NativeWindow for the view.
51 virtual gfx::NativeWindow GetNativeWindow() const = 0;
52 #endif
55 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORD_UI_VIEW_H_