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

Side by Side Diff: chrome/browser/extensions/api/app_window/app_window_api.cc

Issue 375183002: Add app.window.alphaEnabled() and onAlphaEnabledChanged. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/app_window/app_window_api.h" 5 #include "chrome/browser/extensions/api/app_window/app_window_api.h"
6 6
7 #include "apps/app_window.h" 7 #include "apps/app_window.h"
8 #include "apps/app_window_contents.h" 8 #include "apps/app_window_contents.h"
9 #include "apps/app_window_registry.h" 9 #include "apps/app_window_registry.h"
10 #include "apps/apps_client.h" 10 #include "apps/apps_client.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 GetExtension()->location() == extensions::Manifest::COMPONENT) { 226 GetExtension()->location() == extensions::Manifest::COMPONENT) {
227 if (options->type == extensions::api::app_window::WINDOW_TYPE_PANEL) { 227 if (options->type == extensions::api::app_window::WINDOW_TYPE_PANEL) {
228 create_params.window_type = AppWindow::WINDOW_TYPE_PANEL; 228 create_params.window_type = AppWindow::WINDOW_TYPE_PANEL;
229 } 229 }
230 } 230 }
231 231
232 if (!GetFrameOptions(*options, &create_params)) 232 if (!GetFrameOptions(*options, &create_params))
233 return false; 233 return false;
234 234
235 if (options->transparent_background.get() && 235 if (options->transparent_background.get() &&
236 create_params.frame == AppWindow::FRAME_NONE &&
Wez 2014/07/09 22:03:30 If requesting transparent background requires fram
jackhou1 2014/07/10 03:04:18 Done.
236 (GetExtension()->permissions_data()->HasAPIPermission( 237 (GetExtension()->permissions_data()->HasAPIPermission(
237 APIPermission::kExperimental) || 238 APIPermission::kExperimental) ||
238 CommandLine::ForCurrentProcess()->HasSwitch( 239 CommandLine::ForCurrentProcess()->HasSwitch(
239 switches::kEnableExperimentalExtensionApis))) { 240 switches::kEnableExperimentalExtensionApis))) {
240 create_params.transparent_background = *options->transparent_background; 241 create_params.transparent_background = *options->transparent_background;
241 } 242 }
242 243
243 if (options->hidden.get()) 244 if (options->hidden.get())
244 create_params.hidden = *options->hidden.get(); 245 create_params.hidden = *options->hidden.get();
245 246
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 491
491 if (options.frame->as_frame_options->inactive_color.get()) { 492 if (options.frame->as_frame_options->inactive_color.get()) {
492 error_ = app_window_constants::kInactiveColorWithoutColor; 493 error_ = app_window_constants::kInactiveColorWithoutColor;
493 return false; 494 return false;
494 } 495 }
495 496
496 return true; 497 return true;
497 } 498 }
498 499
499 } // namespace extensions 500 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698