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

Unified Diff: apps/app_window.h

Issue 297123002: API proposal for chrome.app.window to intercept all keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix permission check in code after rename Created 6 years, 5 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 | apps/app_window.cc » ('j') | apps/app_window.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/app_window.h
diff --git a/apps/app_window.h b/apps/app_window.h
index f2e0e98d815be3c42a10bc939588a7e3cf0d1307..13b37c8bab10f765860816dc5bc1f918b73f8e02 100644
--- a/apps/app_window.h
+++ b/apps/app_window.h
@@ -354,6 +354,10 @@ class AppWindow : public content::NotificationObserver,
// may be false if the bit is silently switched off for security reasons.
bool IsAlwaysOnTop() const;
+ // Set whether the window should get even reserved keys (modulo platform
+ // restrictions).
+ void SetInterceptAllKeys(bool want_all_keys);
+
// Retrieve the current state of the app window as a dictionary, to pass to
// the renderer.
void GetSerializedState(base::DictionaryValue* properties) const;
@@ -462,6 +466,9 @@ class AppWindow : public content::NotificationObserver,
// Update the always-on-top bit in the native app window.
void UpdateNativeAlwaysOnTop();
+ // Update the intercept-all-keys bit in the native app window.
+ void UpdateNativeInterceptAllKeys();
+
// Sends the onWindowShown event to the app if the window has been shown. Only
// has an effect in tests.
void SendOnWindowShownIfShown();
@@ -558,6 +565,10 @@ class AppWindow : public content::NotificationObserver,
// taskbar.
bool cached_always_on_top_;
+ // Cached value of InterceptAllKeys property that is used to save/restore
+ // state as the window is active/loses focus.
+ bool cached_want_all_keys_;
+
DISALLOW_COPY_AND_ASSIGN(AppWindow);
};
« no previous file with comments | « no previous file | apps/app_window.cc » ('j') | apps/app_window.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698