summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bubble_positioner.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-15 22:46:03 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-15 22:46:03 +0000
commit413df1b5ebacf0f3bc2ad03020e9f93b92717803 (patch)
tree92381b78a0b3a1682523b338428688bd4e23cd9e /chrome/browser/bubble_positioner.h
parent76665e75f3f10a3171efd3bebfbd9c59a7648a00 (diff)
downloadchromium_src-413df1b5ebacf0f3bc2ad03020e9f93b92717803.zip
chromium_src-413df1b5ebacf0f3bc2ad03020e9f93b92717803.tar.gz
chromium_src-413df1b5ebacf0f3bc2ad03020e9f93b92717803.tar.bz2
Convert the AutocompletePopupPositioner into a BubblePositioner in preparation for using it to position both the Omnibox bubble and InfoBubbles. It now gets the bounds of the location stack, which can be turned into useful coordinates for both items.
This should not result in any visible change. BUG=21028 TEST=none Review URL: http://codereview.chromium.org/194110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26288 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bubble_positioner.h')
-rw-r--r--chrome/browser/bubble_positioner.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/chrome/browser/bubble_positioner.h b/chrome/browser/bubble_positioner.h
new file mode 100644
index 0000000..5336b1b
--- /dev/null
+++ b/chrome/browser/bubble_positioner.h
@@ -0,0 +1,22 @@
+// Copyright (c) 2009 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.
+
+#ifndef CHROME_BROWSER_BUBBLE_POSITIONER_H_
+#define CHROME_BROWSER_BUBBLE_POSITIONER_H_
+
+namespace gfx {
+class Rect;
+}
+
+// An object in the browser UI can implement this interface to provide display
+// bounds for the omnibox bubble.
+class BubblePositioner {
+ public:
+ // Returns the bounds of the "location bar" stack (including star/go buttons
+ // where relevant). The omnibox dropdown uses this to calculate its width and
+ // y-coordinate.
+ virtual gfx::Rect GetLocationStackBounds() const = 0;
+};
+
+#endif // CHROME_BROWSER_BUBBLE_POSITIONER_H_