Index: extensions/browser/api/app_window/app_window_api.cc |
diff --git a/extensions/browser/api/app_window/app_window_api.cc b/extensions/browser/api/app_window/app_window_api.cc |
index 05650e924e8f17ebe468697cd3f1086f71742b17..c9abcae0c9faa1b42a9c0f434eb21d3990c7f442 100644 |
--- a/extensions/browser/api/app_window/app_window_api.cc |
+++ b/extensions/browser/api/app_window/app_window_api.cc |
@@ -75,6 +75,8 @@ const char kImeWindowMustBeImeWindowOrPanel[] = |
"IME extensions must create ime window ( with \"ime: true\" and " |
"\"frame: 'none'\") or panel window (with \"type: panel\")."; |
#endif |
+const char kShowInShelfWindowKeyNotSet[] = |
+ "The showInShelf=true window property requires window id to be set."; |
Reilly Grant (use Gerrit)
2016/07/06 19:53:00
"The \"showInShelf\" option requires the \"id\" op
stevenjb
2016/07/07 22:55:54
See my other comment, I realized this is not stric
Andra Paraschiv
2016/07/08 07:20:27
Yes, as Steven mentioned before, the pinning needs
|
} // namespace app_window_constants |
const char kNoneFrameOption[] = "none"; |
@@ -321,6 +323,16 @@ bool AppWindowCreateFunction::RunAsync() { |
*options->visible_on_all_workspaces.get(); |
} |
+ if (options->show_in_shelf.get()) { |
+ create_params.show_in_shelf = *options->show_in_shelf.get(); |
+ |
+ if (create_params.show_in_shelf == true && |
Reilly Grant (use Gerrit)
2016/07/06 19:53:00
Don't check booleans with == true.
Andra Paraschiv
2016/07/08 07:20:27
Done.
|
+ create_params.window_key.empty()) { |
+ error_ = app_window_constants::kShowInShelfWindowKeyNotSet; |
+ return false; |
+ } |
+ } |
+ |
if (options->type != app_window::WINDOW_TYPE_PANEL) { |
switch (options->state) { |
case app_window::STATE_NONE: |