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

Side by Side Diff: chrome/browser/ui/views/browser_actions_container.cc

Issue 11148007: views: Fix a bunch of dchecks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 8 years, 2 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
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698