{"action":"created","issue":{"url":"https://api.github.com/repos/crosswalk-project/crosswalk/issues/2853","labels_url":"https://api.github.com/repos/crosswalk-project/crosswalk/issues/2853/labels{/name}","comments_url":"https://api.github.com/repos/crosswalk-project/crosswalk/issues/2853/comments","events_url":"https://api.github.com/repos/crosswalk-project/crosswalk/issues/2853/events","html_url":"https://github.com/crosswalk-project/crosswalk/pull/2853","id":56999262,"number":2853,"title":"WebNotification of Crosswalk Linux","user":{"login":"PeterWangIntel","id":4970060,"avatar_url":"https://avatars.githubusercontent.com/u/4970060?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterWangIntel","html_url":"https://github.com/PeterWangIntel","followers_url":"https://api.github.com/users/PeterWangIntel/followers","following_url":"https://api.github.com/users/PeterWangIntel/following{/other_user}","gists_url":"https://api.github.com/users/PeterWangIntel/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterWangIntel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterWangIntel/subscriptions","organizations_url":"https://api.github.com/users/PeterWangIntel/orgs","repos_url":"https://api.github.com/users/PeterWangIntel/repos","events_url":"https://api.github.com/users/PeterWangIntel/events{/privacy}","received_events_url":"https://api.github.com/users/PeterWangIntel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-02-09T07:55:30Z","updated_at":"2015-02-16T07:57:39Z","closed_at":"2015-02-16T07:57:36Z","pull_request":{"url":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/2853","html_url":"https://github.com/crosswalk-project/crosswalk/pull/2853","diff_url":"https://github.com/crosswalk-project/crosswalk/pull/2853.diff","patch_url":"https://github.com/crosswalk-project/crosswalk/pull/2853.patch"},"body":"The WebNotification of Crosswalk Linux is implemented based on 'libnotify'.\r\nRefering to https://wiki.archlinux.org/index.php/Desktop_notifications,\r\nthe 'libnotify' is a desktop independent lib to invoke 'notification server'\r\nthrough DBus named 'org.freedesktop.Notifications' (on Ubuntu it's 'notify-osd' behind).\r\n\r\nThere 3 reasons to use 'libnotify'\r\n(1) The Chrome Linux creates 'desktop notification' by self and it's hard to port since most of\r\n    code is for 'Rich notification' proveded by extension.\r\n    refer to https://developer.chrome.com/apps/richNotifications.\r\n(2) Firefox and WebKit using 'libnotify' to implement WebNotification.\r\n(3) The desktop of Deepin supports 'libnotify' by default.\r\n\r\nAdd a new class 'XWalkNotificationManagerLinux' to implement logic to invoke 'libnotify':\r\n(1) Init and uninit 'libnotify' in constructor and destructor.\r\n(2) In 'ShowDesktopNotification', call 'notify_notification_new' and 'notify_notification_show'\r\n    to create new notifaication record and show it.\r\n    If just need to relace old notification, call 'notify_notification_update' to update the\r\n    record.\r\n(3) Listen signal 'closed' with callback 'NotificationClosedCallback' to trigger the JS callbacks,\r\n    such as 'Notification.onclose'.\r\n(4) The memeber 'notifications_map_' is for saving the map between 'notification' and its\r\n    'delegate' (used to trigger JS callbacks).\r\n    The 'notifications_replace_map_' is used to record the notification created with relace tag,\r\n    like this:\r\n\t new Notification(\"***\", {tag: '***'});\r\n\r\nBUG=https://crosswalk-project.org/jira/browse/XWALK-286"},"comment":{"url":"https://api.github.com/repos/crosswalk-project/crosswalk/issues/comments/74471067","html_url":"https://github.com/crosswalk-project/crosswalk/pull/2853#issuecomment-74471067","issue_url":"https://api.github.com/repos/crosswalk-project/crosswalk/issues/2853","id":74471067,"user":{"login":"crosswalk-trybot","id":6804778,"avatar_url":"https://avatars.githubusercontent.com/u/6804778?v=3","gravatar_id":"","url":"https://api.github.com/users/crosswalk-trybot","html_url":"https://github.com/crosswalk-trybot","followers_url":"https://api.github.com/users/crosswalk-trybot/followers","following_url":"https://api.github.com/users/crosswalk-trybot/following{/other_user}","gists_url":"https://api.github.com/users/crosswalk-trybot/gists{/gist_id}","starred_url":"https://api.github.com/users/crosswalk-trybot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crosswalk-trybot/subscriptions","organizations_url":"https://api.github.com/users/crosswalk-trybot/orgs","repos_url":"https://api.github.com/users/crosswalk-trybot/repos","events_url":"https://api.github.com/users/crosswalk-trybot/events{/privacy}","received_events_url":"https://api.github.com/users/crosswalk-trybot/received_events","type":"User","site_admin":false},"created_at":"2015-02-16T07:57:38Z","updated_at":"2015-02-16T07:57:38Z","body":"The patch series with PeterWangIntel/crosswalk@b170282d532868ecefd01a89ad646826593bb7c2 as head will be tested soon."}}