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

Unified Diff: extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc

Issue 1316013004: Remove "API proposal for chrome.app.window to intercept all keys." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to TOT Created 5 years, 3 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: extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc
diff --git a/extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc b/extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc
index 267f02ea064b04a7806139fff0206186ce118490..6d9dc305a983c75b1e0aaa159e2d129fe8b7d755 100644
--- a/extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc
+++ b/extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc
@@ -27,8 +27,7 @@ namespace SetShape = app_current_window_internal::SetShape;
namespace SetAlwaysOnTop = app_current_window_internal::SetAlwaysOnTop;
namespace SetVisibleOnAllWorkspaces =
app_current_window_internal::SetVisibleOnAllWorkspaces;
-namespace SetInterceptAllKeys =
- app_current_window_internal::SetInterceptAllKeys;
+
using app_current_window_internal::Bounds;
using app_current_window_internal::Region;
using app_current_window_internal::RegionRect;
@@ -51,11 +50,6 @@ const char kRequiresFramelessWindow[] =
const char kAlwaysOnTopPermission[] =
"The \"app.window.alwaysOnTop\" permission is required.";
-const char kInterceptAllKeysPermission[] = "app.window.interceptAllKeys";
-
-const char kInterceptAllKeysPermissionError[] =
- "The \"app.window.interceptAllKeys\" permission is required.";
-
const char kInvalidParameters[] = "Invalid parameters.";
const int kUnboundedSize = SizeConstraints::kUnboundedSize;
@@ -382,19 +376,4 @@ bool AppCurrentWindowInternalSetVisibleOnAllWorkspacesFunction::RunWithWindow(
return true;
}
-bool AppCurrentWindowInternalSetInterceptAllKeysFunction::RunWithWindow(
- AppWindow* window) {
- if (!extension()->permissions_data()->HasAPIPermission(
- kInterceptAllKeysPermission)) {
- error_ = kInterceptAllKeysPermissionError;
- return false;
- }
-
- scoped_ptr<SetInterceptAllKeys::Params> params(
- SetInterceptAllKeys::Params::Create(*args_));
- CHECK(params.get());
- window->SetInterceptAllKeys(params->want_all_keys);
- return true;
-}
-
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698