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

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: 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
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..a26e3235ca73cbc2507f7d3a0594e5adf3c6cce6 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,
+ "'singleton' option in chrome.apps.window.create() is deprecated! "
benwells 2013/11/04 01:54:01 Nit: start the sentence with 'The'. Also change 'f
+ "Fix 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') | chrome/common/extensions/api/app_window.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698