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

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

Issue 10986092: Transparent apps support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 8 years, 2 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 97dcd1c195d11743b658a43e703b42493dce3964..f2f029bfd6f154445b8db02a143cb847d3312aaa 100644
--- a/chrome/browser/extensions/api/app_window/app_window_api.cc
+++ b/chrome/browser/extensions/api/app_window/app_window_api.cc
@@ -83,8 +83,7 @@ bool AppWindowCreateFunction::RunImpl() {
if (options->frame.get()) {
if (*options->frame == kHtmlFrameOption &&
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableExperimentalExtensionApis)) {
+ GetExtension()->HasAPIPermission(APIPermission::kExperimental)) {
create_params.frame = ShellWindow::CreateParams::FRAME_NONE;
inject_html_titlebar = true;
} else if (*options->frame == kNoneFrameOption) {
@@ -94,6 +93,11 @@ bool AppWindowCreateFunction::RunImpl() {
}
}
+ if (options->transparent_background.get() &&
+ GetExtension()->HasAPIPermission(APIPermission::kExperimental)) {
+ create_params.transparent_background = *options->transparent_background;
+ }
+
gfx::Size& minimum_size = create_params.minimum_size;
if (options->min_width.get())
minimum_size.set_width(*options->min_width);
« no previous file with comments | « no previous file | chrome/browser/ui/extensions/shell_window.h » ('j') | chrome/common/extensions/api/app_window.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698