| OLD | NEW |
| 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_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ | 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ |
| 7 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "base/memory/scoped_vector.h" | |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/time/clock.h" | 13 #include "base/time/clock.h" |
| 14 #include "components/autofill/core/common/password_form.h" | 14 #include "components/autofill/core/common/password_form.h" |
| 15 #include "components/password_manager/core/browser/password_manager_metrics_util
.h" | 15 #include "components/password_manager/core/browser/password_manager_metrics_util
.h" |
| 16 #include "components/password_manager/core/browser/statistics_table.h" | 16 #include "components/password_manager/core/browser/statistics_table.h" |
| 17 #include "components/password_manager/core/common/password_manager_ui.h" | 17 #include "components/password_manager/core/common/password_manager_ui.h" |
| 18 #include "ui/gfx/range/range.h" | 18 #include "ui/gfx/range/range.h" |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 class WebContents; | 21 class WebContents; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // clicked. | 81 // clicked. |
| 82 void OnSkipSignInClicked(); | 82 void OnSkipSignInClicked(); |
| 83 | 83 |
| 84 password_manager::ui::State state() const { return state_; } | 84 password_manager::ui::State state() const { return state_; } |
| 85 | 85 |
| 86 const base::string16& title() const { return title_; } | 86 const base::string16& title() const { return title_; } |
| 87 const autofill::PasswordForm& pending_password() const { | 87 const autofill::PasswordForm& pending_password() const { |
| 88 return pending_password_; | 88 return pending_password_; |
| 89 } | 89 } |
| 90 // Returns the available credentials which match the current site. | 90 // Returns the available credentials which match the current site. |
| 91 const ScopedVector<const autofill::PasswordForm>& local_credentials() const { | 91 const std::vector<autofill::PasswordForm>& local_credentials() const { |
| 92 return local_credentials_; | 92 return local_credentials_; |
| 93 } | 93 } |
| 94 const base::string16& manage_link() const { return manage_link_; } | 94 const base::string16& manage_link() const { return manage_link_; } |
| 95 const base::string16& save_confirmation_text() const { | 95 const base::string16& save_confirmation_text() const { |
| 96 return save_confirmation_text_; | 96 return save_confirmation_text_; |
| 97 } | 97 } |
| 98 const gfx::Range& save_confirmation_link_range() const { | 98 const gfx::Range& save_confirmation_link_range() const { |
| 99 return save_confirmation_link_range_; | 99 return save_confirmation_link_range_; |
| 100 } | 100 } |
| 101 | 101 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 GetUpdateDismissalReason(UserBehaviorOnUpdateBubble behavior) const; | 137 GetUpdateDismissalReason(UserBehaviorOnUpdateBubble behavior) const; |
| 138 // URL of the page from where this bubble was triggered. | 138 // URL of the page from where this bubble was triggered. |
| 139 GURL origin_; | 139 GURL origin_; |
| 140 password_manager::ui::State state_; | 140 password_manager::ui::State state_; |
| 141 base::string16 title_; | 141 base::string16 title_; |
| 142 // Range of characters in the title that contains the Smart Lock Brand and | 142 // Range of characters in the title that contains the Smart Lock Brand and |
| 143 // should point to an article. For the default title the range is empty. | 143 // should point to an article. For the default title the range is empty. |
| 144 gfx::Range title_brand_link_range_; | 144 gfx::Range title_brand_link_range_; |
| 145 autofill::PasswordForm pending_password_; | 145 autofill::PasswordForm pending_password_; |
| 146 bool password_overridden_; | 146 bool password_overridden_; |
| 147 ScopedVector<const autofill::PasswordForm> local_credentials_; | 147 std::vector<autofill::PasswordForm> local_credentials_; |
| 148 base::string16 manage_link_; | 148 base::string16 manage_link_; |
| 149 base::string16 save_confirmation_text_; | 149 base::string16 save_confirmation_text_; |
| 150 gfx::Range save_confirmation_link_range_; | 150 gfx::Range save_confirmation_link_range_; |
| 151 | 151 |
| 152 // Responsible for recording all the interactions required. | 152 // Responsible for recording all the interactions required. |
| 153 std::unique_ptr<InteractionKeeper> interaction_keeper_; | 153 std::unique_ptr<InteractionKeeper> interaction_keeper_; |
| 154 | 154 |
| 155 // A bridge to ManagePasswordsUIController instance. | 155 // A bridge to ManagePasswordsUIController instance. |
| 156 base::WeakPtr<PasswordsModelDelegate> delegate_; | 156 base::WeakPtr<PasswordsModelDelegate> delegate_; |
| 157 | 157 |
| 158 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); | 158 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ | 161 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ |
| OLD | NEW |