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

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

Issue 2138005: AutoFill: Preview form field values when the user changes the AutoFill dropdown (Closed)
Patch Set: Rebase. Created 10 years, 6 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
« no previous file with comments | « chrome/renderer/form_manager_unittest.cc ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 const WebKit::WebString& value); 275 const WebKit::WebString& value);
276 virtual void queryAutofillSuggestions( 276 virtual void queryAutofillSuggestions(
277 const WebKit::WebNode& node, const WebKit::WebString& name, 277 const WebKit::WebNode& node, const WebKit::WebString& name,
278 const WebKit::WebString& value); 278 const WebKit::WebString& value);
279 virtual void removeAutofillSuggestions( 279 virtual void removeAutofillSuggestions(
280 const WebKit::WebString& name, const WebKit::WebString& value); 280 const WebKit::WebString& name, const WebKit::WebString& value);
281 virtual void didAcceptAutoFillSuggestion( 281 virtual void didAcceptAutoFillSuggestion(
282 const WebKit::WebNode& node, 282 const WebKit::WebNode& node,
283 const WebKit::WebString& value, 283 const WebKit::WebString& value,
284 const WebKit::WebString& label); 284 const WebKit::WebString& label);
285 virtual void didSelectAutoFillSuggestion(
286 const WebKit::WebNode& node,
287 const WebKit::WebString& value,
288 const WebKit::WebString& label);
289 virtual void didClearAutoFillSelection(const WebKit::WebNode& node);
285 290
286 virtual WebKit::WebNotificationPresenter* GetNotificationPresenter() { 291 virtual WebKit::WebNotificationPresenter* GetNotificationPresenter() {
287 return notification_provider_.get(); 292 return notification_provider_.get();
288 } 293 }
289 virtual WebKit::WebGeolocationService* geolocationService(); 294 virtual WebKit::WebGeolocationService* geolocationService();
290 295
291 // Sets the content settings that back allowScripts(), allowImages(), and 296 // Sets the content settings that back allowScripts(), allowImages(), and
292 // allowPlugins(). 297 // allowPlugins().
293 void SetContentSettings(const ContentSettings& settings); 298 void SetContentSettings(const ContentSettings& settings);
294 299
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 FRIEND_TEST(RenderViewTest, InsertCharacters); 569 FRIEND_TEST(RenderViewTest, InsertCharacters);
565 #if defined(OS_MACOSX) 570 #if defined(OS_MACOSX)
566 FRIEND_TEST(RenderViewTest, MacTestCmdUp); 571 FRIEND_TEST(RenderViewTest, MacTestCmdUp);
567 #endif 572 #endif
568 FRIEND_TEST(RenderViewTest, JSBlockSentAfterPageLoad); 573 FRIEND_TEST(RenderViewTest, JSBlockSentAfterPageLoad);
569 FRIEND_TEST(RenderViewTest, UpdateTargetURLWithInvalidURL); 574 FRIEND_TEST(RenderViewTest, UpdateTargetURLWithInvalidURL);
570 575
571 typedef std::map<GURL, ContentSettings> HostContentSettings; 576 typedef std::map<GURL, ContentSettings> HostContentSettings;
572 typedef std::map<GURL, int> HostZoomLevels; 577 typedef std::map<GURL, int> HostZoomLevels;
573 578
579 enum AutoFillAction {
580 AUTOFILL_NONE, // No state set.
581 AUTOFILL_FILL, // Fill the AutoFill form data.
582 AUTOFILL_PREVIEW, // Preview the AutoFill form data.
583 };
584
574 explicit RenderView(RenderThreadBase* render_thread, 585 explicit RenderView(RenderThreadBase* render_thread,
575 const WebPreferences& webkit_preferences, 586 const WebPreferences& webkit_preferences,
576 int64 session_storage_namespace_id); 587 int64 session_storage_namespace_id);
577 588
578 // Initializes this view with the given parent and ID. The |routing_id| can be 589 // Initializes this view with the given parent and ID. The |routing_id| can be
579 // set to 'MSG_ROUTING_NONE' if the true ID is not yet known. In this case, 590 // set to 'MSG_ROUTING_NONE' if the true ID is not yet known. In this case,
580 // CompleteInit must be called later with the true ID. 591 // CompleteInit must be called later with the true ID.
581 void Init(gfx::NativeViewId parent, 592 void Init(gfx::NativeViewId parent,
582 int32 opener_id, 593 int32 opener_id,
583 const RendererPreferences& renderer_prefs, 594 const RendererPreferences& renderer_prefs,
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 933
923 // Should only be called if this object wraps a PluginDocument. 934 // Should only be called if this object wraps a PluginDocument.
924 webkit_glue::WebPluginDelegate* GetDelegateForPluginDocument(); 935 webkit_glue::WebPluginDelegate* GetDelegateForPluginDocument();
925 936
926 // Returns false unless this is a top-level navigation that 937 // Returns false unless this is a top-level navigation that
927 // crosses origins. 938 // crosses origins.
928 bool IsNonLocalTopLevelNavigation(const GURL& url, 939 bool IsNonLocalTopLevelNavigation(const GURL& url,
929 WebKit::WebFrame* frame, 940 WebKit::WebFrame* frame,
930 WebKit::WebNavigationType type); 941 WebKit::WebNavigationType type);
931 942
943 // Queries the AutoFillManager for form data for the form containing |node|.
944 // |value| is the current text in the field, and |label| is the selected
945 // profile label. |action| specifies whether to Fill or Preview the values
946 // returned from the AutoFillManager.
947 void QueryAutoFillFormData(const WebKit::WebNode& node,
948 const WebKit::WebString& value,
949 const WebKit::WebString& label,
950 AutoFillAction action);
951
932 // Bitwise-ORed set of extra bindings that have been enabled. See 952 // Bitwise-ORed set of extra bindings that have been enabled. See
933 // BindingsPolicy for details. 953 // BindingsPolicy for details.
934 int enabled_bindings_; 954 int enabled_bindings_;
935 955
936 // DOM Automation Controller CppBoundClass. 956 // DOM Automation Controller CppBoundClass.
937 DomAutomationController dom_automation_controller_; 957 DomAutomationController dom_automation_controller_;
938 958
939 // Chrome page<->browser messaging CppBoundClass. 959 // Chrome page<->browser messaging CppBoundClass.
940 DOMUIBindings dom_ui_bindings_; 960 DOMUIBindings dom_ui_bindings_;
941 961
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 // languages. 1234 // languages.
1215 TranslateHelper translate_helper_; 1235 TranslateHelper translate_helper_;
1216 1236
1217 // Site isolation metrics flags. These are per-page-load counts, reset to 0 1237 // Site isolation metrics flags. These are per-page-load counts, reset to 0
1218 // in OnClosePage. 1238 // in OnClosePage.
1219 int cross_origin_access_count_; 1239 int cross_origin_access_count_;
1220 int same_origin_access_count_; 1240 int same_origin_access_count_;
1221 1241
1222 PepperPluginDelegateImpl pepper_delegate_; 1242 PepperPluginDelegateImpl pepper_delegate_;
1223 1243
1244 // The action to take when receiving AutoFill data from the AutoFillManager.
1245 AutoFillAction autofill_action_;
1246
1224 DISALLOW_COPY_AND_ASSIGN(RenderView); 1247 DISALLOW_COPY_AND_ASSIGN(RenderView);
1225 }; 1248 };
1226 1249
1227 #endif // CHROME_RENDERER_RENDER_VIEW_H_ 1250 #endif // CHROME_RENDERER_RENDER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/renderer/form_manager_unittest.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698