summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_popup_view.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-01 19:31:30 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-01 19:31:30 +0000
commit4ab8cebe271e942522ddf739102e6211c1325565 (patch)
treece22f1c57eabc1231d77b4b1a513634f19dd4e89 /chrome/browser/autocomplete/autocomplete_popup_view.h
parentc9d7c211e90e2f811a03d25542afb4302c47525e (diff)
downloadchromium_src-4ab8cebe271e942522ddf739102e6211c1325565.zip
chromium_src-4ab8cebe271e942522ddf739102e6211c1325565.tar.gz
chromium_src-4ab8cebe271e942522ddf739102e6211c1325565.tar.bz2
Make pressing <esc> while dragging in the omnibox correctly cancel dragging. Original patch by Philippe Beaudoin (see http://codereview.chromium.org/554143 ), r=me, tweaked.
BUG=33460 TEST=Write goog in the omnibox, drag around, while pressing the left mouse button hit ESC. The selection should return to the first entry and not move as you continue to drag. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37724 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_popup_view.h')
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view.h b/chrome/browser/autocomplete/autocomplete_popup_view.h
index 0742442..41b21a6 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view.h
+++ b/chrome/browser/autocomplete/autocomplete_popup_view.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -40,6 +40,12 @@ class AutocompletePopupView {
// Paint any pending updates.
virtual void PaintUpdatesNow() = 0;
+ // This method is called when the view should cancel any active drag (e.g.
+ // because the user pressed ESC). The view may or may not need to take any
+ // action (e.g. releasing mouse capture). Note that this can be called when
+ // no drag is in progress.
+ virtual void OnDragCanceled() = 0;
+
// Returns the popup's model.
virtual AutocompletePopupModel* GetModel() = 0;