diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-17 23:20:53 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-17 23:20:53 +0000 |
commit | 66c0a651a423da5e80d614de17f463b12b6145ac (patch) | |
tree | c55cdfbf9eeadcad2e72f501bd496afcce79ad9d /chrome/browser/ui | |
parent | a2b600c5b2175571888da48f76adec7bc80b8b9d (diff) | |
download | chromium_src-66c0a651a423da5e80d614de17f463b12b6145ac.zip chromium_src-66c0a651a423da5e80d614de17f463b12b6145ac.tar.gz chromium_src-66c0a651a423da5e80d614de17f463b12b6145ac.tar.bz2 |
Pulls AnimationDelegate out into its own header.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/5121004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66541 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
23 files changed, 53 insertions, 21 deletions
diff --git a/chrome/browser/ui/views/app_launched_animation_win.cc b/chrome/browser/ui/views/app_launched_animation_win.cc index 50efc5d..0fe5d05 100644 --- a/chrome/browser/ui/views/app_launched_animation_win.cc +++ b/chrome/browser/ui/views/app_launched_animation_win.cc @@ -5,6 +5,7 @@ #include "chrome/browser/app_launched_animation.h" #include "app/animation.h" +#include "app/animation_delegate.h" #include "app/slide_animation.h" #include "chrome/browser/extensions/image_loading_tracker.h" #include "chrome/common/extensions/extension.h" diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h index e634555..d6adea1 100644 --- a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h +++ b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_ #pragma once +#include "app/animation_delegate.h" #include "app/slide_animation.h" #include "chrome/browser/autocomplete/autocomplete.h" #include "chrome/browser/autocomplete/autocomplete_popup_model.h" diff --git a/chrome/browser/ui/views/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmark_bar_view.cc index 54fb27b..439df1d 100644 --- a/chrome/browser/ui/views/bookmark_bar_view.cc +++ b/chrome/browser/ui/views/bookmark_bar_view.cc @@ -12,6 +12,7 @@ #include "app/l10n_util.h" #include "app/os_exchange_data.h" #include "app/resource_bundle.h" +#include "app/slide_animation.h" #include "app/text_elider.h" #include "base/i18n/rtl.h" #include "base/string_util.h" @@ -748,6 +749,10 @@ bool BookmarkBarView::IsOnTop() const { return true; } +double BookmarkBarView::GetAnimationValue() const { + return size_animation_->GetCurrentValue(); +} + bool BookmarkBarView::IsAlwaysShown() const { return profile_->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar); } @@ -772,6 +777,10 @@ int BookmarkBarView::GetToolbarOverlap(bool return_max) const { size_animation_->GetCurrentValue()); } +bool BookmarkBarView::is_animating() { + return size_animation_->is_animating(); +} + void BookmarkBarView::AnimationProgressed(const Animation* animation) { if (browser_) browser_->ToolbarSizeChanged(true); diff --git a/chrome/browser/ui/views/bookmark_bar_view.h b/chrome/browser/ui/views/bookmark_bar_view.h index 356d944..a70a03d 100644 --- a/chrome/browser/ui/views/bookmark_bar_view.h +++ b/chrome/browser/ui/views/bookmark_bar_view.h @@ -8,7 +8,7 @@ #include <set> -#include "app/slide_animation.h" +#include "app/animation_delegate.h" #include "chrome/browser/bookmarks/bookmark_drag_data.h" #include "chrome/browser/bookmarks/bookmark_model_observer.h" #include "chrome/browser/sync/profile_sync_service.h" @@ -22,6 +22,7 @@ class Browser; class PageNavigator; class PrefService; +class SlideAnimation; namespace views { class CustomButton; @@ -108,9 +109,7 @@ class BookmarkBarView : public DetachableToolbarView, // DetachableToolbarView methods: virtual bool IsDetached() const; virtual bool IsOnTop() const; - virtual double GetAnimationValue() const { - return size_animation_->GetCurrentValue(); - } + virtual double GetAnimationValue() const; virtual int GetToolbarOverlap() const { return GetToolbarOverlap(false); } @@ -178,7 +177,7 @@ class BookmarkBarView : public DetachableToolbarView, int GetToolbarOverlap(bool return_max) const; // Whether or not we are animating. - bool is_animating() { return size_animation_->is_animating(); } + bool is_animating(); // SlideAnimationDelegate implementation. void AnimationProgressed(const Animation* animation); diff --git a/chrome/browser/ui/views/browser_actions_container.h b/chrome/browser/ui/views/browser_actions_container.h index 5c5b3b4..62b567f 100644 --- a/chrome/browser/ui/views/browser_actions_container.h +++ b/chrome/browser/ui/views/browser_actions_container.h @@ -10,7 +10,8 @@ #include <string> #include <vector> -#include "app/slide_animation.h" +#include "app/animation_delegate.h" +#include "app/tween.h" #include "base/task.h" #include "chrome/browser/extensions/extension_context_menu_model.h" #include "chrome/browser/extensions/extension_toolbar_model.h" @@ -34,6 +35,7 @@ class ExtensionAction; class ExtensionPopup; class PrefService; class Profile; +class SlideAnimation; namespace gfx { class CanvasSkia; diff --git a/chrome/browser/ui/views/download_item_view.cc b/chrome/browser/ui/views/download_item_view.cc index 3ceaf52..7b3e579 100644 --- a/chrome/browser/ui/views/download_item_view.cc +++ b/chrome/browser/ui/views/download_item_view.cc @@ -8,6 +8,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" +#include "app/slide_animation.h" #include "app/text_elider.h" #include "base/callback.h" #include "base/file_path.h" diff --git a/chrome/browser/ui/views/download_item_view.h b/chrome/browser/ui/views/download_item_view.h index a6c138b..476f479 100644 --- a/chrome/browser/ui/views/download_item_view.h +++ b/chrome/browser/ui/views/download_item_view.h @@ -19,7 +19,7 @@ #include <string> -#include "app/slide_animation.h" +#include "app/animation_delegate.h" #include "base/basictypes.h" #include "base/scoped_ptr.h" #include "base/time.h" @@ -41,6 +41,7 @@ class BaseDownloadItemModel; class DownloadShelfView; class SkBitmap; class DownloadShelfContextMenuWin; +class SlideAnimation; class DownloadItemView : public views::ButtonListener, public views::View, diff --git a/chrome/browser/ui/views/download_shelf_view.cc b/chrome/browser/ui/views/download_shelf_view.cc index 139fa54..7ad21cc 100644 --- a/chrome/browser/ui/views/download_shelf_view.cc +++ b/chrome/browser/ui/views/download_shelf_view.cc @@ -8,6 +8,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" +#include "app/slide_animation.h" #include "base/logging.h" #include "chrome/browser/download/download_item.h" #include "chrome/browser/download/download_item_model.h" diff --git a/chrome/browser/ui/views/download_shelf_view.h b/chrome/browser/ui/views/download_shelf_view.h index 126eff0..4394a2f 100644 --- a/chrome/browser/ui/views/download_shelf_view.h +++ b/chrome/browser/ui/views/download_shelf_view.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_VIEWS_DOWNLOAD_SHELF_VIEW_H_ #pragma once -#include "app/slide_animation.h" +#include "app/animation_delegate.h" #include "chrome/browser/download/download_shelf.h" #include "chrome/browser/views/accessible_pane_view.h" #include "views/controls/button/button.h" @@ -21,9 +21,9 @@ class ImageView; class BaseDownloadItemModel; class Browser; class BrowserView; - class DownloadAnimation; class DownloadItemView; +class SlideAnimation; // DownloadShelfView is a view that contains individual views for each download, // as well as a close button and a link to show all downloads. diff --git a/chrome/browser/ui/views/dropdown_bar_host.h b/chrome/browser/ui/views/dropdown_bar_host.h index a2a0acd..f971ed0 100644 --- a/chrome/browser/ui/views/dropdown_bar_host.h +++ b/chrome/browser/ui/views/dropdown_bar_host.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_ #pragma once -#include "app/animation.h" +#include "app/animation_delegate.h" #include "base/scoped_ptr.h" #include "chrome/common/native_web_keyboard_event.h" #include "gfx/native_widget_types.h" diff --git a/chrome/browser/ui/views/frame/contents_container.h b/chrome/browser/ui/views/frame/contents_container.h index 9f25c6b..9b32e2d 100644 --- a/chrome/browser/ui/views/frame/contents_container.h +++ b/chrome/browser/ui/views/frame/contents_container.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_ #pragma once -#include "app/animation.h" +#include "app/animation_delegate.h" #include "base/scoped_ptr.h" #include "views/view.h" diff --git a/chrome/browser/ui/views/fullscreen_exit_bubble.cc b/chrome/browser/ui/views/fullscreen_exit_bubble.cc index 635e9d2..3e303a2 100644 --- a/chrome/browser/ui/views/fullscreen_exit_bubble.cc +++ b/chrome/browser/ui/views/fullscreen_exit_bubble.cc @@ -7,6 +7,7 @@ #include "app/keyboard_codes.h" #include "app/l10n_util.h" #include "app/resource_bundle.h" +#include "app/slide_animation.h" #include "chrome/app/chrome_command_ids.h" #include "gfx/canvas_skia.h" #include "grit/generated_resources.h" diff --git a/chrome/browser/ui/views/fullscreen_exit_bubble.h b/chrome/browser/ui/views/fullscreen_exit_bubble.h index 167f885..bb1c550 100644 --- a/chrome/browser/ui/views/fullscreen_exit_bubble.h +++ b/chrome/browser/ui/views/fullscreen_exit_bubble.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_VIEWS_FULLSCREEN_EXIT_BUBBLE_H__ #pragma once -#include "app/slide_animation.h" +#include "app/animation_delegate.h" #include "base/scoped_ptr.h" #include "base/timer.h" #include "chrome/browser/command_updater.h" @@ -18,6 +18,8 @@ class WidgetGtk; } #endif +class SlideAnimation; + // FullscreenExitBubble is responsible for showing a bubble atop the screen in // fullscreen mode, telling users how to exit and providing a click target. // The bubble auto-hides, and re-shows when the user moves to the screen top. diff --git a/chrome/browser/ui/views/info_bubble.cc b/chrome/browser/ui/views/info_bubble.cc index 28e0181..befb716 100644 --- a/chrome/browser/ui/views/info_bubble.cc +++ b/chrome/browser/ui/views/info_bubble.cc @@ -5,6 +5,7 @@ #include "chrome/browser/views/info_bubble.h" #include "app/keyboard_codes.h" +#include "app/slide_animation.h" #include "chrome/browser/window_sizer.h" #include "chrome/common/notification_service.h" #include "gfx/canvas_skia.h" @@ -332,6 +333,9 @@ InfoBubble::InfoBubble(views::WidgetGtk::Type type) } #endif +InfoBubble::~InfoBubble() { +} + void InfoBubble::Init(views::Widget* parent, const gfx::Rect& position_relative_to, BubbleBorder::ArrowLocation arrow_location, diff --git a/chrome/browser/ui/views/info_bubble.h b/chrome/browser/ui/views/info_bubble.h index 8b6d854..a0db967 100644 --- a/chrome/browser/ui/views/info_bubble.h +++ b/chrome/browser/ui/views/info_bubble.h @@ -6,11 +6,12 @@ #define CHROME_BROWSER_UI_VIEWS_INFO_BUBBLE_H_ #pragma once -#include "app/slide_animation.h" +#include "app/animation_delegate.h" #include "third_party/skia/include/core/SkColor.h" #include "views/accelerator.h" #include "views/view.h" #include "chrome/browser/views/bubble_border.h" + #if defined(OS_WIN) #include "views/widget/widget_win.h" #elif defined(OS_LINUX) @@ -26,10 +27,8 @@ // InfoBubble insets the contents for you, so the contents typically shouldn't // have any additional margins. -#if defined(OS_WIN) -class BorderWidget; -#endif class InfoBubble; +class SlideAnimation; namespace views { class Widget; @@ -39,6 +38,10 @@ namespace gfx { class Path; } +#if defined(OS_WIN) +class BorderWidget; +#endif + // This is used to paint the border of the InfoBubble. Windows uses this via // BorderWidget (see below), while others can use it directly in the bubble. class BorderContents : public views::View { @@ -233,7 +236,7 @@ class InfoBubble #if defined(OS_CHROMEOS) explicit InfoBubble(views::WidgetGtk::Type type); #endif - virtual ~InfoBubble() {} + virtual ~InfoBubble(); // Creates the InfoBubble. virtual void Init(views::Widget* parent, diff --git a/chrome/browser/ui/views/infobars/infobars.h b/chrome/browser/ui/views/infobars/infobars.h index a168e3c..2e32ac6 100644 --- a/chrome/browser/ui/views/infobars/infobars.h +++ b/chrome/browser/ui/views/infobars/infobars.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBARS_H_ #pragma once -#include "app/animation.h" +#include "app/animation_delegate.h" #include "base/task.h" #include "chrome/browser/tab_contents/infobar_delegate.h" #include "views/controls/button/button.h" diff --git a/chrome/browser/ui/views/location_bar/suggested_text_view.h b/chrome/browser/ui/views/location_bar/suggested_text_view.h index 83c4cb5..688346f 100644 --- a/chrome/browser/ui/views/location_bar/suggested_text_view.h +++ b/chrome/browser/ui/views/location_bar/suggested_text_view.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SUGGESTED_TEXT_VIEW_H_ #pragma once -#include "app/animation.h" +#include "app/animation_delegate.h" #include "views/controls/label.h" class LocationBarView; diff --git a/chrome/browser/ui/views/notifications/balloon_view.cc b/chrome/browser/ui/views/notifications/balloon_view.cc index cf0442b..c394b9a 100644 --- a/chrome/browser/ui/views/notifications/balloon_view.cc +++ b/chrome/browser/ui/views/notifications/balloon_view.cc @@ -8,6 +8,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" +#include "app/slide_animation.h" #include "base/message_loop.h" #include "base/utf_string_conversions.h" #include "chrome/browser/notifications/balloon.h" diff --git a/chrome/browser/ui/views/notifications/balloon_view.h b/chrome/browser/ui/views/notifications/balloon_view.h index 994075d..7372c84 100644 --- a/chrome/browser/ui/views/notifications/balloon_view.h +++ b/chrome/browser/ui/views/notifications/balloon_view.h @@ -8,7 +8,7 @@ #define CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_H_ #pragma once -#include "app/slide_animation.h" +#include "app/animation_delegate.h" #include "base/basictypes.h" #include "base/scoped_ptr.h" #include "base/task.h" @@ -39,6 +39,7 @@ class BalloonCollection; class NotificationDetails; class NotificationOptionsMenuModel; class NotificationSource; +class SlideAnimation; // A balloon view is the UI component for a desktop notification toasts. // It draws a border, and within the border an HTML renderer. diff --git a/chrome/browser/ui/views/page_info_bubble_view.h b/chrome/browser/ui/views/page_info_bubble_view.h index a2124da..f0df41ff 100644 --- a/chrome/browser/ui/views/page_info_bubble_view.h +++ b/chrome/browser/ui/views/page_info_bubble_view.h @@ -6,6 +6,8 @@ #define CHROME_BROWSER_UI_VIEWS_PAGE_INFO_BUBBLE_VIEW_H_ #pragma once +#include "app/animation_delegate.h" +#include "app/slide_animation.h" #include "chrome/browser/page_info_model.h" #include "chrome/browser/views/info_bubble.h" #include "views/controls/link.h" diff --git a/chrome/browser/ui/views/status_bubble_views.cc b/chrome/browser/ui/views/status_bubble_views.cc index 234b6f0..599e726 100644 --- a/chrome/browser/ui/views/status_bubble_views.cc +++ b/chrome/browser/ui/views/status_bubble_views.cc @@ -6,6 +6,7 @@ #include <algorithm> +#include "app/animation_delegate.h" #include "app/linear_animation.h" #include "app/resource_bundle.h" #include "app/text_elider.h" diff --git a/chrome/browser/ui/views/tabs/base_tab.h b/chrome/browser/ui/views/tabs/base_tab.h index ff8cb55..8f47c51 100644 --- a/chrome/browser/ui/views/tabs/base_tab.h +++ b/chrome/browser/ui/views/tabs/base_tab.h @@ -6,7 +6,8 @@ #define CHROME_BROWSER_UI_VIEWS_TABS_BASE_TAB_H_ #pragma once -#include "app/animation.h" +#include "app/animation_container.h" +#include "app/animation_delegate.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" #include "chrome/browser/views/tabs/tab_renderer_data.h" diff --git a/chrome/browser/ui/views/tabs/dragged_tab_controller.cc b/chrome/browser/ui/views/tabs/dragged_tab_controller.cc index 3798180..8a3b173 100644 --- a/chrome/browser/ui/views/tabs/dragged_tab_controller.cc +++ b/chrome/browser/ui/views/tabs/dragged_tab_controller.cc @@ -8,6 +8,7 @@ #include <set> #include "app/animation.h" +#include "app/animation_delegate.h" #include "app/slide_animation.h" #include "app/resource_bundle.h" #include "base/callback.h" |