Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / components / password_manager / core / common / password_manager_ui.h
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 COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_PASSWORD_MANAGER_UI_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_PASSWORD_MANAGER_UI_H_
7
8 #include "base/basictypes.h"
9
10 namespace password_manager {
11
12 namespace ui {
13
14 // The current state of the password manager's UI.
15 enum State {
16   // The password manager has nothing to do with the current site.
17   INACTIVE_STATE,
18
19   // A password has been typed in and submitted successfully. Now we need to
20   // display an Omnibox icon, and pop up a bubble asking the user whether
21   // they'd like to save the password.
22   PENDING_PASSWORD_AND_BUBBLE_STATE,
23
24   // A password is pending, but we don't need to pop up a bubble.
25   PENDING_PASSWORD_STATE,
26
27   // A password has been autofilled, or has just been saved. The icon needs
28   // to be visible, in the management state.
29   MANAGE_STATE,
30
31   // The user has blacklisted the site rendered in the current WebContents.
32   // The icon needs to be visible, in the blacklisted state.
33   BLACKLIST_STATE,
34 };
35
36 // Returns true if |state| represents a pending password.
37 bool IsPendingState(State state);
38
39 }  // namespace ui
40
41 }  // namespace password_manager
42
43 #endif  // COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_PASSWORD_MANAGER_UI_H_