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

Unified Diff: chrome/browser/extensions/api/app_window/app_window_api.cc

Issue 13934007: Adding experimental maximize mode (behind a flag) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few self nits Created 7 years, 8 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_window/app_window_api.cc
diff --git a/chrome/browser/extensions/api/app_window/app_window_api.cc b/chrome/browser/extensions/api/app_window/app_window_api.cc
index 1f726db950869721bfeacc309dadf83f108de687..ff5888936dd9e17a61c0a77fb99e3f3637bb4877 100644
--- a/chrome/browser/extensions/api/app_window/app_window_api.cc
+++ b/chrome/browser/extensions/api/app_window/app_window_api.cc
@@ -24,6 +24,10 @@
#include "googleurl/src/gurl.h"
#include "ui/gfx/rect.h"
+#if defined(USE_ASH)
+#include "ash/shell.h"
+#endif
+
namespace app_window = extensions::api::app_window;
namespace Create = app_window::Create;
@@ -213,6 +217,11 @@ bool AppWindowCreateFunction::RunImpl() {
create_params.resizable = *options->resizable.get();
if (options->type != extensions::api::app_window::WINDOW_TYPE_PANEL) {
+#if defined(USE_ASH)
+ if (ash::Shell::IsForcedMaximizeMode())
+ create_params.state = ShellWindow::CreateParams::STATE_MAXIMIZED;
+ else
James Cook 2013/04/22 22:15:46 This feels awkward. Is there some other way to wri
Mr4D (OOO till 08-26) 2013/04/23 04:41:28 Well - I "improved" it, but now it is distributed
+#endif
switch (options->state) {
case extensions::api::app_window::STATE_NONE:
case extensions::api::app_window::STATE_NORMAL:
@@ -228,6 +237,11 @@ bool AppWindowCreateFunction::RunImpl() {
break;
}
}
+ } else {
+#if defined(USE_ASH)
+ if (ash::Shell::IsForcedMaximizeMode())
+ create_params.state = ShellWindow::CreateParams::STATE_MAXIMIZED;
+#endif
}
create_params.creator_process_id =

Powered by Google App Engine
This is Rietveld 408576698