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

Unified Diff: chrome/browser/autofill/autofill_external_delegate.cc

Issue 10825324: Start of New Autofill UI for Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebasing Created 8 years, 3 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/autofill_external_delegate.cc
diff --git a/chrome/browser/autofill/autofill_external_delegate.cc b/chrome/browser/autofill/autofill_external_delegate.cc
index a199b06048252b132c5426cffdab26dc74f5e838..912892e852c2f5523f1dbe32fc4f3356ffe78d02 100644
--- a/chrome/browser/autofill/autofill_external_delegate.cc
+++ b/chrome/browser/autofill/autofill_external_delegate.cc
@@ -18,8 +18,7 @@
using content::RenderViewHost;
using WebKit::WebAutofillClient;
-AutofillExternalDelegate::~AutofillExternalDelegate() {
-}
+AutofillExternalDelegate::~AutofillExternalDelegate() {}
AutofillExternalDelegate::AutofillExternalDelegate(
TabContents* tab_contents,
@@ -211,8 +210,12 @@ bool AutofillExternalDelegate::DidAcceptAutofillSuggestions(
}
void AutofillExternalDelegate::ClearPreviewedForm() {
- RenderViewHost* host = tab_contents_->web_contents()->GetRenderViewHost();
- host->Send(new AutofillMsg_ClearPreviewedForm(host->GetRoutingID()));
+ if (tab_contents_ && tab_contents_->web_contents()) {
+ RenderViewHost* host = tab_contents_->web_contents()->GetRenderViewHost();
+
+ if (host)
+ host->Send(new AutofillMsg_ClearPreviewedForm(host->GetRoutingID()));
+ }
}
void AutofillExternalDelegate::HideAutofillPopup() {
@@ -343,11 +346,8 @@ void AutofillExternalDelegate::InsertDataListValues(
data_list_unique_ids_.end());
}
-// Add a "!defined(OS_YOUROS) for each platform that implements this
-// in an autofill_external_delegate_YOUROS.cc. Currently there are
-// none, so all platforms use the default.
-#if !defined(OS_ANDROID) && !defined(TOOLKIT_GTK)
+#if defined(OS_MACOSX)
AutofillExternalDelegate* AutofillExternalDelegate::Create(
TabContents*, AutofillManager*) {

Powered by Google App Engine
This is Rietveld 408576698