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

Unified Diff: ui/display/chromeos/test/test_native_display_delegate.cc

Issue 788423002: Add display task to trigger display configuration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@async-refactor3
Patch Set: Remove include in favour of forward declare 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: ui/display/chromeos/test/test_native_display_delegate.cc
diff --git a/ui/display/chromeos/test/test_native_display_delegate.cc b/ui/display/chromeos/test/test_native_display_delegate.cc
index f7371056a3bad8573e2b702649fe188a11d03ef1..ffcf2f32e47d611fc35c31fa608ed06bc42da3e2 100644
--- a/ui/display/chromeos/test/test_native_display_delegate.cc
+++ b/ui/display/chromeos/test/test_native_display_delegate.cc
@@ -60,6 +60,17 @@ std::vector<DisplaySnapshot*> TestNativeDisplayDelegate::GetDisplays() {
return outputs_;
}
+void TestNativeDisplayDelegate::GetDisplays(
+ const GetDisplaysCallback& callback) {
+ auto result = GetDisplays();
+ if (run_async_) {
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::Bind(callback, result));
+ } else {
+ callback.Run(result);
+ }
+}
+
void TestNativeDisplayDelegate::AddMode(const DisplaySnapshot& output,
const DisplayMode* mode) {
log_->AppendAction(GetAddOutputModeAction(output, mode));
« no previous file with comments | « ui/display/chromeos/test/test_native_display_delegate.h ('k') | ui/display/chromeos/update_display_configuration_task.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698