OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/views/toolbar/browser_actions_container.h" | 5 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 DCHECK_EQ(resize_animation_.get(), animation); | 443 DCHECK_EQ(resize_animation_.get(), animation); |
444 resize_amount_ = static_cast<int>(resize_animation_->GetCurrentValue() * | 444 resize_amount_ = static_cast<int>(resize_animation_->GetCurrentValue() * |
445 (container_width_ - animation_target_size_)); | 445 (container_width_ - animation_target_size_)); |
446 OnBrowserActionVisibilityChanged(); | 446 OnBrowserActionVisibilityChanged(); |
447 } | 447 } |
448 | 448 |
449 void BrowserActionsContainer::AnimationEnded(const gfx::Animation* animation) { | 449 void BrowserActionsContainer::AnimationEnded(const gfx::Animation* animation) { |
450 container_width_ = animation_target_size_; | 450 container_width_ = animation_target_size_; |
451 animation_target_size_ = 0; | 451 animation_target_size_ = 0; |
452 resize_amount_ = 0; | 452 resize_amount_ = 0; |
| 453 suppress_chevron_ = false; |
453 OnBrowserActionVisibilityChanged(); | 454 OnBrowserActionVisibilityChanged(); |
454 suppress_chevron_ = false; | |
455 } | 455 } |
456 | 456 |
457 void BrowserActionsContainer::NotifyMenuDeleted( | 457 void BrowserActionsContainer::NotifyMenuDeleted( |
458 BrowserActionOverflowMenuController* controller) { | 458 BrowserActionOverflowMenuController* controller) { |
459 DCHECK_EQ(overflow_menu_, controller); | 459 DCHECK_EQ(overflow_menu_, controller); |
460 overflow_menu_ = NULL; | 460 overflow_menu_ = NULL; |
461 } | 461 } |
462 | 462 |
463 void BrowserActionsContainer::OnWidgetDestroying(views::Widget* widget) { | 463 void BrowserActionsContainer::OnWidgetDestroying(views::Widget* widget) { |
464 DCHECK_EQ(popup_->GetWidget(), widget); | 464 DCHECK_EQ(popup_->GetWidget(), widget); |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 views::BubbleBorder::TOP_RIGHT, | 880 views::BubbleBorder::TOP_RIGHT, |
881 show_action); | 881 show_action); |
882 popup_->GetWidget()->AddObserver(this); | 882 popup_->GetWidget()->AddObserver(this); |
883 popup_button_ = button; | 883 popup_button_ = button; |
884 | 884 |
885 // Only set button as pushed if it was triggered by a user click. | 885 // Only set button as pushed if it was triggered by a user click. |
886 if (should_grant) | 886 if (should_grant) |
887 popup_button_->SetButtonPushed(); | 887 popup_button_->SetButtonPushed(); |
888 return true; | 888 return true; |
889 } | 889 } |
OLD | NEW |