Index: chrome/browser/ui/views/ash/screenshot_taker.cc |
diff --git a/chrome/browser/ui/views/ash/screenshot_taker.cc b/chrome/browser/ui/views/ash/screenshot_taker.cc |
index 1f874f1be47b8e454461b54dbe81d69f0ef75a33..5a9c13669b6ef1ed854532f31176442654e494ed 100644 |
--- a/chrome/browser/ui/views/ash/screenshot_taker.cc |
+++ b/chrome/browser/ui/views/ash/screenshot_taker.cc |
@@ -117,7 +117,9 @@ void ScreenshotTaker::HandleTakeScreenshot(aura::Window* window) { |
void ScreenshotTaker::CloseVisualFeedbackLayer(const base::Closure& task) { |
visual_feedback_layer_.reset(); |
- task.Run(); |
+ // We post |task| to the event loop rather than running directly, |
+ // to make sure the view is closed before the task. |
+ MessageLoopForUI::current()->PostTask(FROM_HERE, task); |
Daniel Erat
2012/03/26 13:15:32
I don't know if this will be guaranteed to work in
Jun Mukai
2012/03/26 14:27:12
Who should we ask for the double-check? oshima?
T
Daniel Erat
2012/03/26 14:49:15
piman@ would know what the plans (if any) are for
|
} |
void ScreenshotTaker::DisplayVisualFeedback(const gfx::Rect& rect, |