| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h" | 5 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/autofill/password_generator.h" | 8 #include "chrome/browser/autofill/password_generator.h" |
| 9 #include "chrome/browser/infobars/infobar_tab_helper.h" | 9 #include "chrome/browser/infobars/infobar_tab_helper.h" |
| 10 #include "chrome/browser/password_manager/password_manager.h" | 10 #include "chrome/browser/password_manager/password_manager.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool TabAutofillManagerDelegate::IsSavingPasswordsEnabled() const { | 60 bool TabAutofillManagerDelegate::IsSavingPasswordsEnabled() const { |
| 61 return PasswordManager::FromWebContents(web_contents_)->IsSavingEnabled(); | 61 return PasswordManager::FromWebContents(web_contents_)->IsSavingEnabled(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 void TabAutofillManagerDelegate::ShowAutofillSettings() { | 64 void TabAutofillManagerDelegate::ShowAutofillSettings() { |
| 65 #if defined(OS_ANDROID) | 65 #if defined(OS_ANDROID) |
| 66 NOTIMPLEMENTED(); | 66 NOTIMPLEMENTED(); |
| 67 #else | 67 #else |
| 68 Browser* browser = browser::FindBrowserWithWebContents(web_contents_); | 68 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); |
| 69 if (browser) | 69 if (browser) |
| 70 chrome::ShowSettingsSubPage(browser, chrome::kAutofillSubPage); | 70 chrome::ShowSettingsSubPage(browser, chrome::kAutofillSubPage); |
| 71 #endif // #if defined(OS_ANDROID) | 71 #endif // #if defined(OS_ANDROID) |
| 72 } | 72 } |
| 73 | 73 |
| 74 void TabAutofillManagerDelegate::ShowPasswordGenerationBubble( | 74 void TabAutofillManagerDelegate::ShowPasswordGenerationBubble( |
| 75 const gfx::Rect& bounds, | 75 const gfx::Rect& bounds, |
| 76 const content::PasswordForm& form, | 76 const content::PasswordForm& form, |
| 77 autofill::PasswordGenerator* generator) { | 77 autofill::PasswordGenerator* generator) { |
| 78 #if defined(OS_ANDROID) | 78 #if defined(OS_ANDROID) |
| 79 NOTIMPLEMENTED(); | 79 NOTIMPLEMENTED(); |
| 80 #else | 80 #else |
| 81 Browser* browser = browser::FindBrowserWithWebContents(web_contents_); | 81 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); |
| 82 browser->window()->ShowPasswordGenerationBubble(bounds, form, generator); | 82 browser->window()->ShowPasswordGenerationBubble(bounds, form, generator); |
| 83 #endif // #if defined(OS_ANDROID) | 83 #endif // #if defined(OS_ANDROID) |
| 84 } | 84 } |
| OLD | NEW |