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

Side by Side Diff: chrome/renderer/render_view.h

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
« no previous file with comments | « chrome/renderer/print_web_view_helper.h ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_RENDERER_RENDER_VIEW_H_ 5 #ifndef CHROME_RENDERER_RENDER_VIEW_H_
6 #define CHROME_RENDERER_RENDER_VIEW_H_ 6 #define CHROME_RENDERER_RENDER_VIEW_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 20 matching lines...) Expand all
31 #include "chrome/renderer/extensions/extension_process_bindings.h" 31 #include "chrome/renderer/extensions/extension_process_bindings.h"
32 #include "chrome/renderer/external_host_bindings.h" 32 #include "chrome/renderer/external_host_bindings.h"
33 #include "chrome/renderer/notification_provider.h" 33 #include "chrome/renderer/notification_provider.h"
34 #include "chrome/renderer/render_widget.h" 34 #include "chrome/renderer/render_widget.h"
35 #include "chrome/renderer/render_view_visitor.h" 35 #include "chrome/renderer/render_view_visitor.h"
36 #include "third_party/skia/include/core/SkBitmap.h" 36 #include "third_party/skia/include/core/SkBitmap.h"
37 #include "testing/gtest/include/gtest/gtest_prod.h" 37 #include "testing/gtest/include/gtest/gtest_prod.h"
38 #include "webkit/api/public/WebConsoleMessage.h" 38 #include "webkit/api/public/WebConsoleMessage.h"
39 #include "webkit/api/public/WebContextMenuData.h" 39 #include "webkit/api/public/WebContextMenuData.h"
40 #include "webkit/api/public/WebFrameClient.h" 40 #include "webkit/api/public/WebFrameClient.h"
41 #include "webkit/api/public/WebNode.h"
41 #include "webkit/api/public/WebTextDirection.h" 42 #include "webkit/api/public/WebTextDirection.h"
42 #include "webkit/glue/dom_serializer_delegate.h" 43 #include "webkit/glue/dom_serializer_delegate.h"
43 #include "webkit/glue/form_data.h" 44 #include "webkit/glue/form_data.h"
44 #include "webkit/glue/image_resource_fetcher.h" 45 #include "webkit/glue/image_resource_fetcher.h"
45 #include "webkit/glue/password_form_dom_manager.h" 46 #include "webkit/glue/password_form_dom_manager.h"
46 #include "webkit/glue/webaccessibilitymanager.h" 47 #include "webkit/glue/webaccessibilitymanager.h"
47 #include "webkit/glue/webplugin_page_delegate.h" 48 #include "webkit/glue/webplugin_page_delegate.h"
48 #include "webkit/glue/webpreferences.h" 49 #include "webkit/glue/webpreferences.h"
49 #include "webkit/glue/webview_delegate.h" 50 #include "webkit/glue/webview_delegate.h"
50 #include "webkit/glue/webview.h" 51 #include "webkit/glue/webview.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 158 }
158 159
159 PrintWebViewHelper* print_helper() { 160 PrintWebViewHelper* print_helper() {
160 return print_helper_.get(); 161 return print_helper_.get();
161 } 162 }
162 163
163 // IPC::Channel::Listener 164 // IPC::Channel::Listener
164 virtual void OnMessageReceived(const IPC::Message& msg); 165 virtual void OnMessageReceived(const IPC::Message& msg);
165 166
166 // WebViewDelegate 167 // WebViewDelegate
167 virtual void QueryFormFieldAutofill(const std::wstring& field_name,
168 const std::wstring& text,
169 int64 node_id);
170 virtual void RemoveStoredAutofillEntry(const std::wstring& field_name,
171 const std::wstring& text);
172 virtual void LoadNavigationErrorPage( 168 virtual void LoadNavigationErrorPage(
173 WebKit::WebFrame* frame, 169 WebKit::WebFrame* frame,
174 const WebKit::WebURLRequest& failed_request, 170 const WebKit::WebURLRequest& failed_request,
175 const WebKit::WebURLError& error, 171 const WebKit::WebURLError& error,
176 const std::string& html, 172 const std::string& html,
177 bool replace); 173 bool replace);
178 virtual void OnMissingPluginStatus( 174 virtual void OnMissingPluginStatus(
179 WebPluginDelegateProxy* delegate, 175 WebPluginDelegateProxy* delegate,
180 int status); 176 int status);
181 virtual WebDevToolsAgentDelegate* GetWebDevToolsAgentDelegate(); 177 virtual WebDevToolsAgentDelegate* GetWebDevToolsAgentDelegate();
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 virtual void startDragging( 247 virtual void startDragging(
252 const WebKit::WebPoint& from, const WebKit::WebDragData& data, 248 const WebKit::WebPoint& from, const WebKit::WebDragData& data,
253 WebKit::WebDragOperationsMask mask); 249 WebKit::WebDragOperationsMask mask);
254 virtual bool acceptsLoadDrops(); 250 virtual bool acceptsLoadDrops();
255 virtual void focusNext(); 251 virtual void focusNext();
256 virtual void focusPrevious(); 252 virtual void focusPrevious();
257 virtual void navigateBackForwardSoon(int offset); 253 virtual void navigateBackForwardSoon(int offset);
258 virtual int historyBackListCount(); 254 virtual int historyBackListCount();
259 virtual int historyForwardListCount(); 255 virtual int historyForwardListCount();
260 virtual void didAddHistoryItem(); 256 virtual void didAddHistoryItem();
261 virtual void didUpdateInspectorSettings();
262 virtual void focusAccessibilityObject( 257 virtual void focusAccessibilityObject(
263 const WebKit::WebAccessibilityObject& acc_obj); 258 const WebKit::WebAccessibilityObject& acc_obj);
259 virtual void didUpdateInspectorSettings();
260 virtual void queryAutofillSuggestions(
261 const WebKit::WebNode& node, const WebKit::WebString& name,
262 const WebKit::WebString& value);
263 virtual void removeAutofillSuggestions(
264 const WebKit::WebString& name, const WebKit::WebString& value);
264 265
265 virtual WebKit::WebNotificationPresenter* GetNotificationPresenter() { 266 virtual WebKit::WebNotificationPresenter* GetNotificationPresenter() {
266 return notification_provider_.get(); 267 return notification_provider_.get();
267 } 268 }
268 269
269 // WebKit::WebWidgetClient 270 // WebKit::WebWidgetClient
270 // Most methods are handled by RenderWidget. 271 // Most methods are handled by RenderWidget.
271 virtual void show(WebKit::WebNavigationPolicy policy); 272 virtual void show(WebKit::WebNavigationPolicy policy);
272 virtual void closeWidgetSoon(); 273 virtual void closeWidgetSoon();
273 virtual void runModal(); 274 virtual void runModal();
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 630
630 // Runs the onunload handler and closes the page, replying with ClosePage_ACK 631 // Runs the onunload handler and closes the page, replying with ClosePage_ACK
631 // (with the given RPH and request IDs, to help track the request). 632 // (with the given RPH and request IDs, to help track the request).
632 void OnClosePage(const ViewMsg_ClosePage_Params& params); 633 void OnClosePage(const ViewMsg_ClosePage_Params& params);
633 634
634 // Notification about ui theme changes. 635 // Notification about ui theme changes.
635 void OnThemeChanged(); 636 void OnThemeChanged();
636 637
637 // Notification that we have received autofill suggestion. 638 // Notification that we have received autofill suggestion.
638 void OnQueryFormFieldAutofillAck( 639 void OnQueryFormFieldAutofillAck(
639 int request_id, 640 int query_id,
640 const std::vector<std::wstring>& suggestions, 641 const std::vector<string16>& suggestions,
641 int default_suggestions_index); 642 int default_suggestions_index);
642 643
643 // Message that the popup notification has been shown or hidden. 644 // Message that the popup notification has been shown or hidden.
644 void OnPopupNotificationVisibilityChanged(bool visible); 645 void OnPopupNotificationVisibilityChanged(bool visible);
645 646
646 // Handles messages posted from automation. 647 // Handles messages posted from automation.
647 void OnMessageFromExternalHost(const std::string& message, 648 void OnMessageFromExternalHost(const std::string& message,
648 const std::string& origin, 649 const std::string& origin,
649 const std::string& target); 650 const std::string& target);
650 651
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 // maintains the cache and other features of the accessibility tree. 865 // maintains the cache and other features of the accessibility tree.
865 scoped_ptr<webkit_glue::WebAccessibilityManager> web_accessibility_manager_; 866 scoped_ptr<webkit_glue::WebAccessibilityManager> web_accessibility_manager_;
866 #endif 867 #endif
867 868
868 // Resource message queue. Used to queue up resource IPCs if we need 869 // Resource message queue. Used to queue up resource IPCs if we need
869 // to wait for an ACK from the browser before proceeding. 870 // to wait for an ACK from the browser before proceeding.
870 std::queue<IPC::Message*> queued_resource_messages_; 871 std::queue<IPC::Message*> queued_resource_messages_;
871 872
872 // The id of the last request sent for form field autofill. Used to ignore 873 // The id of the last request sent for form field autofill. Used to ignore
873 // out of date responses. 874 // out of date responses.
874 int form_field_autofill_request_id_; 875 int autofill_query_id_;
875 876
876 // The id of the node corresponding to the last request sent for form field 877 // The id of the node corresponding to the last request sent for form field
877 // autofill. 878 // autofill.
878 int64 form_field_autofill_node_id_; 879 WebKit::WebNode autofill_query_node_;
879 880
880 // We need to prevent windows from closing themselves with a window.close() 881 // We need to prevent windows from closing themselves with a window.close()
881 // call while a blocked popup notification is being displayed. We cannot 882 // call while a blocked popup notification is being displayed. We cannot
882 // synchronously query the Browser process. We cannot wait for the Browser 883 // synchronously query the Browser process. We cannot wait for the Browser
883 // process to send a message to us saying that a blocked popup notification 884 // process to send a message to us saying that a blocked popup notification
884 // is being displayed. We instead assume that when we create a window off 885 // is being displayed. We instead assume that when we create a window off
885 // this RenderView, that it is going to be blocked until we get a message 886 // this RenderView, that it is going to be blocked until we get a message
886 // from the Browser process telling us otherwise. 887 // from the Browser process telling us otherwise.
887 bool popup_notification_visible_; 888 bool popup_notification_visible_;
888 889
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 // ImageResourceFetchers schedule via DownloadImage. 983 // ImageResourceFetchers schedule via DownloadImage.
983 typedef std::set<webkit_glue::ImageResourceFetcher*> ImageResourceFetcherSet; 984 typedef std::set<webkit_glue::ImageResourceFetcher*> ImageResourceFetcherSet;
984 ImageResourceFetcherSet image_fetchers_; 985 ImageResourceFetcherSet image_fetchers_;
985 986
986 typedef std::map<WebView*, RenderView*> ViewMap; 987 typedef std::map<WebView*, RenderView*> ViewMap;
987 988
988 DISALLOW_COPY_AND_ASSIGN(RenderView); 989 DISALLOW_COPY_AND_ASSIGN(RenderView);
989 }; 990 };
990 991
991 #endif // CHROME_RENDERER_RENDER_VIEW_H_ 992 #endif // CHROME_RENDERER_RENDER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/renderer/print_web_view_helper.h ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698