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

Unified Diff: chrome/browser/chromeos/login/webui_screen_locker.cc

Issue 13041002: Cancel drag upon screen lock (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: chrome/browser/chromeos/login/webui_screen_locker.cc
diff --git a/chrome/browser/chromeos/login/webui_screen_locker.cc b/chrome/browser/chromeos/login/webui_screen_locker.cc
index 1fc875e5e6672ef1d17deac1f71f50fc78026f42..16ed4207f24c10bc1cdb835b0585a29beff70a54 100644
--- a/chrome/browser/chromeos/login/webui_screen_locker.cc
+++ b/chrome/browser/chromeos/login/webui_screen_locker.cc
@@ -25,6 +25,7 @@
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_ui.h"
+#include "ui/aura/client/capture_client.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/x/x11_util.h"
#include "ui/gfx/screen.h"
@@ -275,8 +276,12 @@ void WebUIScreenLocker::OnLockWindowReady() {
void WebUIScreenLocker::OnSessionStateEvent(
ash::SessionStateObserver::EventType event) {
- if (event == ash::SessionStateObserver::EVENT_LOCK_ANIMATION_FINISHED)
+ if (event == ash::SessionStateObserver::EVENT_LOCK_ANIMATION_FINISHED) {
+ // Release capture if any.
+ aura::client::GetCaptureClient(GetNativeWindow()->GetRootWindow())->
+ SetCapture(NULL);
GetWebUI()->CallJavascriptFunction("cr.ui.Oobe.animateOnceFullyDisplayed");
+ }
}
////////////////////////////////////////////////////////////////////////////////
« ash/drag_drop/drag_drop_controller_unittest.cc ('K') | « ash/drag_drop/drag_drop_tracker_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698