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

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

Issue 11363250: Allow Chrome apps to create Ash Panels (apps v2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac and win builds Created 8 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: 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 9df135cdf4d1db0771a1de68e3812910ff922de8..ee40b6c79f815308694a7d12de0c572359b7a62a 100644
--- a/chrome/browser/extensions/api/app_window/app_window_api.cc
+++ b/chrome/browser/extensions/api/app_window/app_window_api.cc
@@ -33,6 +33,7 @@ const char kInvalidWindowId[] =
"The window id can not be more than 256 characters long.";
}
+const char kPanelTypeOption[] = "panel";
const char kNoneFrameOption[] = "none";
const char kHtmlFrameOption[] = "experimental-html";
@@ -144,16 +145,24 @@ bool AppWindowCreateFunction::RunImpl() {
create_params.bounds.set_y(*bounds->top.get());
}
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableExperimentalExtensionApis)) {
+ if (options->type.get()) {
+ if (*options->type == kPanelTypeOption)
+ create_params.window_type = ShellWindow::WINDOW_TYPE_PANEL;
+ }
+ }
+
if (options->frame.get()) {
if (*options->frame == kHtmlFrameOption &&
CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableExperimentalExtensionApis)) {
- create_params.frame = ShellWindow::CreateParams::FRAME_NONE;
+ create_params.frame = ShellWindow::FRAME_NONE;
inject_html_titlebar = true;
} else if (*options->frame == kNoneFrameOption) {
- create_params.frame = ShellWindow::CreateParams::FRAME_NONE;
+ create_params.frame = ShellWindow::FRAME_NONE;
} else {
- create_params.frame = ShellWindow::CreateParams::FRAME_CHROME;
+ create_params.frame = ShellWindow::FRAME_CHROME;
}
}
« no previous file with comments | « ash/wm/panel_layout_manager_unittest.cc ('k') | chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698