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

Unified Diff: components/infobars/core/infobar_manager.h

Issue 2705293008: Disable info bar animations during automated testing. (Closed)
Patch Set: add DCHECKs Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: components/infobars/core/infobar_manager.h
diff --git a/components/infobars/core/infobar_manager.h b/components/infobars/core/infobar_manager.h
index a7a57e26107a6864b5892731e3b3caab9cbc5621..a3da3dbe8c52d0169ff5180e461a246bb58cccfd 100644
--- a/components/infobars/core/infobar_manager.h
+++ b/components/infobars/core/infobar_manager.h
@@ -93,6 +93,8 @@ class InfoBarManager {
void AddObserver(Observer* obs);
void RemoveObserver(Observer* obs);
+ bool animations_enabled() { return animations_enabled_; }
Peter Kasting 2017/02/23 00:33:56 Nit: const
samuong 2017/02/23 00:45:26 Done.
+
// Returns the active entry ID.
virtual int GetActiveEntryID() = 0;
@@ -110,6 +112,10 @@ class InfoBarManager {
virtual void NotifyInfoBarAdded(InfoBar* infobar);
virtual void NotifyInfoBarRemoved(InfoBar* infobar, bool animate);
+ void set_animations_enabled(bool animations_enabled) {
Peter Kasting 2017/02/23 00:33:56 Nit: Looks like in this class non-virtuals are usu
samuong 2017/02/23 00:45:26 Done.
+ animations_enabled_ = animations_enabled;
+ }
+
private:
// InfoBars associated with this InfoBarManager. We own these pointers.
// However, this is not a ScopedVector, because we don't delete the infobars
@@ -122,6 +128,7 @@ class InfoBarManager {
InfoBars infobars_;
bool infobars_enabled_;
+ bool animations_enabled_;
base::ObserverList<Observer, true> observer_list_;

Powered by Google App Engine
This is Rietveld 408576698