diff options
25 files changed, 312 insertions, 27 deletions
diff --git a/apps/app_window.cc b/apps/app_window.cc index 718476a..eb4f81a 100644 --- a/apps/app_window.cc +++ b/apps/app_window.cc @@ -160,13 +160,14 @@ AppWindow::CreateParams::CreateParams() has_frame_color(false), active_frame_color(SK_ColorBLACK), inactive_frame_color(SK_ColorBLACK), - transparent_background(false), + alpha_enabled(false), creator_process_id(0), state(ui::SHOW_STATE_DEFAULT), hidden(false), resizable(true), focused(true), - always_on_top(false) {} + always_on_top(false) { +} AppWindow::CreateParams::~CreateParams() {} @@ -243,7 +244,7 @@ AppWindow::AppWindow(BrowserContext* context, can_send_events_(false), is_hidden_(false), cached_always_on_top_(false), - requested_transparent_background_(false) { + requested_alpha_enabled_(false) { extensions::ExtensionsBrowserClient* client = extensions::ExtensionsBrowserClient::Get(); CHECK(!client->IsGuestSession(context) || context->IsOffTheRecord()) @@ -283,7 +284,7 @@ void AppWindow::Init(const GURL& url, if (new_params.state == ui::SHOW_STATE_FULLSCREEN) new_params.always_on_top = false; - requested_transparent_background_ = new_params.transparent_background; + requested_alpha_enabled_ = new_params.alpha_enabled; AppsClient* apps_client = AppsClient::Get(); native_app_window_.reset( @@ -731,9 +732,9 @@ void AppWindow::GetSerializedState(base::DictionaryValue* properties) const { properties->SetBoolean("maximized", native_app_window_->IsMaximized()); properties->SetBoolean("alwaysOnTop", IsAlwaysOnTop()); properties->SetBoolean("hasFrameColor", native_app_window_->HasFrameColor()); - properties->SetBoolean("alphaEnabled", - requested_transparent_background_ && - native_app_window_->CanHaveAlphaEnabled()); + properties->SetBoolean( + "alphaEnabled", + requested_alpha_enabled_ && native_app_window_->CanHaveAlphaEnabled()); // These properties are undocumented and are to enable testing. Alpha is // removed to diff --git a/apps/app_window.h b/apps/app_window.h index c226265..7e35b81 100644 --- a/apps/app_window.h +++ b/apps/app_window.h @@ -152,7 +152,7 @@ class AppWindow : public content::NotificationObserver, bool has_frame_color; SkColor active_frame_color; SkColor inactive_frame_color; - bool transparent_background; // Only supported on ash. + bool alpha_enabled; // The initial content/inner bounds specification (excluding any window // decorations). @@ -344,10 +344,8 @@ class AppWindow : public content::NotificationObserver, // app. void WindowEventsReady(); - // Whether the app window wants a transparent background. - bool requested_transparent_background() const { - return requested_transparent_background_; - } + // Whether the app window wants to be alpha enabled. + bool requested_alpha_enabled() const { return requested_alpha_enabled_; } protected: virtual ~AppWindow(); @@ -547,8 +545,8 @@ class AppWindow : public content::NotificationObserver, // taskbar. bool cached_always_on_top_; - // Whether |transparent_background| was set in the CreateParams. - bool requested_transparent_background_; + // Whether |alpha_enabled| was set in the CreateParams. + bool requested_alpha_enabled_; DISALLOW_COPY_AND_ASSIGN(AppWindow); }; diff --git a/apps/ui/views/native_app_window_views.cc b/apps/ui/views/native_app_window_views.cc index da84d8a..b2135fc 100644 --- a/apps/ui/views/native_app_window_views.cc +++ b/apps/ui/views/native_app_window_views.cc @@ -262,8 +262,7 @@ void NativeAppWindowViews::OnWidgetActivationChanged(views::Widget* widget, void NativeAppWindowViews::RenderViewCreated( content::RenderViewHost* render_view_host) { - if (app_window_->requested_transparent_background() && - CanHaveAlphaEnabled()) { + if (app_window_->requested_alpha_enabled() && CanHaveAlphaEnabled()) { content::RenderWidgetHostView* view = render_view_host->GetView(); DCHECK(view); view->SetBackgroundOpaque(false); 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 51d67b3..f0cbd3d 100644 --- a/chrome/browser/extensions/api/app_window/app_window_api.cc +++ b/chrome/browser/extensions/api/app_window/app_window_api.cc @@ -26,6 +26,7 @@ #include "content/public/common/url_constants.h" #include "extensions/browser/extensions_browser_client.h" #include "extensions/browser/image_util.h" +#include "extensions/common/features/simple_feature.h" #include "extensions/common/permissions/permissions_data.h" #include "extensions/common/switches.h" #include "third_party/skia/include/core/SkColor.h" @@ -54,6 +55,10 @@ const char kAlwaysOnTopPermission[] = "The \"app.window.alwaysOnTop\" permission is required."; const char kInvalidUrlParameter[] = "The URL used for window creation must be local for security reasons."; +const char kAlphaEnabledWrongChannel[] = + "The alphaEnabled option requires dev channel or newer."; +const char kAlphaEnabledMissingPermission[] = + "The alphaEnabled option requires app.window.alpha permission."; } // namespace app_window_constants const char kNoneFrameOption[] = "none"; @@ -233,12 +238,34 @@ bool AppWindowCreateFunction::RunAsync() { if (!GetFrameOptions(*options, &create_params)) return false; - if (options->transparent_background.get() && - (extension()->permissions_data()->HasAPIPermission( - APIPermission::kExperimental) || - CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableExperimentalExtensionApis))) { - create_params.transparent_background = *options->transparent_background; + if (options->alpha_enabled.get()) { + const char* whitelist[] = { + "0F42756099D914A026DADFA182871C015735DD95", // http://crbug.com/323773 + "2D22CDB6583FD0A13758AEBE8B15E45208B4E9A7", + "E7E2461CE072DF036CF9592740196159E2D7C089", // http://crbug.com/356200 + "A74A4D44C7CFCD8844830E6140C8D763E12DD8F3", + "312745D9BF916161191143F6490085EEA0434997", + "53041A2FA309EECED01FFC751E7399186E860B2C" + }; + if (GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV && + !extensions::SimpleFeature::IsIdInList( + extension_id(), + std::set<std::string>(whitelist, + whitelist + arraysize(whitelist)))) { + error_ = app_window_constants::kAlphaEnabledWrongChannel; + return false; + } + if (!extension()->permissions_data()->HasAPIPermission( + APIPermission::kAlphaEnabled)) { + error_ = app_window_constants::kAlphaEnabledMissingPermission; + return false; + } +#if defined(USE_AURA) + create_params.alpha_enabled = *options->alpha_enabled; +#else + // Transparency is only supported on Aura. + // Fallback to creating an opaque window (by ignoring alphaEnabled). +#endif } if (options->hidden.get()) diff --git a/chrome/browser/extensions/api/app_window/app_window_apitest.cc b/chrome/browser/extensions/api/app_window/app_window_apitest.cc index 39b8e4a..071f869 100644 --- a/chrome/browser/extensions/api/app_window/app_window_apitest.cc +++ b/chrome/browser/extensions/api/app_window/app_window_apitest.cc @@ -15,6 +15,10 @@ #include "ui/base/base_window.h" #include "ui/gfx/rect.h" +#if defined(OS_WIN) +#include "ui/base/win/shell.h" +#endif + using apps::AppWindow; namespace { @@ -115,4 +119,40 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, WindowsApiSetShape) { << message_; } +IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, + WindowsApiAlphaEnabledHasPermissions) { + const char* no_alpha_dir = + "platform_apps/windows_api_alpha_enabled/has_permissions_no_alpha"; + const char* test_dir = no_alpha_dir; + +#if defined(USE_AURA) && (defined(OS_CHROMEOS) || !defined(OS_LINUX)) + test_dir = + "platform_apps/windows_api_alpha_enabled/has_permissions_has_alpha"; +#if defined(OS_WIN) + if (!ui::win::IsAeroGlassEnabled()) { + test_dir = no_alpha_dir; + } +#endif // OS_WIN +#endif // USE_AURA && (OS_CHROMEOS || !OS_LINUX) + + EXPECT_TRUE(RunPlatformAppTest(test_dir)) << message_; +} + +IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, + WindowsApiAlphaEnabledNoPermissions) { + EXPECT_TRUE(RunPlatformAppTest( + "platform_apps/windows_api_alpha_enabled/no_permissions")) + << message_; +} + +IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, WindowsApiAlphaEnabledInStable) { + extensions::ScopedCurrentChannel channel(chrome::VersionInfo::CHANNEL_STABLE); + EXPECT_TRUE(RunPlatformAppTestWithFlags( + "platform_apps/windows_api_alpha_enabled/in_stable", + // Ignore manifest warnings because the extension will not load at all + // in stable. + kFlagIgnoreManifestWarnings)) + << message_; +} + } // namespace extensions diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc index 3aecc9d..56455fa 100644 --- a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc +++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc @@ -212,7 +212,7 @@ void ChromeNativeAppWindowViews::InitializeDefaultWindow( init_params.delegate = this; init_params.remove_standard_frame = IsFrameless() || has_frame_color_; init_params.use_system_default_icon = true; - if (create_params.transparent_background) + if (create_params.alpha_enabled) init_params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; init_params.keep_on_top = create_params.always_on_top; diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc b/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc index d13b495..255c819 100644 --- a/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc +++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc @@ -125,7 +125,7 @@ void ChromeNativeAppWindowViewsWin::InitializeDefaultWindow( web_app::UpdateRelaunchDetailsForApp(profile, extension, hwnd); - if (!create_params.transparent_background && !IsRunningInAsh()) + if (!create_params.alpha_enabled && !IsRunningInAsh()) EnsureCaptionStyleSet(); UpdateShelfMenu(); } diff --git a/chrome/common/extensions/api/_permission_features.json b/chrome/common/extensions/api/_permission_features.json index 5b46a81..140359c 100644 --- a/chrome/common/extensions/api/_permission_features.json +++ b/chrome/common/extensions/api/_permission_features.json @@ -122,6 +122,24 @@ ] } ], + "app.window.alpha": [ + { + "channel": "dev", + "extension_types": ["platform_app"] + }, + { + "channel": "stable", + "extension_types": ["platform_app"], + "whitelist": [ + "0F42756099D914A026DADFA182871C015735DD95", // http://crbug.com/323773 + "2D22CDB6583FD0A13758AEBE8B15E45208B4E9A7", + "E7E2461CE072DF036CF9592740196159E2D7C089", // http://crbug.com/356200 + "A74A4D44C7CFCD8844830E6140C8D763E12DD8F3", + "312745D9BF916161191143F6490085EEA0434997", + "53041A2FA309EECED01FFC751E7399186E860B2C" + ] + } + ], "audio": [ { "channel": "dev", diff --git a/chrome/common/extensions/api/app_window.idl b/chrome/common/extensions/api/app_window.idl index e5055c2..caff663 100644 --- a/chrome/common/extensions/api/app_window.idl +++ b/chrome/common/extensions/api/app_window.idl @@ -231,8 +231,8 @@ namespace app.window { [deprecated="Use innerBounds or outerBounds."] ContentBounds? bounds; // Enable window background transparency. - // Only supported in ash. Requires experimental API permission. - boolean? transparentBackground; + // Only supported in ash. Requires app.window.alpha API permission. + boolean? alphaEnabled; // The initial state of the window, allowing it to be created already // fullscreen, maximized, or minimized. Defaults to 'normal'. diff --git a/chrome/common/extensions/permissions/chrome_api_permissions.cc b/chrome/common/extensions/permissions/chrome_api_permissions.cc index 747d46b..f68b3fb 100644 --- a/chrome/common/extensions/permissions/chrome_api_permissions.cc +++ b/chrome/common/extensions/permissions/chrome_api_permissions.cc @@ -341,6 +341,7 @@ std::vector<APIPermissionInfo*> ChromeAPIPermissions::GetAllPermissions() {APIPermission::kOverrideEscFullscreen, "app.window.fullscreen.overrideEsc"}, {APIPermission::kWindowShape, "app.window.shape"}, + {APIPermission::kAlphaEnabled, "app.window.alpha"}, {APIPermission::kBrowser, "browser"}, // Settings override permissions. diff --git a/chrome/common/extensions/permissions/permission_set_unittest.cc b/chrome/common/extensions/permissions/permission_set_unittest.cc index 033dcda..d270254 100644 --- a/chrome/common/extensions/permissions/permission_set_unittest.cc +++ b/chrome/common/extensions/permissions/permission_set_unittest.cc @@ -638,6 +638,7 @@ TEST(PermissionsTest, PermissionMessages) { // a prompt. skip.insert(APIPermission::kActiveTab); skip.insert(APIPermission::kAlarms); + skip.insert(APIPermission::kAlphaEnabled); skip.insert(APIPermission::kAlwaysOnTopWindows); skip.insert(APIPermission::kAppView); skip.insert(APIPermission::kAudio); diff --git a/chrome/renderer/resources/extensions/app_window_custom_bindings.js b/chrome/renderer/resources/extensions/app_window_custom_bindings.js index c666d32..812d3d6 100644 --- a/chrome/renderer/resources/extensions/app_window_custom_bindings.js +++ b/chrome/renderer/resources/extensions/app_window_custom_bindings.js @@ -243,7 +243,7 @@ appWindow.registerCustomHook(function(bindingsAPI) { }; AppWindow.prototype.alphaEnabled = function() { return appWindowData.alphaEnabled; - } + }; AppWindow.prototype.handleWindowFirstShownForTests = function(callback) { // This allows test apps to get have their callback run even if they // call this after the first show has happened. diff --git a/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_has_alpha/background.js b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_has_alpha/background.js new file mode 100644 index 0000000..5e96e0a --- /dev/null +++ b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_has_alpha/background.js @@ -0,0 +1,42 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +function testAlphaEnabled(testId, setOption, setValue, expectedValue) { + var createOptions = { }; + if (setOption) + createOptions.alphaEnabled = setValue; + + chrome.app.window.create('index.html', + createOptions, + chrome.test.callbackPass(function(win) { + chrome.test.assertEq(expectedValue, win.alphaEnabled()); + })); +} + +// All these tests are run with app.window.alpha permission +// set and on a system with alpha (transparency) support. + +chrome.app.runtime.onLaunched.addListener(function() { + chrome.test.runTests([ + + // Window is created with alphaEnabled set to true. + function testAlphaEnabledPermTransInitTrue() { + testAlphaEnabled('testAlphaEnabledPermTransInitTrue', + true, true, true); + }, + + // Window is created with alphaEnabled set to false. + function testAlphaEnabledPermTransInitFalse() { + testAlphaEnabled('testAlphaEnabledPermTransInitFalse', + true, false, false); + }, + + // Window is created with alphaEnabled not explicitly set. + function testAlphaEnabledPermTransNoInit() { + testAlphaEnabled('testAlphaEnabledPermTransNoInit', + false, false, false); + } + + ]); +}); diff --git a/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_has_alpha/index.html b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_has_alpha/index.html new file mode 100644 index 0000000..c341a40 --- /dev/null +++ b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_has_alpha/index.html @@ -0,0 +1 @@ +<!-- empty --> diff --git a/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_has_alpha/manifest.json b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_has_alpha/manifest.json new file mode 100644 index 0000000..091850c --- /dev/null +++ b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_has_alpha/manifest.json @@ -0,0 +1,11 @@ +{ + "name": "Windows API - alphaEnabled (platform supports Alpha)", + "version": "1", + "manifest_version": 2, + "app": { + "background": { + "scripts": ["background.js"] + } + }, + "permissions": ["app.window.alpha"] +} diff --git a/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_no_alpha/background.js b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_no_alpha/background.js new file mode 100644 index 0000000..8f5134a --- /dev/null +++ b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_no_alpha/background.js @@ -0,0 +1,42 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +function testAlphaEnabled(testId, setOption, setValue, expectedValue) { + var createOptions = { }; + if (setOption) + createOptions.alphaEnabled = setValue; + + chrome.app.window.create('index.html', + createOptions, + chrome.test.callbackPass(function(win) { + chrome.test.assertEq(expectedValue, win.alphaEnabled()); + })); +} + +// All these tests are run with app.window.alpha permission +// set and on a system without alpha (transparency) support. + +chrome.app.runtime.onLaunched.addListener(function() { + chrome.test.runTests([ + + // Window is created with alphaEnabled set to true. + function testAlphaEnabledPermNoTransInitTrue() { + testAlphaEnabled('testAlphaEnabledPermNoTransInitTrue', + true, true, false); + }, + + // Window is created with alphaEnabled set to false. + function testAlphaEnabledPermNoTransInitFalse() { + testAlphaEnabled('testAlphaEnabledPermNoTransInitFalse', + true, false, false); + }, + + // Window is created with alphaEnabled not explicitly set. + function testAlphaEnabledPermNoTransNoInit() { + testAlphaEnabled('testAlphaEnabledPermNoTransNoInit', + false, false, false); + } + + ]); +}); diff --git a/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_no_alpha/index.html b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_no_alpha/index.html new file mode 100644 index 0000000..c341a40 --- /dev/null +++ b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_no_alpha/index.html @@ -0,0 +1 @@ +<!-- empty --> diff --git a/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_no_alpha/manifest.json b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_no_alpha/manifest.json new file mode 100644 index 0000000..e4d08ef --- /dev/null +++ b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/has_permissions_no_alpha/manifest.json @@ -0,0 +1,11 @@ +{ + "name": "Windows API - alphaEnabled (Platform doesn't support Alpha)", + "version": "1", + "manifest_version": 2, + "app": { + "background": { + "scripts": ["background.js"] + } + }, + "permissions": ["app.window.alpha"] +} diff --git a/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/in_stable/background.js b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/in_stable/background.js new file mode 100644 index 0000000..5aa6e89 --- /dev/null +++ b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/in_stable/background.js @@ -0,0 +1,33 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +var error = "The alphaEnabled option requires dev channel or newer."; + +function testAlphaEnabled(testId, setValue) { + var createOptions = { }; + createOptions.alphaEnabled = setValue; + + chrome.app.window.create('index.html', + createOptions, + chrome.test.callbackFail(error)); +} + +// All these tests are run in Stable channel with app.window.alpha +// permission set. + +chrome.app.runtime.onLaunched.addListener(function() { + chrome.test.runTests([ + + // Window is created with alphaEnabled set to true. + function testAlphaEnabledStableInitTrue() { + testAlphaEnabled('testAlphaEnabledStableInitTrue', true); + }, + + // Window is created with alphaEnabled set to false. + function testAlphaEnabledStableInitFalse() { + testAlphaEnabled('testAlphaEnabledStableInitFalse', false); + }, + + ]); +}); diff --git a/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/in_stable/index.html b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/in_stable/index.html new file mode 100644 index 0000000..c341a40 --- /dev/null +++ b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/in_stable/index.html @@ -0,0 +1 @@ +<!-- empty --> diff --git a/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/in_stable/manifest.json b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/in_stable/manifest.json new file mode 100644 index 0000000..3ba4e42 --- /dev/null +++ b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/in_stable/manifest.json @@ -0,0 +1,11 @@ +{ + "name": "Windows API - alphaEnabled (in Stable Channel)", + "version": "1", + "manifest_version": 2, + "app": { + "background": { + "scripts": ["background.js"] + } + }, + "permissions": ["app.window.alpha"] +} diff --git a/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/no_permissions/background.js b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/no_permissions/background.js new file mode 100644 index 0000000..665c1df --- /dev/null +++ b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/no_permissions/background.js @@ -0,0 +1,35 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +var error = "The alphaEnabled option requires app.window.alpha permission."; + +function testAlphaEnabled(testId, setValue) { + var createOptions = { }; + createOptions.alphaEnabled = setValue; + + chrome.app.window.create('index.html', + createOptions, + chrome.test.callbackFail(error)); +} + +// All these tests are run without app.window.alpha permission +// set. Test results are the same regardless of whether or not +// alpha (transparency) is supported by the platform. + +chrome.app.runtime.onLaunched.addListener(function() { + chrome.test.runTests([ + + // Window is created with alphaEnabled set to true. + function testAlphaEnabledNoPermInitTrue() { + testAlphaEnabled('testAlphaEnabledNoPermInitTrue', true); + }, + + // Window is created with alphaEnabled set to false. + function testAlphaEnabledNoPermInitFalse() { + testAlphaEnabled('testAlphaEnabledNoPermInitFalse', false); + }, + + ]); +}); + diff --git a/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/no_permissions/index.html b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/no_permissions/index.html new file mode 100644 index 0000000..c341a40 --- /dev/null +++ b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/no_permissions/index.html @@ -0,0 +1 @@ +<!-- empty --> diff --git a/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/no_permissions/manifest.json b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/no_permissions/manifest.json new file mode 100644 index 0000000..3856afc --- /dev/null +++ b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/no_permissions/manifest.json @@ -0,0 +1,10 @@ +{ + "name": "Windows API - alphaEnabled (No Permissions)", + "version": "1", + "manifest_version": 2, + "app": { + "background": { + "scripts": ["background.js"] + } + } +} diff --git a/extensions/common/permissions/api_permission.h b/extensions/common/permissions/api_permission.h index 376ca29..70d805f 100644 --- a/extensions/common/permissions/api_permission.h +++ b/extensions/common/permissions/api_permission.h @@ -41,6 +41,7 @@ class APIPermission { kActiveTab, kActivityLogPrivate, kAlarms, + kAlphaEnabled, kAlwaysOnTopWindows, kAppView, kAudio, |