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

Unified Diff: chrome/browser/ui/extensions/shell_window.cc

Issue 11413131: Enable Pointer Lock for packaged apps using ShellWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge lkgr Created 8 years, 1 month 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/ui/extensions/shell_window.cc
diff --git a/chrome/browser/ui/extensions/shell_window.cc b/chrome/browser/ui/extensions/shell_window.cc
index 71e94598f31ed111a5702a9503820edbb5972978..27c3316f913862df42900a8669e1515d2e88a842 100644
--- a/chrome/browser/ui/extensions/shell_window.cc
+++ b/chrome/browser/ui/extensions/shell_window.cc
@@ -281,6 +281,13 @@ void ShellWindow::HandleKeyboardEvent(
native_window_->HandleKeyboardEvent(event);
}
+void ShellWindow::RequestToLockMouse(WebContents* web_contents,
+ bool user_gesture,
+ bool last_unlocked_by_target) {
+ web_contents->GotResponseToLockMouseRequest(
+ extension_->HasAPIPermission(extensions::APIPermission::kPointerLock));
+}
+
void ShellWindow::OnNativeClose() {
extensions::ShellWindowRegistry::Get(profile_)->RemoveShellWindow(this);
content::RenderViewHost* rvh = web_contents_->GetRenderViewHost();

Powered by Google App Engine
This is Rietveld 408576698