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

Unified Diff: chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h

Issue 10915085: Functions for accessing app window properties, and modifying AppWindow-specifics (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: stray event, js linter Created 8 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: chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h
diff --git a/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h b/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h
index e3a35fb3e85db3ce5516f510f0e8d74b28e7d13e..a873a308712f2f4905715da20f6dd98b1a4d4ed6 100644
--- a/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h
+++ b/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h
@@ -62,6 +62,23 @@ class AppCurrentWindowInternalRestoreFunction
virtual bool RunWithWindow(ShellWindow* window) OVERRIDE;
};
+#define APP_CURRENT_WINDOW_FUNCTION(cpp, idl) \
+class AppCurrentWindowInternal ## cpp ## Function \
+ : public AppCurrentWindowInternalExtensionFunction { \
+public: \
+ DECLARE_EXTENSION_FUNCTION_NAME("app.currentWindowInternal." # idl); \
+\
+protected: \
+ virtual ~AppCurrentWindowInternal ## cpp ## Function() {} \
+ virtual bool RunWithWindow(ShellWindow* window) OVERRIDE; \
+}
+
+APP_CURRENT_WINDOW_FUNCTION(GetState, getState);
+APP_CURRENT_WINDOW_FUNCTION(SetMinSize, setMinSize);
+APP_CURRENT_WINDOW_FUNCTION(SetMaxSize, setMaxSize);
+
+#undef APP_CURRENT_WINDOW_FUNCTION
+
} // namespace extensions
#endif // CHROME_BROWSER_EXTENSIONS_API_APP_CURRENT_WINDOW_INTERNAL_APP_CURRENT_WINDOW_INTERNAL_API_H_

Powered by Google App Engine
This is Rietveld 408576698