diff options
author | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-17 17:33:27 +0000 |
---|---|---|
committer | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-17 17:33:27 +0000 |
commit | 1274a4f5664d879b1e2d12f4113daf0b1dedfa40 (patch) | |
tree | 69a0cb10b9677225a529d0eaa4821fa81e1a4486 /chrome/browser/views/app_launcher.h | |
parent | ec379f9f737ec83bfa8f469e2980b571360b0fed (diff) | |
download | chromium_src-1274a4f5664d879b1e2d12f4113daf0b1dedfa40.zip chromium_src-1274a4f5664d879b1e2d12f4113daf0b1dedfa40.tar.gz chromium_src-1274a4f5664d879b1e2d12f4113daf0b1dedfa40.tar.bz2 |
Animates the app launcher when it is shown.
Also, made the info-bubble HWND on Windows owned by its border widget so that it shows on top. That way we don't have to create a hole in the border widget to make it visible.
BUG=None
TEST=Make sure other info-bubble (bookmark bubble, extension bubbles...) work as expected. Test that when tarting Chrome with --app-panel, creating a new tab shows the apps launcher with an animation.
Review URL: http://codereview.chromium.org/2096004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47427 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/app_launcher.h')
-rw-r--r-- | chrome/browser/views/app_launcher.h | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/chrome/browser/views/app_launcher.h b/chrome/browser/views/app_launcher.h index 670ead4..8891ec6 100644 --- a/chrome/browser/views/app_launcher.h +++ b/chrome/browser/views/app_launcher.h @@ -5,26 +5,14 @@ #ifndef CHROME_BROWSER_VIEWS_APP_LAUNCHER_H_ #define CHROME_BROWSER_VIEWS_APP_LAUNCHER_H_ +#include "app/slide_animation.h" #include "base/scoped_ptr.h" +#include "base/task.h" #include "chrome/browser/tab_contents/tab_contents_delegate.h" #include "chrome/browser/views/pinned_contents_info_bubble.h" -#include "views/view.h" class Browser; -class SiteInstance; - -namespace gfx { -class Size; -} -namespace views { -class NativeViewHost; -class View; -class WidgetGtk; -} - class InfoBubbleContentsView; -class NavigationBar; -class TabContentsDelegateImpl; // AppLauncher manages showing the application launcher and optionally the // navigation bar in compact navigation bar mode. The app launcher is @@ -38,7 +26,8 @@ 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, +class AppLauncher : public AnimationDelegate, + public InfoBubbleDelegate, public TabContentsDelegate { public: // Shows an application launcher bubble pointing to the |bounds| (which should @@ -72,6 +61,9 @@ class AppLauncher : public InfoBubbleDelegate, // Hides the app launcher. void Hide(); + // AnimationDelegate overrides: + virtual void AnimationProgressed(const Animation* animation); + // InfoBubbleDelegate overrides. virtual void InfoBubbleClosing(InfoBubble* info_bubble, bool closed_by_escape); @@ -109,7 +101,6 @@ class AppLauncher : public InfoBubbleDelegate, private: friend class DeleteTask<AppLauncher>; - friend class NavigationBar; friend class InfoBubbleContentsView; explicit AppLauncher(Browser* browser); @@ -117,6 +108,9 @@ class AppLauncher : public InfoBubbleDelegate, void AddTabWithURL(const GURL& url, PageTransition::Type transition); + // Resizes the bubble so it matches its contents's size |contents_size|. + void Resize(const gfx::Size& contents_size); + // The currently active browser. We use this to open urls. Browser* browser_; @@ -130,6 +124,15 @@ class AppLauncher : public InfoBubbleDelegate, // sent into the launcher's HTML page via its hash. std::string hash_params_; + // The preferred size of the DOM contents. + gfx::Size contents_pref_size_; + + // The previous preferred size of the DOM contents. + gfx::Size previous_contents_pref_size_; + + // The animation that grows the info-bubble. + scoped_ptr<SlideAnimation> animation_; + DISALLOW_COPY_AND_ASSIGN(AppLauncher); }; |