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

Unified Diff: chrome/browser/resources/aura/app_list/app_list.js

Issue 8747021: [Aura] Polish app list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: set tile-page-scrollbar color Created 9 years 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/resources/aura/app_list/app_list.js
diff --git a/chrome/browser/resources/aura/app_list/app_list.js b/chrome/browser/resources/aura/app_list/app_list.js
index 5d20e9c5913e441c484ab6d8d71cb5ec23a63095..dc128054cb6a27ae57caa4820ff11c3d08a057d6 100644
--- a/chrome/browser/resources/aura/app_list/app_list.js
+++ b/chrome/browser/resources/aura/app_list/app_list.js
@@ -23,6 +23,21 @@ cr.define('appList', function() {
*/
function load() {
appsView = new appList.AppsView();
+
+ document.addEventListener('click', onDocClick);
+ }
+
+ /**
+ * Document click event handler.
+ */
+ function onDocClick(e) {
+ // Close if click is on body, or not on app, paging dot or its children.
+ if (e.target == document.body ||
+ (!e.target.classList.contains('app') &&
+ !e.target.classList.contains('dot') &&
+ !findAncestorByClass(e.target, 'dot'))) {
+ chrome.send('close');
+ }
}
/**
@@ -46,6 +61,7 @@ cr.define('appList', function() {
function getAppsCallback(data) {
appsView.getAppsCallback(data);
+ chrome.send('onAppsLoaded');
}
function getAppsPageIndex(page) {
« no previous file with comments | « chrome/browser/resources/aura/app_list/app_list.html ('k') | chrome/browser/ui/views/aura/app_list_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698