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

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

Issue 53973003: Deprecate 'singleton' option in chrome.apps.window.create(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 7 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
« no previous file with comments | « no previous file | chrome/common/extensions/api/app_window.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0eaaaf58a1f426ad1c2e0985aca4e2eba5a4a8d6..671bc7145035c77e3b0c2f4fb4e88bdc469921bc 100644
--- a/chrome/browser/extensions/api/app_window/app_window_api.cc
+++ b/chrome/browser/extensions/api/app_window/app_window_api.cc
@@ -159,6 +159,13 @@ bool AppWindowCreateFunction::RunImpl() {
create_params.window_key = *options->id;
+ if (options->singleton && *options->singleton == false) {
+ WriteToConsole(
+ content::CONSOLE_MESSAGE_LEVEL_WARNING,
+ "The 'singleton' option in chrome.apps.window.create() is deprecated!"
+ " Change your code to no longer rely on this.");
+ }
+
if (!options->singleton || *options->singleton) {
ShellWindow* window = apps::ShellWindowRegistry::Get(
GetProfile())->GetShellWindowForAppAndKey(extension_id(),
« no previous file with comments | « no previous file | chrome/common/extensions/api/app_window.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698