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

Unified Diff: chrome/browser/ui/views/ash/screenshot_taker.cc

Issue 9854012: Close the screenshot flash effect before the screenshot task is actually executed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698