This commit adds missing Autofill support from m40.
Tested on org.tizen.browser on gmail registration page
(http://accounts.google.com/SignUp)
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=12547
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=12730
Reviewed by: Antonio Gomes, Piotr Tworek, SeungSeop Park
Change-Id: I63d2f633ab8c672695e8de4b8bd3f60515177c71
Signed-off-by: Michał Obrembski <m.obrembski@samsung.com>
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "autofill_popup_view_efl.h"
#include "base/path_service.h"
evas_object_propagate_events_set(autofill_popup_, false);
}
+bool isAutofillSpecial(autofill::Suggestion suggestion) {
+ return suggestion.frontend_id < 0;
+}
+
void AutofillPopupViewEfl::InitFormData(
- const std::vector<base::string16>& values,
- const std::vector<base::string16>& labels,
- const std::vector<base::string16>& icons,
- const std::vector<int>& identifiers,
+ const std::vector<autofill::Suggestion>& suggestions,
base::WeakPtr<AutofillPopupDelegate> delegate){
- values_ = values;
+ values_ = suggestions;
+ // m42 adds some "special" autofill sugesstions.
+ // This suggestions, like list separator is not useful for us
+ // so, let's delete them.
+ values_.erase(
+ std::remove_if(values_.begin(), values_.end(), isAutofillSpecial),
+ values_.end());
+
for (size_t i = 0; i < values_.size(); ++i) {
- std::string value = UTF16ToUTF8(values_[i]);
- std::string label = UTF16ToUTF8(labels[i]);
+ std::string value = UTF16ToUTF8(suggestions[i].value);
+ std::string label = UTF16ToUTF8(suggestions[i].label);
if(!label.empty())
snprintf(labels_[i], sizeof(labels_[i]), "%s (%s)", value.c_str(),
label.c_str());
else
snprintf(labels_[i], sizeof(labels_[i]), "%s", value.c_str());
}
- icons_ = icons;
- identifiers_ = identifiers;
delegate_ = delegate;
selected_line_ = -1;
}
{
if (delegate_) {
if (index < values_.size())
- delegate_->DidAcceptSuggestion(values_[index], identifiers_[index]);
+ delegate_->DidAcceptSuggestion(values_[index].value, index);
}
}
selected_line_ = selected_line;
if(delegate_) {
if (selected_line_ < values_.size()) {
- delegate_->DidSelectSuggestion(values_[selected_line],
- identifiers_[selected_line_]);
+ delegate_->DidSelectSuggestion(values_[selected_line].value,
+ selected_line);
}
else {
delegate_->ClearPreviewedForm();
#ifndef AUTOFILL_POPUP_EFL_H
#define AUTOFILL_POPUP_EFL_H
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include <Ecore.h>
#include <Ecore_X.h>
#include "browser/password_manager/password_form_manager.h"
#include "components/autofill/core/browser/autofill_popup_delegate.h"
+#include "components/autofill/core/browser/suggestion.h"
#include "ui/gfx/geometry/point.h"
+#include "ui/gfx/screen.h"
using namespace password_manager;
class EWebView;
+namespace gfx {
+class RectF;
+}
+
namespace autofill {
class AutofillPopupViewEfl {
void ShowSavePasswordPopup(PasswordFormManager * form_to_save);
void UpdateFormDataPopup(const gfx::RectF& bounds);
void InitFormData(
- const std::vector<base::string16>& values,
- const std::vector<base::string16>& labels,
- const std::vector<base::string16>& icons,
- const std::vector<int>& identifiers,
- base::WeakPtr<AutofillPopupDelegate> delegate);
+ const std::vector<autofill::Suggestion>& suggestions,
+ base::WeakPtr<AutofillPopupDelegate> delegate);
void AcceptSuggestion(size_t index);
void AcceptPasswordSuggestion(int option);
void SetSelectedLine(size_t index);
Evas_Object* autofill_popup_;
Evas_Object* autofill_list_;
Evas_Object* password_popup_;
- std::vector<base::string16> values_;
- std::vector<base::string16> icons_;
- std::vector<int> identifiers_;
+ std::vector<autofill::Suggestion> values_;
size_t selected_line_;
base::WeakPtr<AutofillPopupDelegate> delegate_;
PasswordFormManager * form_manager_;
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "browser/autofill/autofill_manager_delegate_efl.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/browser_thread.h"
#include "ui/gfx/geometry/rect.h"
+#include "private/ewk_context_private.h"
DEFINE_WEB_CONTENTS_USER_DATA_KEY(autofill::AutofillManagerDelegateEfl);
-using namespace password_manager;
namespace autofill {
void AutofillManagerDelegateEfl::ShowRequestAutocompleteDialog(
const autofill::FormData& form,
- const GURL& source_url,
+ content::RenderFrameHost* rfh,
const ResultCallback& callback) {
HideRequestAutocompleteDialog();
NOTIMPLEMENTED();
void AutofillManagerDelegateEfl::ShowAutofillPopup(
const gfx::RectF& element_bounds,
base::i18n::TextDirection text_direction,
- const std::vector<base::string16>& values,
- const std::vector<base::string16>& labels,
- const std::vector<base::string16>& icons,
- const std::vector<int>& identifiers,
- base::WeakPtr<AutofillPopupDelegate> delegate) {
+ const std::vector<autofill::Suggestion>& suggestions,
+ base::WeakPtr<autofill::AutofillPopupDelegate> delegate) {
DCHECK(web_contents_);
// Do not show sugestions when Remember form data is disabled
if (!IsAutocompleteSavingEnabled())
#endif
if (GetOrCreatePopupController()) {
- popup_controller_->InitFormData(values,labels,icons,identifiers,delegate);
+ popup_controller_->InitFormData(suggestions, delegate);
#if defined(OS_TIZEN)
popup_controller_->UpdateFormDataPopup(element_bounds_in_screen_space);
#else
}
}
-void AutofillManagerDelegateEfl::UpdateAutofillPopupDataListValues(const std::vector<base::string16>& values, const std::vector<base::string16>& labels) {
+void AutofillManagerDelegateEfl::ShowUnmaskPrompt(
+ const autofill::CreditCard& card,
+ base::WeakPtr<autofill::CardUnmaskDelegate> delegate) {
+ NOTIMPLEMENTED();
+}
+
+void AutofillManagerDelegateEfl::UpdateAutofillPopupDataListValues(
+ const std::vector<base::string16>& values,
+ const std::vector<base::string16>& labels) {
+ NOTIMPLEMENTED();
+}
+
+void AutofillManagerDelegateEfl::OnUnmaskVerificationResult(bool success) {
+ NOTIMPLEMENTED();
+}
+
+bool AutofillManagerDelegateEfl::HasCreditCardScanFeature() {
+ return false;
+}
+
+void AutofillManagerDelegateEfl::ScanCreditCard(
+ const CreditCardScanCallback& callback) {
+ NOTIMPLEMENTED();
+}
+
+void AutofillManagerDelegateEfl::OnFirstUserGestureObserved() {
NOTIMPLEMENTED();
}
+void AutofillManagerDelegateEfl::LinkClicked(
+ const GURL& url,
+ WindowOpenDisposition disposition) {
+ NOTIMPLEMENTED();
+}
+
+IdentityProvider* AutofillManagerDelegateEfl::GetIdentityProvider() {
+ return nullptr;
+}
+
void AutofillManagerDelegateEfl::HideAutofillPopup() {
DCHECK(web_contents_);
if (popup_controller_) {
}
bool AutofillManagerDelegateEfl::IsAutocompleteEnabled() {
- if(webview_)
+ if (webview_)
return webview_->GetSettings()->autofillProfileForm();
return false;
}
bool AutofillManagerDelegateEfl::IsAutocompleteSavingEnabled() {
- if(webview_)
+ if (webview_)
return webview_->GetSettings()->formCandidateData();
return false;
}
HideAutofillPopup();
}
-void AutofillManagerDelegateEfl::DetectAccountCreationForms(const std::vector<autofill::FormStructure*>& forms) {
+void AutofillManagerDelegateEfl::DetectAccountCreationForms(
+ content::RenderFrameHost* rfh,
+ const std::vector<autofill::FormStructure*>& forms) {
DCHECK(web_contents_);
PasswordGenerationManager* manager =
PasswordManagerClientEfl::GetGenerationManagerFromWebContents(
#ifndef AUTOFILL_MANAGER_DELEGATE_EFL_H
#define AUTOFILL_MANAGER_DELEGATE_EFL_H
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "eweb_view.h"
#include "base/callback.h"
const base::Closure& save_card_callback) override;
void ShowRequestAutocompleteDialog(
const autofill::FormData& form,
- const GURL& source_url,
+ content::RenderFrameHost* rfh,
const ResultCallback& callback) override;
void ShowAutofillPopup(
const gfx::RectF& element_bounds,
base::i18n::TextDirection text_direction,
- const std::vector<base::string16>& values,
- const std::vector<base::string16>& labels,
- const std::vector<base::string16>& icons,
- const std::vector<int>& identifiers,
- base::WeakPtr<AutofillPopupDelegate> delegate) override;
+ const std::vector<autofill::Suggestion>& suggestions,
+ base::WeakPtr<autofill::AutofillPopupDelegate> delegate) override;
+ void ShowUnmaskPrompt(
+ const autofill::CreditCard& card,
+ base::WeakPtr<autofill::CardUnmaskDelegate> delegate) override;
void UpdateAutofillPopupDataListValues(
const std::vector<base::string16>& values,
const std::vector<base::string16>& labels) override;
+ void OnUnmaskVerificationResult(bool success) override;
+ bool HasCreditCardScanFeature() override;
+ void ScanCreditCard(const CreditCardScanCallback& callback) override;
+ void OnFirstUserGestureObserved() override;
+ void LinkClicked(const GURL& url, WindowOpenDisposition disposition) override;
+ IdentityProvider* GetIdentityProvider() override;
void HideAutofillPopup() override;
bool IsAutocompleteEnabled() override;
- bool IsAutocompleteSavingEnabled() override;
+ bool IsAutocompleteSavingEnabled();
void DetectAccountCreationForms(
+ content::RenderFrameHost* rfh,
const std::vector<autofill::FormStructure*>& forms) override;
// content::WebContentsObserver implementation.
void DidNavigateMainFrame(const content::LoadCommittedDetails& details,
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "browser/autofill/personal_data_manager_factory.h"
#ifndef PERSONAL_DATA_MANAGER_FACTORY_H
#define PERSONAL_DATA_MANAGER_FACTORY_H
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "base/id_map.h"
#include "base/strings/string16.h"
#include "base/compiler_specific.h"
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "browser/password_manager/content_password_manager_driver.h"
}
autofill::AutofillManager* ContentPasswordManagerDriver::GetAutofillManager() {
- autofill::ContentAutofillDriver* driver =
+ autofill::ContentAutofillDriverFactory* factory =
autofill::ContentAutofillDriverFactory::FromWebContents(web_contents());
- return driver ? driver->autofill_manager() : NULL;
+ return factory
+ ? factory->DriverForFrame(web_contents()->GetMainFrame())
+ ->autofill_manager()
+ : nullptr;
}
void ContentPasswordManagerDriver::AllowPasswordGenerationForForm(
#ifndef CONTENT_PASSWORD_MANAGER_DRIVER_H
#define CONTENT_PASSWORD_MANAGER_DRIVER_H
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "base/basictypes.h"
#include "base/compiler_specific.h"
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "browser/password_manager/password_form_manager.h"
}
void PasswordFormManager::OnRequestDone(
- const std::vector<PasswordForm*>& logins_result) {
+ ScopedVector<autofill::PasswordForm> logins_result) {
// Note that the result gets deleted after this call completes, but we own
// the PasswordForm objects pointed to by the result vector, thus we keep
// copies to a minimum here.
driver_->AllowPasswordGenerationForForm(&observed_form_);
return;
}
- OnRequestDone(results);
+ OnRequestDone(results.Pass());
}
bool PasswordFormManager::IgnoreResult(const PasswordForm& form) const {
#ifndef PASSWORD_FORM_MANAGER_H
#define PASSWORD_FORM_MANAGER_H
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include <string>
#include <vector>
// Determines if we need to autofill given the results of the query.
// Takes ownership of the elements in |result|.
- void OnRequestDone(const std::vector<autofill::PasswordForm*>& result);
+ void OnRequestDone(ScopedVector<autofill::PasswordForm> result);
void OnGetPasswordStoreResults(
ScopedVector<autofill::PasswordForm> results) override;
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "browser/password_manager/password_generation_manager.h"
#ifndef PASSWORD_GENERATION_MANAGER_H
#define PASSWORD_GENERATION_MANAGER_H
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include <vector>
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "browser/password_manager/password_manager.h"
#ifndef PASSWORD_MANAGER_H
#define PASSWORD_MANAGER_H
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include <vector>
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "browser/password_manager/password_manager_client.h"
#ifndef PASSWORD_MANAGER_CLIENT_H
#define PASSWORD_MANAGER_CLIENT_H
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "base/metrics/field_trial.h"
#include "components/autofill/core/common/password_form.h"
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "browser/password_manager/password_manager_client_efl.h"
#include "browser/autofill/autofill_manager_delegate_efl.h"
#ifndef PASSWORD_MANAGER_CLIENT_EFL_H
#define PASSWORD_MANAGER_CLIENT_EFL_H
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#ifndef PASSWORD_MANAGER_DRIVER_H
#define PASSWORD_MANAGER_DRIVER_H
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
namespace autofill {
class AutofillManager;
#ifndef PASSWORD_MANAGER_UTIL_H
#define PASSWORD_MANAGER_UTIL_H
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "base/basictypes.h"
#include "ui/gfx/native_widget_types.h"
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "browser/password_manager/password_manager_util.h"
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "browser/password_manager/password_store_factory.h"
base::FilePath login_db_file_path = db_path.Append(FILE_PATH_LITERAL(".LoginData.db"));
- scoped_ptr<LoginDatabase> login_db(new LoginDatabase());
+ scoped_ptr<LoginDatabase> login_db(new LoginDatabase(login_db_file_path));
{
base::ThreadRestrictions::ScopedAllowIO allow_io;
- if (!login_db->Init(login_db_file_path)) {
+ if (!login_db->Init()) {
LOG(ERROR) << "Could not initialize login database.";
return;
}
scoped_refptr<PasswordStore> ps;
ps = new PasswordStoreDefault(
- main_thread_runner, db_thread_runner, login_db.release());
+ main_thread_runner, db_thread_runner, login_db.Pass());
if (!ps.get() || !ps->Init(syncer::SyncableService::StartSyncFlare())) {
NOTREACHED() << "Could not initialize password manager.";
return;
#ifndef PASSWORD_STORE_FACTORY_H
#define PASSWORD_STORE_FACTORY_H
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "base/basictypes.h"
#include "base/memory/singleton.h"
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "browser/webdata/web_data_service.h"
#ifndef WEB_DATA_SERVICE_H
#define WEB_DATA_SERVICE_H
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include <map>
#include <string>
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "browser/webdata/web_data_service_factory.h"
#ifndef WEB_DATA_SERVICE_FACTORY_H
#define WEB_DATA_SERVICE_FACTORY_H
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
{
'variables': {
'edje_compiler%': 'edje_cc',
+ 'tizen_autofill_support%': 1,
# Components used to auto generate CHROMIUM_VERSION preprocessor define.
'version_file' : '<(DEPTH)/chrome/VERSION',
'defines': [
'HAVE_ECORE_X=<!(if pkg-config ecore-x; then echo 1; fi)',
- # TODO: Autofill has changed significantly in M42 compared to
- # M40. Disable it until it is fixed.
- #'TIZEN_AUTOFILL_SUPPORT=1',
'CHROMIUM_VERSION=\"<!(python <(version_script) -f <(version_file) -t "<(version_pattern)")\"',
],
'link_settings': {
],
}],
+ ['tizen_autofill_support==1', {
+ 'defines': [
+ 'TIZEN_AUTOFILL_SUPPORT=1',
+ ],
+ }],
+
['use_allocator=="tcmalloc"', {
'dependencies': [
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
}
void EWebContext::ClearCandidateData() {
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
#include "ewk_context_form_autofill_profile_private.h"
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include <vector>
#include <string>
#include "components/autofill/core/browser/personal_data_manager.h"
#include "eweb_view.h"
#include "ewk_autofill_profile_private.h"
+#include "private/ewk_context_private.h"
namespace autofill {
class PersonalDataManagerFactory;
#ifndef ewk_context_form_autofill_profile_private_h
#define ewk_context_form_autofill_profile_private_h
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include <Evas.h>
#include "content/renderer/tts_dispatcher_efl.h"
#endif
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "components/autofill/content/renderer/autofill_agent.h"
#include "components/autofill/content/renderer/password_autofill_agent.h"
#include "components/autofill/content/renderer/password_generation_agent.h"
#include "content/common/wrt/wrt_url_parse.h"
#include "wrt/wrtwidget.h"
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
using autofill::AutofillAgent;
using autofill::PasswordAutofillAgent;
using autofill::PasswordGenerationAgent;
void ContentRendererClientEfl::RenderFrameCreated(content::RenderFrame* render_frame) {
new content::RenderFrameObserverEfl(render_frame);
-}
-
-void ContentRendererClientEfl::RenderViewCreated(content::RenderView* render_view) {
- // Deletes itself when render_view is destroyed.
- new RenderViewObserverEfl(render_view, this);
- new editing::EditorClientAgent(render_view);
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
PasswordGenerationAgent* password_generation_agent =
- new PasswordGenerationAgent(render_view);
+ new PasswordGenerationAgent(render_frame);
PasswordAutofillAgent* password_autofill_agent =
- new PasswordAutofillAgent(render_view);
- new AutofillAgent(render_view,
+ new PasswordAutofillAgent(render_frame);
+ new AutofillAgent(render_frame,
password_autofill_agent,
password_generation_agent);
#endif
+}
+
+void ContentRendererClientEfl::RenderViewCreated(content::RenderView* render_view) {
+ // Deletes itself when render_view is destroyed.
+ new RenderViewObserverEfl(render_view, this);
+ new editing::EditorClientAgent(render_view);
#if !defined(EWK_BRINGUP)
render_view->SetWrtUrlParser(wrt_url_parser_.get());
#include "media/video/capture/tizen/video_capture_device_tizen.h"
#endif
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
#include "browser/autofill/autofill_manager_delegate_efl.h"
+#include "components/autofill/content/browser/content_autofill_driver_factory.h"
#include "browser/password_manager/password_manager_client_efl.h"
-#include "components/autofill/content/browser/content_autofill_driver.h"
#include "components/autofill/core/browser/autofill_client.h"
#include "components/autofill/core/browser/autofill_manager.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
using autofill::AutofillManager;
using autofill::AutofillManagerDelegateEfl;
-using autofill::ContentAutofillDriver;
+using autofill::ContentAutofillDriverFactory;
using password_manager::PasswordManagerClientEfl;
#endif
using base::string16;
, document_created_(false)
, dialog_manager_(NULL)
, weak_ptr_factory_(this) {
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
AutofillManagerDelegateEfl::CreateForWebContents(&web_contents_);
AutofillManagerDelegateEfl* autofill_manager =
AutofillManagerDelegateEfl::FromWebContents(&web_contents_);
autofill_manager->SetEWebView(view);
- ContentAutofillDriver::CreateForWebContentsAndDelegate(&web_contents_,
- autofill_manager,
- EWebView::GetPlatformLocale(),
- AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER);
PasswordManagerClientEfl::CreateForWebContents(&web_contents_);
+ ContentAutofillDriverFactory::CreateForWebContentsAndDelegate(&web_contents_,
+ autofill_manager,
+ EWebView::GetPlatformLocale(),
+ AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER);
#endif
}
}
void WebContentsDelegateEfl::OnUpdateSettings(const Ewk_Settings *settings) {
-#ifdef TIZEN_AUTOFILL_SUPPORT
+#if defined(TIZEN_AUTOFILL_SUPPORT)
PasswordManagerClientEfl *client =
PasswordManagerClientEfl::FromWebContents(&web_contents_);
if(client) {