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

Unified Diff: chrome/browser/ui/toolbar/toolbar_actions_bar.h

Issue 795663003: [Mac Extensions Toolbar] Make the container's animationEndFrame always valid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/toolbar/toolbar_actions_bar.h
diff --git a/chrome/browser/ui/toolbar/toolbar_actions_bar.h b/chrome/browser/ui/toolbar/toolbar_actions_bar.h
index 9f9d5e91f046ff63e9147f63381fdaefbceab53f..bd42665c5978c406274bb40b409dbf2839207649 100644
--- a/chrome/browser/ui/toolbar/toolbar_actions_bar.h
+++ b/chrome/browser/ui/toolbar/toolbar_actions_bar.h
@@ -119,7 +119,9 @@ class ToolbarActionsBar : public extensions::ExtensionToolbarModel::Observer,
}
bool enabled() const { return model_ != nullptr; }
bool suppress_layout() const { return suppress_layout_; }
- bool suppress_animation() const { return suppress_animation_; }
+ bool suppress_animation() const {
+ return suppress_animation_ || disable_animations_during_testing_;
+ }
bool is_highlighting() const { return model_ && model_->is_highlighting(); }
const PlatformSettings& platform_settings() const {
return platform_settings_;
@@ -127,6 +129,11 @@ class ToolbarActionsBar : public extensions::ExtensionToolbarModel::Observer,
ToolbarActionsBarDelegate* delegate_for_test() { return delegate_; }
+ // During testing we can disable animations by setting this flag to true,
+ // so that the bar resizes instantly, instead of having to poll it while it
+ // animates to open/closed status.
+ static bool disable_animations_during_testing_;
Avi (use Gerrit) 2014/12/12 19:25:17 The standard naming convention is "for_testing"; c
Devlin 2014/12/12 19:50:21 Done.
+
private:
using ToolbarActions = ScopedVector<ToolbarActionViewController>;
« no previous file with comments | « chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm ('k') | chrome/browser/ui/toolbar/toolbar_actions_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698