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

Side by Side Diff: chrome/browser/gtk/browser_actions_toolbar_gtk.cc

Issue 6154001: Move animation code to new ui/base/animation directory.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/gtk/browser_actions_toolbar_gtk.h ('k') | chrome/browser/gtk/custom_button.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/gtk/browser_actions_toolbar_gtk.h" 5 #include "chrome/browser/gtk/browser_actions_toolbar_gtk.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 if (profile_->IsOffTheRecord()) 628 if (profile_->IsOffTheRecord())
629 index = model_->OriginalIndexToIncognito(index); 629 index = model_->OriginalIndexToIncognito(index);
630 630
631 gtk_box_reorder_child(GTK_BOX(button_hbox_.get()), button_widget, index); 631 gtk_box_reorder_child(GTK_BOX(button_hbox_.get()), button_widget, index);
632 } 632 }
633 633
634 void BrowserActionsToolbarGtk::ModelLoaded() { 634 void BrowserActionsToolbarGtk::ModelLoaded() {
635 SetContainerWidth(); 635 SetContainerWidth();
636 } 636 }
637 637
638 void BrowserActionsToolbarGtk::AnimationProgressed(const Animation* animation) { 638 void BrowserActionsToolbarGtk::AnimationProgressed(
639 const ui::Animation* animation) {
639 int width = start_width_ + (desired_width_ - start_width_) * 640 int width = start_width_ + (desired_width_ - start_width_) *
640 animation->GetCurrentValue(); 641 animation->GetCurrentValue();
641 gtk_widget_set_size_request(button_hbox_.get(), width, -1); 642 gtk_widget_set_size_request(button_hbox_.get(), width, -1);
642 643
643 if (width == desired_width_) 644 if (width == desired_width_)
644 resize_animation_.Reset(); 645 resize_animation_.Reset();
645 } 646 }
646 647
647 void BrowserActionsToolbarGtk::AnimationEnded(const Animation* animation) { 648 void BrowserActionsToolbarGtk::AnimationEnded(const ui::Animation* animation) {
648 gtk_widget_set_size_request(button_hbox_.get(), desired_width_, -1); 649 gtk_widget_set_size_request(button_hbox_.get(), desired_width_, -1);
649 UpdateChevronVisibility(); 650 UpdateChevronVisibility();
650 } 651 }
651 652
652 bool BrowserActionsToolbarGtk::IsCommandIdChecked(int command_id) const { 653 bool BrowserActionsToolbarGtk::IsCommandIdChecked(int command_id) const {
653 return false; 654 return false;
654 } 655 }
655 656
656 bool BrowserActionsToolbarGtk::IsCommandIdEnabled(int command_id) const { 657 bool BrowserActionsToolbarGtk::IsCommandIdEnabled(int command_id) const {
657 return true; 658 return true;
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 } 936 }
936 937
937 it->second.get()->GetContextMenu()->PopupAsContext(event->time); 938 it->second.get()->GetContextMenu()->PopupAsContext(event->time);
938 return TRUE; 939 return TRUE;
939 } 940 }
940 941
941 void BrowserActionsToolbarGtk::OnButtonShowOrHide(GtkWidget* sender) { 942 void BrowserActionsToolbarGtk::OnButtonShowOrHide(GtkWidget* sender) {
942 if (!resize_animation_.is_animating()) 943 if (!resize_animation_.is_animating())
943 UpdateChevronVisibility(); 944 UpdateChevronVisibility();
944 } 945 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/browser_actions_toolbar_gtk.h ('k') | chrome/browser/gtk/custom_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698