diff options
author | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-05 04:38:06 +0000 |
---|---|---|
committer | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-05 04:38:06 +0000 |
commit | 6a8ddba5ea1e8972c2954b138aeb14d77a548a3c (patch) | |
tree | 4c1a21857eca96cea8a8743a28209041de389699 /chrome/renderer/render_view.h | |
parent | e333e8d07ee32668fc132a21c13cdf674443d1e9 (diff) | |
download | chromium_src-6a8ddba5ea1e8972c2954b138aeb14d77a548a3c.zip chromium_src-6a8ddba5ea1e8972c2954b138aeb14d77a548a3c.tar.gz chromium_src-6a8ddba5ea1e8972c2954b138aeb14d77a548a3c.tar.bz2 |
Adding a class to track when a node in a page gets clicked.
This is going to be used by the password/form autofill to trigger the
suggestion popup, as part of the effort in moving that code out of WebKit.
BUG=None
TEST=Run unit-tests.
Review URL: http://codereview.chromium.org/3090007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58597 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view.h')
-rw-r--r-- | chrome/renderer/render_view.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index b318548..cf06c09 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -28,11 +28,9 @@ #include "chrome/common/render_messages.h" #include "chrome/common/renderer_preferences.h" #include "chrome/common/view_types.h" -#include "chrome/renderer/autofill_helper.h" #include "chrome/renderer/automation/dom_automation_controller.h" #include "chrome/renderer/dom_ui_bindings.h" #include "chrome/renderer/external_host_bindings.h" -#include "chrome/renderer/password_autocomplete_manager.h" #include "chrome/renderer/pepper_plugin_delegate_impl.h" #include "chrome/renderer/render_widget.h" #include "chrome/renderer/renderer_webcookiejar_impl.h" @@ -56,6 +54,7 @@ #endif class AudioMessageFilter; +class AutoFillHelper; class DictionaryValue; class DeviceOrientationDispatcher; class DevToolsAgent; @@ -66,6 +65,8 @@ class GURL; class ListValue; class NavigationState; class NotificationProvider; +class PageClickTracker; +class PasswordAutocompleteManager; class PepperDeviceTest; class PluginGroup; class PrintWebViewHelper; @@ -111,6 +112,7 @@ class WebInputElement; class WebKeyboardEvent; class WebMediaPlayer; class WebMediaPlayerClient; +class WebMouseEvent; class WebNode; class WebPlugin; class WebSpeechInputController; @@ -209,6 +211,10 @@ class RenderView : public RenderWidget, send_content_state_immediately_ = value; } + PageClickTracker* page_click_tracker() const { + return page_click_tracker_.get(); + } + // Called from JavaScript window.external.AddSearchProvider() to add a // keyword for a provider described in the given OpenSearch document. void AddSearchProvider(const std::string& url); @@ -592,6 +598,8 @@ class RenderView : public RenderWidget, virtual void DidInitiatePaint(); virtual void DidFlushPaint(); virtual void DidHandleKeyEvent(); + virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event); + #if OS_MACOSX virtual void OnSetFocus(bool enable); virtual void OnWasHidden(); @@ -1211,11 +1219,17 @@ class RenderView : public RenderWidget, TranslateHelper translate_helper_; // Responsible for automatically filling login and password textfields. - PasswordAutocompleteManager password_autocomplete_manager_; + scoped_ptr<PasswordAutocompleteManager> password_autocomplete_manager_; // Responsible for filling forms (AutoFill) and single text entries // (Autocomplete). - AutoFillHelper autofill_helper_; + scoped_ptr<AutoFillHelper> autofill_helper_; + + // Tracks when text input controls get clicked. + // IMPORTANT: this should be declared after autofill_helper_ and + // password_autocomplete_manager_ so the tracker is deleted first (so we won't + // run the risk of notifying deleted objects). + scoped_ptr<PageClickTracker> page_click_tracker_; RendererWebCookieJarImpl cookie_jar_; |