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

Issue 1811523002: Enhance chrome.app.window API with better shelf integration

Created:
4 years, 9 months ago by paul.sapunaru
Modified:
4 years, 8 months ago
CC:
chromium-reviews, kalyank, sadrul, extensions-reviews_chromium.org, chromium-apps-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Enhance chrome.app.window API with better shelf integration Enhance chrome.app.window API with the possibility of creating a window that will show up separately in the shelf, tied to its own icon. Added a new property, showInShelf, to CreateWindowOptions. Default value for the property is false. BUG= TEST=interactive_ui_tests Implement a simple extension that creates windows with the property set to true. Observe that the newly created windows are added as separate icons in the shelf.

Patch Set 1 #

Patch Set 2 : Fixed test comment #

Total comments: 2

Patch Set 3 : [WIP] Rebase + browser tests. Added a new map that holds all the showInShelf windows. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -12 lines) Patch
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc View 1 2 1 chunk +82 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.h View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc View 1 2 5 chunks +32 lines, -10 lines 0 comments Download
M extensions/browser/api/app_window/app_window_api.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M extensions/browser/app_window/app_window.h View 3 chunks +10 lines, -0 lines 0 comments Download
M extensions/browser/app_window/app_window.cc View 3 chunks +5 lines, -2 lines 0 comments Download
M extensions/browser/app_window/app_window_interactive_uitest.cc View 1 1 chunk +12 lines, -0 lines 0 comments Download
M extensions/common/api/app_window.idl View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
paul.sapunaru
4 years, 9 months ago (2016-03-16 14:47:03 UTC) #2
paul.sapunaru
stevenjb@chromium.org: PTAL
4 years, 9 months ago (2016-03-17 15:38:54 UTC) #4
stevenjb
4 years, 9 months ago (2016-03-17 23:36:16 UTC) #5
We should also add a ShelfAppBrowserTest
(chrome_launcher_controller_browsertest.cc) that tests the following
combinations:

* An app with one show_in_shelf window
* An app with an initial window show_in_shelf=false and a second window with
show_in_shelf=true
* The inverse of the above (to define expected behavior; I would expect any
show_in_shelf window to not be grouped, i.e. 2 icons).
* An app with two windows with show_in_shelf=false and two with
show_in_shelf=true

https://codereview.chromium.org/1811523002/diff/20001/chrome/browser/ui/ash/l...
File chrome/browser/ui/ash/launcher/app_window_launcher_controller.cc (right):

https://codereview.chromium.org/1811523002/diff/20001/chrome/browser/ui/ash/l...
chrome/browser/ui/ash/launcher/app_window_launcher_controller.cc:173: if
(shelf_id == 0 || app_window->show_in_shelf()) {
I think this logic would be more clear in the if statement on line 171 (also
less work).

https://codereview.chromium.org/1811523002/diff/20001/chrome/browser/ui/ash/l...
chrome/browser/ui/ash/launcher/app_window_launcher_controller.cc:185: //
showInShelf parameter is false.
Is this true? What if the first window created for the app has show_in_shelf set
to true?

Powered by Google App Engine
This is Rietveld 408576698