Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: chrome/browser/views/tabs/tab_overview_grid.cc

Issue 126185: Improved tab overview animations with better animation and wiring to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/views/tabs/tab_overview_grid.cc
===================================================================
--- chrome/browser/views/tabs/tab_overview_grid.cc (revision 18480)
+++ chrome/browser/views/tabs/tab_overview_grid.cc (working copy)
@@ -7,6 +7,7 @@
#include "chrome/browser/views/tabs/tab_overview_cell.h"
#include "chrome/browser/views/tabs/tab_overview_controller.h"
#include "chrome/browser/views/tabs/tab_overview_drag_controller.h"
+#include "views/screen.h"
TabOverviewGrid::TabOverviewGrid(TabOverviewController* controller)
: controller_(controller) {
@@ -27,6 +28,14 @@
drag_controller_.reset(NULL);
}
+void TabOverviewGrid::UpdateDragController() {
+ if (drag_controller_.get()) {
+ gfx::Point mouse_loc = views::Screen::GetCursorScreenPoint();
+ ConvertPointToView(NULL, this, &mouse_loc);
+ drag_controller_->Drag(mouse_loc);
+ }
+}
+
bool TabOverviewGrid::OnMousePressed(const views::MouseEvent& event) {
if (drag_controller_.get())
return true;
@@ -61,3 +70,18 @@
drag_controller_->CommitDrag(event.location());
drag_controller_.reset(NULL);
}
+
+void TabOverviewGrid::AnimationEnded(const Animation* animation) {
+ Grid::AnimationEnded(animation);
+ controller_->GridAnimationEnded();
+}
+
+void TabOverviewGrid::AnimationProgressed(const Animation* animation) {
+ Grid::AnimationProgressed(animation);
+ controller_->GridAnimationProgressed();
+}
+
+void TabOverviewGrid::AnimationCanceled(const Animation* animation) {
+ Grid::AnimationCanceled(animation);
+ controller_->GridAnimationCanceled();
+}

Powered by Google App Engine
This is Rietveld 408576698