OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser_actions_container.h" | 5 #include "chrome/browser/ui/views/browser_actions_container.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/tab_helper.h" | 10 #include "chrome/browser/extensions/tab_helper.h" |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 void BrowserActionsContainer::AnimationEnded(const ui::Animation* animation) { | 440 void BrowserActionsContainer::AnimationEnded(const ui::Animation* animation) { |
441 container_width_ = animation_target_size_; | 441 container_width_ = animation_target_size_; |
442 animation_target_size_ = 0; | 442 animation_target_size_ = 0; |
443 resize_amount_ = 0; | 443 resize_amount_ = 0; |
444 OnBrowserActionVisibilityChanged(); | 444 OnBrowserActionVisibilityChanged(); |
445 suppress_chevron_ = false; | 445 suppress_chevron_ = false; |
446 } | 446 } |
447 | 447 |
448 void BrowserActionsContainer::NotifyMenuDeleted( | 448 void BrowserActionsContainer::NotifyMenuDeleted( |
449 BrowserActionOverflowMenuController* controller) { | 449 BrowserActionOverflowMenuController* controller) { |
450 DCHECK(controller == overflow_menu_); | 450 DCHECK_EQ(overflow_menu_, controller); |
451 overflow_menu_ = NULL; | 451 overflow_menu_ = NULL; |
452 } | 452 } |
453 | 453 |
454 void BrowserActionsContainer::OnWidgetClosing(views::Widget* widget) { | 454 void BrowserActionsContainer::OnWidgetClosing(views::Widget* widget) { |
455 DCHECK_EQ(popup_->GetWidget(), widget); | 455 DCHECK_EQ(popup_->GetWidget(), widget); |
456 popup_->GetWidget()->RemoveObserver(this); | 456 popup_->GetWidget()->RemoveObserver(this); |
457 popup_ = NULL; | 457 popup_ = NULL; |
458 // |popup_button_| is NULL if the extension has been removed. | 458 // |popup_button_| is NULL if the extension has been removed. |
459 if (popup_button_) { | 459 if (popup_button_) { |
460 popup_button_->SetButtonNotPushed(); | 460 popup_button_->SetButtonNotPushed(); |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 views::BubbleBorder::TOP_LEFT : views::BubbleBorder::TOP_RIGHT; | 840 views::BubbleBorder::TOP_LEFT : views::BubbleBorder::TOP_RIGHT; |
841 popup_ = ExtensionPopup::ShowPopup(popup_url, | 841 popup_ = ExtensionPopup::ShowPopup(popup_url, |
842 browser_, | 842 browser_, |
843 reference_view, | 843 reference_view, |
844 arrow_location, | 844 arrow_location, |
845 show_action); | 845 show_action); |
846 popup_->GetWidget()->AddObserver(this); | 846 popup_->GetWidget()->AddObserver(this); |
847 popup_button_ = button; | 847 popup_button_ = button; |
848 popup_button_->SetButtonPushed(); | 848 popup_button_->SetButtonPushed(); |
849 } | 849 } |
OLD | NEW |