diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-19 16:38:23 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-19 16:38:23 +0000 |
commit | 590a634e603055831bc0aa75480cfa917c8420c1 (patch) | |
tree | 49e7e7f7edea31fd95d22511aa28a08e51b02931 /chrome/browser/instant/instant_controller.h | |
parent | 7175fb1aa0ce9af46b557a8e59930f244df4cdb2 (diff) | |
download | chromium_src-590a634e603055831bc0aa75480cfa917c8420c1.zip chromium_src-590a634e603055831bc0aa75480cfa917c8420c1.tar.gz chromium_src-590a634e603055831bc0aa75480cfa917c8420c1.tar.bz2 |
instant: Fix crash from gesture events on instant preview.
The main changes include:
* Rename WebContentsDelegate::HandleMouseActivate to HandlePointerEventActivate
so that it can be used for both mouse and touch events.
* Rename RenderWidgetHostImpl::OnMouseActivate to OnPointerEventActivate.
* Add HandleGestureBegin/HandleGestureEnd to RenderViewHostDelegate and
WebContentsDelegate.
* Process both mouse-press and gesture-begin events in
RenderWidgetHostViewAura::ShouldActivate.
* Activate an aura window from a BEGIN gesture-event instead of a PRESS
touch-event.
BUG=136961
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10810003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147456 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/instant/instant_controller.h')
-rw-r--r-- | chrome/browser/instant/instant_controller.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/chrome/browser/instant/instant_controller.h b/chrome/browser/instant/instant_controller.h index 8f2a844..b6ad248 100644 --- a/chrome/browser/instant/instant_controller.h +++ b/chrome/browser/instant/instant_controller.h @@ -128,15 +128,14 @@ class InstantController : public InstantLoaderDelegate { // Returns false if there is no instant preview showing. bool CommitIfCurrent(); - // Sets InstantController so that when the mouse is released the preview is - // committed. - void SetCommitOnMouseUp(); + // Sets InstantController so that when the mouse is released or the + // touch-gesture ends, the preview is committed. + void SetCommitOnPointerRelease(); - bool commit_on_mouse_up() const { return commit_on_mouse_up_; } + bool commit_on_pointer_release() const { return commit_on_pointer_release_; } - // Returns true if the mouse is down as the result of activating the preview - // content. - bool IsMouseDownFromActivate(); + // Calls through to method of same name on loader. + bool IsPointerDownFromActivate(); // The autocomplete edit that was initiating the current instant session has // lost focus. Commit or discard the preview accordingly. @@ -179,7 +178,7 @@ class InstantController : public InstantLoaderDelegate { const string16& text, InstantCompleteBehavior behavior) OVERRIDE; virtual gfx::Rect GetInstantBounds() OVERRIDE; - virtual bool ShouldCommitInstantOnMouseUp() OVERRIDE; + virtual bool ShouldCommitInstantOnPointerRelease() OVERRIDE; virtual void CommitInstantLoader(InstantLoader* loader) OVERRIDE; virtual void InstantLoaderDoesntSupportInstant( InstantLoader* loader) OVERRIDE; @@ -243,8 +242,8 @@ class InstantController : public InstantLoaderDelegate { // See description above setter. gfx::Rect omnibox_bounds_; - // See description above CommitOnMouseUp. - bool commit_on_mouse_up_; + // See descritopn above for SetCommitOnPointerRelease. + bool commit_on_pointer_release_; // See description above getter. content::PageTransition last_transition_type_; |