| OLD | NEW | 
|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/views/extensions/extension_shelf.h" | 5 #include "chrome/browser/views/extensions/extension_shelf.h" | 
| 6 | 6 | 
| 7 #include <algorithm> | 7 #include <algorithm> | 
| 8 | 8 | 
| 9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" | 
| 10 #include "base/logging.h" | 10 #include "base/logging.h" | 
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 466 } | 466 } | 
| 467 | 467 | 
| 468 void ExtensionShelf::Toolstrip::AnimationProgressed( | 468 void ExtensionShelf::Toolstrip::AnimationProgressed( | 
| 469     const Animation* animation) { | 469     const Animation* animation) { | 
| 470   LayoutHandle(); | 470   LayoutHandle(); | 
| 471 } | 471 } | 
| 472 | 472 | 
| 473 void ExtensionShelf::Toolstrip::AnimationEnded(const Animation* animation) { | 473 void ExtensionShelf::Toolstrip::AnimationEnded(const Animation* animation) { | 
| 474   LayoutHandle(); | 474   LayoutHandle(); | 
| 475   if (!expanded_) { | 475   if (!expanded_) { | 
| 476     // Must use the delay due to bug 18248. |  | 
| 477     HideShelfHandle(kHideDelayMs * 2); |  | 
| 478     AttachToShelf(false); | 476     AttachToShelf(false); | 
|  | 477     HideShelfHandle(0); | 
| 479   } | 478   } | 
| 480 } | 479 } | 
| 481 | 480 | 
| 482 int ExtensionShelf::Toolstrip::GetVerticalTearFromShelfThreshold() { | 481 int ExtensionShelf::Toolstrip::GetVerticalTearFromShelfThreshold() { | 
| 483   // TODO(sidchat): Compute this value from the toolstrip height. | 482   // TODO(sidchat): Compute this value from the toolstrip height. | 
| 484   return 29; | 483   return 29; | 
| 485 } | 484 } | 
| 486 | 485 | 
| 487 void ExtensionShelf::Toolstrip::DetachFromShelf(bool browserDetach) { | 486 void ExtensionShelf::Toolstrip::DetachFromShelf(bool browserDetach) { | 
| 488   DCHECK(handle_.get()); | 487   DCHECK(handle_.get()); | 
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1043 | 1042 | 
| 1044 bool ExtensionShelf::IsAlwaysShown() const { | 1043 bool ExtensionShelf::IsAlwaysShown() const { | 
| 1045   Profile* profile = browser_->profile(); | 1044   Profile* profile = browser_->profile(); | 
| 1046   return profile->GetPrefs()->GetBoolean(prefs::kShowExtensionShelf); | 1045   return profile->GetPrefs()->GetBoolean(prefs::kShowExtensionShelf); | 
| 1047 } | 1046 } | 
| 1048 | 1047 | 
| 1049 bool ExtensionShelf::OnNewTabPage() const { | 1048 bool ExtensionShelf::OnNewTabPage() const { | 
| 1050   return (browser_ && browser_->GetSelectedTabContents() && | 1049   return (browser_ && browser_->GetSelectedTabContents() && | 
| 1051       browser_->GetSelectedTabContents()->IsExtensionShelfAlwaysVisible()); | 1050       browser_->GetSelectedTabContents()->IsExtensionShelfAlwaysVisible()); | 
| 1052 } | 1051 } | 
| OLD | NEW | 
|---|