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

Side by Side Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 279001: Move autofill related WebView{Delegate} methods into the WebKit API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/renderer_host/render_view_host.h" 5 #include "chrome/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/gfx/native_widget_types.h" 10 #include "app/gfx/native_widget_types.h"
(...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after
1534 is_waiting_for_unload_ack_ = false; 1534 is_waiting_for_unload_ack_ = false;
1535 1535
1536 RenderViewHostDelegate::RendererManagement* management_delegate = 1536 RenderViewHostDelegate::RendererManagement* management_delegate =
1537 delegate_->GetRendererManagementDelegate(); 1537 delegate_->GetRendererManagementDelegate();
1538 if (management_delegate) { 1538 if (management_delegate) {
1539 management_delegate->ShouldClosePage( 1539 management_delegate->ShouldClosePage(
1540 unload_ack_is_for_cross_site_transition_, proceed); 1540 unload_ack_is_for_cross_site_transition_, proceed);
1541 } 1541 }
1542 } 1542 }
1543 1543
1544 void RenderViewHost::OnQueryFormFieldAutofill(int request_id, 1544 void RenderViewHost::OnQueryFormFieldAutofill(int query_id,
1545 const std::wstring& field_name, 1545 const string16& field_name,
1546 const std::wstring& user_text) { 1546 const string16& user_text) {
1547 RenderViewHostDelegate::Autofill* autofill_delegate = 1547 RenderViewHostDelegate::Autofill* autofill_delegate =
1548 delegate_->GetAutofillDelegate(); 1548 delegate_->GetAutofillDelegate();
1549 bool ok = false; 1549 bool ok = false;
1550 if (autofill_delegate) { 1550 if (autofill_delegate) {
1551 ok = autofill_delegate->GetAutofillSuggestions( 1551 ok = autofill_delegate->GetAutofillSuggestions(
1552 request_id, field_name, user_text); 1552 query_id, field_name, user_text);
1553 } 1553 }
1554 if (!ok) 1554 if (!ok)
1555 AutofillSuggestionsReturned(request_id, std::vector<std::wstring>(), 0); 1555 AutofillSuggestionsReturned(query_id, std::vector<string16>(), -1);
1556 } 1556 }
1557 1557
1558 void RenderViewHost::OnRemoveAutofillEntry(const std::wstring& field_name, 1558 void RenderViewHost::OnRemoveAutofillEntry(const string16& field_name,
1559 const std::wstring& value) { 1559 const string16& value) {
1560 RenderViewHostDelegate::Autofill* autofill_delegate = 1560 RenderViewHostDelegate::Autofill* autofill_delegate =
1561 delegate_->GetAutofillDelegate(); 1561 delegate_->GetAutofillDelegate();
1562 if (autofill_delegate) 1562 if (autofill_delegate)
1563 autofill_delegate->RemoveAutofillEntry(field_name, value); 1563 autofill_delegate->RemoveAutofillEntry(field_name, value);
1564 } 1564 }
1565 1565
1566 void RenderViewHost::AutofillSuggestionsReturned( 1566 void RenderViewHost::AutofillSuggestionsReturned(
1567 int request_id, const std::vector<std::wstring>& suggestions, 1567 int query_id, const std::vector<string16>& suggestions,
1568 int default_suggestion_index) { 1568 int default_suggestion_index) {
1569 Send(new ViewMsg_QueryFormFieldAutofill_ACK( 1569 Send(new ViewMsg_QueryFormFieldAutofill_ACK(
1570 routing_id(), request_id, suggestions, -1)); 1570 routing_id(), query_id, suggestions, -1));
1571 // Default index -1 means no default suggestion. 1571 // Default index -1 means no default suggestion.
1572 } 1572 }
1573 1573
1574 void RenderViewHost::WindowMoveOrResizeStarted() { 1574 void RenderViewHost::WindowMoveOrResizeStarted() {
1575 Send(new ViewMsg_MoveOrResizeStarted(routing_id())); 1575 Send(new ViewMsg_MoveOrResizeStarted(routing_id()));
1576 } 1576 }
1577 1577
1578 void RenderViewHost::NotifyRendererUnresponsive() { 1578 void RenderViewHost::NotifyRendererUnresponsive() {
1579 delegate_->RendererUnresponsive(this, is_waiting_for_unload_ack_); 1579 delegate_->RendererUnresponsive(this, is_waiting_for_unload_ack_);
1580 } 1580 }
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1727 #endif 1727 #endif
1728 } 1728 }
1729 1729
1730 void RenderViewHost::OnCSSInserted() { 1730 void RenderViewHost::OnCSSInserted() {
1731 delegate_->DidInsertCSS(); 1731 delegate_->DidInsertCSS();
1732 } 1732 }
1733 1733
1734 void RenderViewHost::UpdateBrowserWindowId(int window_id) { 1734 void RenderViewHost::UpdateBrowserWindowId(int window_id) {
1735 Send(new ViewMsg_UpdateBrowserWindowId(routing_id(), window_id)); 1735 Send(new ViewMsg_UpdateBrowserWindowId(routing_id(), window_id));
1736 } 1736 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | chrome/browser/renderer_host/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698