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

Unified Diff: ui/display/fake_display_delegate.h

Issue 2527263002: Add delay to FakeDisplayDelegate::Configure(). (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | ui/display/fake_display_delegate.cc » ('j') | ui/display/fake_display_delegate.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/fake_display_delegate.h
diff --git a/ui/display/fake_display_delegate.h b/ui/display/fake_display_delegate.h
index 83f0f2d89f9aca8080373c7538f16726db49dade..c1ce47529530a5d6fa71fbba7ef14a58e10737b9 100644
--- a/ui/display/fake_display_delegate.h
+++ b/ui/display/fake_display_delegate.h
@@ -9,8 +9,10 @@
#include <string>
#include <vector>
+#include "base/callback.h"
#include "base/macros.h"
#include "base/observer_list.h"
+#include "base/timer/timer.h"
#include "ui/display/display_export.h"
#include "ui/display/fake_display_snapshot.h"
#include "ui/display/types/fake_display_controller.h"
@@ -122,10 +124,17 @@ class DISPLAY_EXPORT FakeDisplayDelegate : public ui::NativeDisplayDelegate,
void OnConfigurationChanged();
private:
+ // Performs callback for Configure().
+ void ConfigureDone();
+
base::ObserverList<ui::NativeDisplayObserver> observers_;
std::vector<std::unique_ptr<ui::DisplaySnapshot>> displays_;
- // If |Initialize()| has been called.
+ // Add delay before finished Configure().
+ base::OneShotTimer configure_timer_;
+ base::Closure configure_callback_;
+
+ // If Initialize() has been called.
bool initialized_ = false;
// The next available display id.
« no previous file with comments | « no previous file | ui/display/fake_display_delegate.cc » ('j') | ui/display/fake_display_delegate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698