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

Side by Side Diff: chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc

Issue 11434074: browser: Move FindBrowserWithWebContents() into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc ('k') | chrome/browser/ui/browser_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698