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

Side by Side Diff: webkit/glue/webframe_impl.h

Issue 11479: New take at implementing autofill using the editor client API (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 | « webkit/glue/password_autocomplete_listener_unittest.cc ('k') | webkit/glue/webframe_impl.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 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 15 matching lines...) Expand all
26 #ifndef WEBKIT_GLUE_WEBFRAME_IMPL_H_ 26 #ifndef WEBKIT_GLUE_WEBFRAME_IMPL_H_
27 #define WEBKIT_GLUE_WEBFRAME_IMPL_H_ 27 #define WEBKIT_GLUE_WEBFRAME_IMPL_H_
28 28
29 #include <string> 29 #include <string>
30 30
31 #include "base/basictypes.h" 31 #include "base/basictypes.h"
32 #include "base/compiler_specific.h" 32 #include "base/compiler_specific.h"
33 #include "base/gfx/platform_canvas.h" 33 #include "base/gfx/platform_canvas.h"
34 #include "base/scoped_ptr.h" 34 #include "base/scoped_ptr.h"
35 #include "base/task.h" 35 #include "base/task.h"
36 #include "webkit/glue/form_autocomplete_listener.h" 36 #include "webkit/glue/password_autocomplete_listener.h"
37 #include "webkit/glue/webdatasource_impl.h" 37 #include "webkit/glue/webdatasource_impl.h"
38 #include "webkit/glue/webframe.h" 38 #include "webkit/glue/webframe.h"
39 #include "webkit/glue/webframeloaderclient_impl.h" 39 #include "webkit/glue/webframeloaderclient_impl.h"
40 #include "webkit/glue/webplugin_delegate.h" 40 #include "webkit/glue/webplugin_delegate.h"
41 #include "webkit/glue/webview_delegate.h" 41 #include "webkit/glue/webview_delegate.h"
42 42
43 MSVC_PUSH_WARNING_LEVEL(0); 43 MSVC_PUSH_WARNING_LEVEL(0);
44 #include "ResourceHandleClient.h" 44 #include "ResourceHandleClient.h"
45 #include "Frame.h" 45 #include "Frame.h"
46 #include "PlatformString.h" 46 #include "PlatformString.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // Sets whether the WebFrameImpl allows its document to be scrolled. 264 // Sets whether the WebFrameImpl allows its document to be scrolled.
265 // If the parameter is true, allow the document to be scrolled. 265 // If the parameter is true, allow the document to be scrolled.
266 // Otherwise, disallow scrolling 266 // Otherwise, disallow scrolling
267 void SetAllowsScrolling(bool flag); 267 void SetAllowsScrolling(bool flag);
268 268
269 // Returns true if the frame CSS is in "printing" mode. 269 // Returns true if the frame CSS is in "printing" mode.
270 bool printing() const { return printing_; } 270 bool printing() const { return printing_; }
271 271
272 virtual bool IsReloadAllowingStaleData() const; 272 virtual bool IsReloadAllowingStaleData() const;
273 273
274 // Returns the listener used for autocomplete. Creates it and registers it on 274 // Registers a listener for the specified user name input element. The
275 // the frame body node on the first invocation. 275 // listener will receive notifications for blur and when autocomplete should
276 webkit_glue::AutocompleteBodyListener* GetAutocompleteListener(); 276 // be triggered.
277 // The WebFrameImpl becomes the owner of the passed listener.
278 void RegisterPasswordListener(
279 PassRefPtr<WebCore::HTMLInputElement> user_name_input_element,
280 webkit_glue::PasswordAutocompleteListener* listener);
277 281
278 // Nulls the autocomplete listener for this frame. Useful as a frame might 282 // Returns the password autocomplete listener associated with the passed
279 // be reused (on reload for example), in which case a new body element is 283 // user name input element, or NULL if none available.
280 // created and the existing autocomplete listener becomes useless. 284 // Note that the returned listener is owner by the WebFrameImpl and should not
281 void ClearAutocompleteListener(); 285 // be kept around as it is deleted when the page goes away.
286 webkit_glue::PasswordAutocompleteListener* GetPasswordListener(
287 WebCore::HTMLInputElement* user_name_input_element);
282 288
283 protected: 289 protected:
284 friend class WebFrameLoaderClient; 290 friend class WebFrameLoaderClient;
285 291
286 // Informs the WebFrame that the Frame is being closed, called by the 292 // Informs the WebFrame that the Frame is being closed, called by the
287 // WebFrameLoaderClient 293 // WebFrameLoaderClient
288 void Closing(); 294 void Closing();
289 295
290 // A helper function for loading some document, given all of its data, into 296 // A helper function for loading some document, given all of its data, into
291 // this frame. The charset may be empty if unknown, but a mime type must be 297 // this frame. The charset may be empty if unknown, but a mime type must be
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 // Only for test_shell 439 // Only for test_shell
434 int PendingFrameUnloadEventCount() const; 440 int PendingFrameUnloadEventCount() const;
435 441
436 // Determines whether to invalidate the content area and scrollbar. 442 // Determines whether to invalidate the content area and scrollbar.
437 void InvalidateIfNecessary(); 443 void InvalidateIfNecessary();
438 444
439 void InternalLoadRequest(const WebRequest* request, 445 void InternalLoadRequest(const WebRequest* request,
440 const WebCore::SubstituteData& data, 446 const WebCore::SubstituteData& data,
441 bool replace); 447 bool replace);
442 448
449 // Clears the map of password listeners.
450 void ClearPasswordListeners();
451
443 // In "printing" mode. Used as a state check. 452 // In "printing" mode. Used as a state check.
444 bool printing_; 453 bool printing_;
445 454
446 // For each printed page, the view of the document in pixels. 455 // For each printed page, the view of the document in pixels.
447 Vector<WebCore::IntRect> pages_; 456 Vector<WebCore::IntRect> pages_;
448 457
449 // The listener responsible for showing form autocomplete suggestions. 458 // The input fields that are interested in edit events and their associated
450 RefPtr<webkit_glue::AutocompleteBodyListener> form_autocomplete_listener_; 459 // listeners.
460 typedef HashMap<RefPtr<WebCore::HTMLInputElement>,
461 webkit_glue::PasswordAutocompleteListener*> PasswordListenerMap;
462 PasswordListenerMap password_listeners_;
451 463
452 DISALLOW_COPY_AND_ASSIGN(WebFrameImpl); 464 DISALLOW_COPY_AND_ASSIGN(WebFrameImpl);
453 }; 465 };
454 466
455 #endif // WEBKIT_GLUE_WEBFRAME_IMPL_H_ 467 #endif // WEBKIT_GLUE_WEBFRAME_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/glue/password_autocomplete_listener_unittest.cc ('k') | webkit/glue/webframe_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698