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

Side by Side Diff: chrome/common/desktop_notifications/active_notification_tracker.cc

Issue 387020: Upstreaming WebKit.gyp (Closed)
Patch Set: Created 11 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/desktop_notifications/active_notification_tracker.h" 5 #include "chrome/common/desktop_notifications/active_notification_tracker.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "webkit/api/public/WebNotification.h" 8 #include "third_party/WebKit/WebKit/chromium/public/WebNotification.h"
9 #include "webkit/api/public/WebNotificationPermissionCallback.h" 9 #include "third_party/WebKit/WebKit/chromium/public/WebNotificationPermissionCal lback.h"
10 10
11 using WebKit::WebNotification; 11 using WebKit::WebNotification;
12 using WebKit::WebNotificationPermissionCallback; 12 using WebKit::WebNotificationPermissionCallback;
13 13
14 bool ActiveNotificationTracker::GetId( 14 bool ActiveNotificationTracker::GetId(
15 const WebNotification& notification, int& id) { 15 const WebNotification& notification, int& id) {
16 DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI); 16 DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI);
17 ReverseTable::iterator iter = reverse_notification_table_.find(notification); 17 ReverseTable::iterator iter = reverse_notification_table_.find(notification);
18 if (iter == reverse_notification_table_.end()) 18 if (iter == reverse_notification_table_.end())
19 return false; 19 return false;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 int ActiveNotificationTracker::RegisterPermissionRequest( 60 int ActiveNotificationTracker::RegisterPermissionRequest(
61 WebNotificationPermissionCallback* callback) { 61 WebNotificationPermissionCallback* callback) {
62 DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI); 62 DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI);
63 return callback_table_.Add(callback); 63 return callback_table_.Add(callback);
64 } 64 }
65 65
66 void ActiveNotificationTracker::OnPermissionRequestComplete(int id) { 66 void ActiveNotificationTracker::OnPermissionRequestComplete(int id) {
67 DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI); 67 DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI);
68 callback_table_.Remove(id); 68 callback_table_.Remove(id);
69 } 69 }
OLDNEW
« no previous file with comments | « chrome/common/desktop_notifications/active_notification_tracker.h ('k') | chrome/common/native_web_keyboard_event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698