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

Unified Diff: extensions/browser/app_window/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 mac and clang build issues Created 6 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: extensions/browser/app_window/app_window.h
diff --git a/extensions/browser/app_window/app_window.h b/extensions/browser/app_window/app_window.h
index 5cbe8faa6932fe91d10a23af756f3484c9b7c726..c65a84e7acf84be18bc9a91fcc7b847a68df966b 100644
--- a/extensions/browser/app_window/app_window.h
+++ b/extensions/browser/app_window/app_window.h
@@ -336,6 +336,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;
@@ -548,6 +552,10 @@ class AppWindow : public content::NotificationObserver,
// Whether |alpha_enabled| was set in the CreateParams.
bool requested_alpha_enabled_;
+ // Cached value of InterceptAllKeys property that is used to save/restore
+ // state as the window is active/loses focus.
+ bool cached_want_all_keys_;
sadrul 2014/11/18 22:21:46 Is this cache useful?
Sriram 2014/11/18 22:45:43 It is used to unregister from destructor if hooks
+
DISALLOW_COPY_AND_ASSIGN(AppWindow);
};

Powered by Google App Engine
This is Rietveld 408576698