~janez-troha/unity-chromium-extension/unity-chromium-extension

« back to all changes in this revision

Viewing changes to chromium-extension/webkitnotif-wrapper-builder.js

  • Committer: Alexandre Abreu
  • Date: 2012-06-27 13:05:04 UTC
  • Revision ID: alexandre.abreu@canonical.com-20120627130504-4r27680pxy9qkmce
Remove unecessary commit (logs)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
      dir: ''
22
22
    };
23
23
 
24
 
    console.log ('Making webkit notification');
25
 
 
26
24
    var webkitNotificationsWrapper = Function();
27
25
    webkitNotificationsWrapper.prototype = webkitNotifications;
28
26
    webkitNotificationsWrapper.prototype.createNotification = function(iconUrl, title, body) {
29
 
      console.log ('*** createNotification called');
30
27
      if (this.checkPermission() !== PERMISSION_ALLOWED) {
31
 
      console.log ('*** createNotification called: permission not allowed');
32
28
        throw new Error("not allowed");
33
29
      }
34
30
      var notification = new Notification();
35
31
      notification.show = function () {
36
 
      console.log ('*** NOtification.show called');
37
32
        backend('webkitNotifications.showNotification', [iconUrl, title, body]);
38
33
      };
39
 
      console.log ('*** NOtification returned');
40
34
      return notification;
41
35
    };
42
36