| Index: chrome/browser/ui/views/download/download_item_view_md.h
|
| diff --git a/chrome/browser/ui/views/download/download_item_view_md.h b/chrome/browser/ui/views/download/download_item_view_md.h
|
| index e4357eaa57f2d222cfd6c26f073b87cfd709380c..289b5c182310e45c8fb6667147f74de4f844c67d 100644
|
| --- a/chrome/browser/ui/views/download/download_item_view_md.h
|
| +++ b/chrome/browser/ui/views/download/download_item_view_md.h
|
| @@ -31,9 +31,10 @@
|
| #include "content/public/browser/download_manager.h"
|
| #include "ui/gfx/animation/animation_delegate.h"
|
| #include "ui/gfx/font_list.h"
|
| +#include "ui/views/animation/button_ink_drop_delegate.h"
|
| +#include "ui/views/animation/ink_drop_host_view.h"
|
| #include "ui/views/context_menu_controller.h"
|
| #include "ui/views/controls/button/button.h"
|
| -#include "ui/views/view.h"
|
|
|
| class BarControlButton;
|
| class DownloadShelfView;
|
| @@ -61,8 +62,8 @@ class LabelButton;
|
|
|
| // The DownloadItemView in MD style. This is copied from DownloadItemView,
|
| // which it should eventually replace.
|
| -class DownloadItemViewMd : public views::ButtonListener,
|
| - public views::View,
|
| +class DownloadItemViewMd : public views::InkDropHostView,
|
| + public views::ButtonListener,
|
| public views::ContextMenuController,
|
| public content::DownloadItem::Observer,
|
| public gfx::AnimationDelegate {
|
| @@ -97,12 +98,19 @@ class DownloadItemViewMd : public views::ButtonListener,
|
| bool OnMouseDragged(const ui::MouseEvent& event) override;
|
| void OnMouseReleased(const ui::MouseEvent& event) override;
|
| void OnMouseCaptureLost() override;
|
| + void OnMouseEntered(const ui::MouseEvent& event) override;
|
| + void OnMouseExited(const ui::MouseEvent& event) override;
|
| bool OnKeyPressed(const ui::KeyEvent& event) override;
|
| bool GetTooltipText(const gfx::Point& p,
|
| base::string16* tooltip) const override;
|
| + void OnDragDone() override;
|
| void GetAccessibleState(ui::AXViewState* state) override;
|
| void OnThemeChanged() override;
|
|
|
| + // Overridden from view::InkDropHostView:
|
| + scoped_ptr<views::InkDropAnimation> CreateInkDropAnimation() const override;
|
| + scoped_ptr<views::InkDropHover> CreateInkDropHover() const override;
|
| +
|
| // Overridden from ui::EventHandler:
|
| void OnGestureEvent(ui::GestureEvent* event) override;
|
|
|
| @@ -220,10 +228,10 @@ class DownloadItemViewMd : public views::ButtonListener,
|
| void ProgressTimerFired();
|
|
|
| // Returns the base text color.
|
| - SkColor GetTextColor();
|
| + SkColor GetTextColor() const;
|
|
|
| // Returns a slightly dimmed version of the base text color.
|
| - SkColor GetDimmedTextColor();
|
| + SkColor GetDimmedTextColor() const;
|
|
|
| // The download shelf that owns us.
|
| DownloadShelfView* shelf_;
|
| @@ -263,19 +271,21 @@ class DownloadItemViewMd : public views::ButtonListener,
|
| // Position that a possible drag started at.
|
| gfx::Point drag_start_point_;
|
|
|
| + // Position (in coordinate system of |this|) of the last event that triggered
|
| + // an ink drop.
|
| + gfx::Point last_ink_drop_location_;
|
| +
|
| // For canceling an in progress icon request.
|
| base::CancelableTaskTracker cancelable_task_tracker_;
|
|
|
| // A model class to control the status text we display.
|
| DownloadItemModel model_;
|
|
|
| - // Hover animations for our body and drop buttons.
|
| - scoped_ptr<gfx::SlideAnimation> body_hover_animation_;
|
| - scoped_ptr<gfx::SlideAnimation> drop_hover_animation_;
|
| -
|
| // Animation for download complete.
|
| scoped_ptr<gfx::SlideAnimation> complete_animation_;
|
|
|
| + views::ButtonInkDropDelegate ink_drop_delegate_;
|
| +
|
| // Progress animation
|
| base::RepeatingTimer progress_timer_;
|
|
|
|
|