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

Side by Side Diff: chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc

Issue 866523002: [Abandoned] Add Autofill to the <webview> chrome://chrome-signin page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mac: fix popup Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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
6 #include "chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h" 5 #include "chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h"
7 6
7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" 8 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
9 #include "chrome/browser/favicon/favicon_tab_helper.h" 9 #include "chrome/browser/favicon/favicon_tab_helper.h"
10 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
10 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" 11 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
12 #include "chrome/browser/ui/autofill/chrome_autofill_client.h"
11 #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h" 13 #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h"
12 #include "chrome/common/chrome_version_info.h" 14 #include "chrome/common/chrome_version_info.h"
15 #include "components/autofill/content/browser/content_autofill_driver_factory.h"
13 #include "components/pdf/browser/pdf_web_contents_helper.h" 16 #include "components/pdf/browser/pdf_web_contents_helper.h"
14 #include "components/renderer_context_menu/context_menu_delegate.h" 17 #include "components/renderer_context_menu/context_menu_delegate.h"
15 #include "extensions/browser/api/web_request/web_request_api.h" 18 #include "extensions/browser/api/web_request/web_request_api.h"
16 #include "extensions/browser/guest_view/web_view/web_view_constants.h" 19 #include "extensions/browser/guest_view/web_view/web_view_constants.h"
17 20
18 #if defined(ENABLE_PRINTING) 21 #if defined(ENABLE_PRINTING)
19 #if defined(ENABLE_PRINT_PREVIEW) 22 #if defined(ENABLE_PRINT_PREVIEW)
20 #include "chrome/browser/printing/print_preview_message_handler.h" 23 #include "chrome/browser/printing/print_preview_message_handler.h"
21 #include "chrome/browser/printing/print_view_manager.h" 24 #include "chrome/browser/printing/print_view_manager.h"
22 #else 25 #else
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 printing::PrintViewManager::CreateForWebContents(contents); 71 printing::PrintViewManager::CreateForWebContents(contents);
69 printing::PrintPreviewMessageHandler::CreateForWebContents(contents); 72 printing::PrintPreviewMessageHandler::CreateForWebContents(contents);
70 #else 73 #else
71 printing::PrintViewManagerBasic::CreateForWebContents(contents); 74 printing::PrintViewManagerBasic::CreateForWebContents(contents);
72 #endif // defined(ENABLE_PRINT_PREVIEW) 75 #endif // defined(ENABLE_PRINT_PREVIEW)
73 #endif // defined(ENABLE_PRINTING) 76 #endif // defined(ENABLE_PRINTING)
74 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( 77 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient(
75 contents, 78 contents,
76 scoped_ptr<pdf::PDFWebContentsHelperClient>( 79 scoped_ptr<pdf::PDFWebContentsHelperClient>(
77 new ChromePDFWebContentsHelperClient())); 80 new ChromePDFWebContentsHelperClient()));
81
82 autofill::ChromeAutofillClient::CreateForWebContents(contents);
83 ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient(
84 contents,
85 autofill::ChromeAutofillClient::FromWebContents(contents));
86
87 autofill::ContentAutofillDriverFactory::CreateForWebContentsAndDelegate(
88 contents,
89 autofill::ChromeAutofillClient::FromWebContents(contents),
90 g_browser_process->GetApplicationLocale(),
91 autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER);
78 } 92 }
79 93
80 void ChromeWebViewGuestDelegate::OnDidCommitProvisionalLoadForFrame( 94 void ChromeWebViewGuestDelegate::OnDidCommitProvisionalLoadForFrame(
81 bool is_main_frame) { 95 bool is_main_frame) {
82 if (is_main_frame) 96 if (is_main_frame)
83 chromevox_injected_ = false; 97 chromevox_injected_ = false;
84 } 98 }
85 99
86 void ChromeWebViewGuestDelegate::OnDidInitialize() { 100 void ChromeWebViewGuestDelegate::OnDidInitialize() {
87 #if defined(OS_CHROMEOS) 101 #if defined(OS_CHROMEOS)
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 chromeos::ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK) { 180 chromeos::ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK) {
167 if (details.enabled) 181 if (details.enabled)
168 InjectChromeVoxIfNeeded(guest_web_contents()->GetRenderViewHost()); 182 InjectChromeVoxIfNeeded(guest_web_contents()->GetRenderViewHost());
169 else 183 else
170 chromevox_injected_ = false; 184 chromevox_injected_ = false;
171 } 185 }
172 } 186 }
173 #endif 187 #endif
174 188
175 } // namespace extensions 189 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698