summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/app_launcher.h
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-19 23:09:07 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-19 23:09:07 +0000
commitf98903ef56ce35144860be0d69df5207ae9ace32 (patch)
tree7d874ef4188dcabf4138f976dfc1bd99ba1e6985 /chrome/browser/views/app_launcher.h
parent1b882f5c0f0c50d9eefc9cb421a1157e6e1e45d4 (diff)
downloadchromium_src-f98903ef56ce35144860be0d69df5207ae9ace32.zip
chromium_src-f98903ef56ce35144860be0d69df5207ae9ace32.tar.gz
chromium_src-f98903ef56ce35144860be0d69df5207ae9ace32.tar.bz2
Subclassing the InfoBubble to handle anchoring bubbles basedon their content, not what they point to, like the one we wantto show for the extension apps.
BUG=41270 TEST=Run Chrome with --enable-extension-apps --app-launcher-new-tab and press the NewTab button. A panel should open that has a mini omnibox which should be situated right on top of the underlying omnibox. Review URL: http://codereview.chromium.org/1572045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44979 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/app_launcher.h')
-rw-r--r--chrome/browser/views/app_launcher.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/chrome/browser/views/app_launcher.h b/chrome/browser/views/app_launcher.h
index 229f265..fa5cc03 100644
--- a/chrome/browser/views/app_launcher.h
+++ b/chrome/browser/views/app_launcher.h
@@ -7,7 +7,7 @@
#include "base/scoped_ptr.h"
#include "chrome/browser/tab_contents/tab_contents_delegate.h"
-#include "chrome/browser/views/info_bubble.h"
+#include "chrome/browser/views/pinned_contents_info_bubble.h"
#include "views/view.h"
class Browser;
@@ -49,13 +49,17 @@ class TabContentsDelegateImpl;
// When a new url is opened, or the user clicks outsides the bounds of the
// widget the app launcher is closed.
class AppLauncher : public InfoBubbleDelegate,
- public TabContentsDelegate {
+ public TabContentsDelegate {
public:
// Shows an application launcher bubble pointing to the |bounds| (which should
- // be in screen coordinates).
+ // be in screen coordinates). |bubble_anchor| specifies at which coordinates
+ // the bubble contents should appear (in screen coordinates). The bubble will
+ // be moved accordingly.
// The caller DOES NOT OWN the AppLauncher returned. It is deleted
// automatically when the AppLauncher is closed.
- static AppLauncher* Show(Browser* browser, const gfx::Rect& bounds);
+ static AppLauncher* Show(Browser* browser,
+ const gfx::Rect& bounds,
+ const gfx::Point& bubble_anchor);
// Shows an application launcher bubble pointing to the new tab button.
// The caller DOES NOT OWN the AppLauncher returned. It is deleted
@@ -107,8 +111,8 @@ class AppLauncher : public InfoBubbleDelegate,
// The currently active browser. We use this to open urls.
Browser* browser_;
- // The InfoBubble displaying the omnibox and app contents.
- InfoBubble* info_bubble_;
+ // The InfoBubble displaying the Omnibox and app contents.
+ PinnedContentsInfoBubble* info_bubble_;
// The view with the navigation bar and render view, shown in the info-bubble.
InfoBubbleContentsView* info_bubble_content_;