| Index: ash/utility/screenshot_controller.cc
|
| diff --git a/ash/utility/screenshot_controller.cc b/ash/utility/screenshot_controller.cc
|
| index cfc98c195b6d16e173ead4c6d0d163056f21d046..b4ea619b31e06692cb4a7e37f15ee34d2d9378fc 100644
|
| --- a/ash/utility/screenshot_controller.cc
|
| +++ b/ash/utility/screenshot_controller.cc
|
| @@ -308,6 +308,14 @@ void ScreenshotController::CancelScreenshotSession() {
|
| base::STLDeleteValues(&layers_);
|
| cursor_setter_.reset();
|
| EnableMouseWarp(true);
|
| +
|
| + if (on_screenshot_session_done_) {
|
| + // Copy the closure to a temporary value so that if it calls
|
| + // CancelScreenshotSession we do not loop forever.
|
| + base::Closure on_done = on_screenshot_session_done_;
|
| + on_screenshot_session_done_.Reset();
|
| + on_done.Run();
|
| + }
|
| }
|
|
|
| void ScreenshotController::MaybeStart(const ui::LocatedEvent& event) {
|
|
|