OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/renderer/notification_provider.h" | 5 #include "content/renderer/notification_provider.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/task.h" | 8 #include "base/task.h" |
9 #include "content/common/desktop_notification_messages.h" | 9 #include "content/common/desktop_notification_messages.h" |
10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
11 #include "content/renderer/render_view_impl.h" | 11 #include "content/renderer/render_view_impl.h" |
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPermis
sionCallback.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPermis
sionCallback.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
17 | 17 |
18 using WebKit::WebDocument; | 18 using WebKit::WebDocument; |
19 using WebKit::WebNotification; | 19 using WebKit::WebNotification; |
20 using WebKit::WebNotificationPresenter; | 20 using WebKit::WebNotificationPresenter; |
21 using WebKit::WebNotificationPermissionCallback; | 21 using WebKit::WebNotificationPermissionCallback; |
22 using WebKit::WebSecurityOrigin; | 22 using WebKit::WebSecurityOrigin; |
23 using WebKit::WebString; | 23 using WebKit::WebString; |
24 using WebKit::WebURL; | 24 using WebKit::WebURL; |
25 | 25 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 void NotificationProvider::OnPermissionRequestComplete(int id) { | 167 void NotificationProvider::OnPermissionRequestComplete(int id) { |
168 WebNotificationPermissionCallback* callback = manager_.GetCallback(id); | 168 WebNotificationPermissionCallback* callback = manager_.GetCallback(id); |
169 DCHECK(callback); | 169 DCHECK(callback); |
170 callback->permissionRequestComplete(); | 170 callback->permissionRequestComplete(); |
171 manager_.OnPermissionRequestComplete(id); | 171 manager_.OnPermissionRequestComplete(id); |
172 } | 172 } |
173 | 173 |
174 void NotificationProvider::OnNavigate() { | 174 void NotificationProvider::OnNavigate() { |
175 manager_.Clear(); | 175 manager_.Clear(); |
176 } | 176 } |
OLD | NEW |