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

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

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.cc
diff --git a/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc b/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc
index 050478f716b7fe4d1138fe17de46a0811078f43b..fd4aa6b4aeff1908b2b311441542de2b1af6a636 100644
--- a/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc
+++ b/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/ui/extensions/shell_window.h"
#include "chrome/common/extensions/extension_error_utils.h"
+#include "chrome/common/extensions/api/app_current_window_internal.h"
namespace extensions {
@@ -56,4 +57,34 @@ bool AppCurrentWindowInternalRestoreFunction::RunWithWindow(
return true;
}
+// shorten access
+namespace acwi = extensions::api::app_current_window_internal;
+
+bool AppCurrentWindowInternalGetStateFunction::RunWithWindow(
+ ShellWindow* window) {
+ acwi::WindowCacheRefresh state;
+ state.window_key = window->window_key();
+ // TODO(tapted) Implement me
+ SetResult(state.ToValue().release());
+ return true;
+}
+
+bool AppCurrentWindowInternalSetMinSizeFunction::RunWithWindow(
+ ShellWindow* window) {
+ scoped_ptr<acwi::SetMinSize::Params> params(
+ acwi::SetMinSize::Params::Create(*args_));
+ EXTENSION_FUNCTION_VALIDATE(params.get());
+ // TODO(tapted) Implement me
+ return true;
+}
+
+bool AppCurrentWindowInternalSetMaxSizeFunction::RunWithWindow(
+ ShellWindow* window) {
+ scoped_ptr<acwi::SetMaxSize::Params> params(
+ acwi::SetMaxSize::Params::Create(*args_));
+ EXTENSION_FUNCTION_VALIDATE(params.get());
+ // TODO(tapted) Implement me
+ return true;
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698