| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
| 8 #include "content/common/desktop_notification_messages.h" | 8 #include "content/common/desktop_notification_messages.h" |
| 9 #include "content/common/view_messages.h" | 9 #include "content/common/view_messages.h" |
| 10 #include "content/renderer/render_view_impl.h" | 10 #include "content/renderer/render_view_impl.h" |
| 11 #include "third_party/WebKit/public/platform/WebURL.h" | 11 #include "third_party/WebKit/public/platform/WebURL.h" |
| 12 #include "third_party/WebKit/public/web/WebDocument.h" | 12 #include "third_party/WebKit/public/web/WebDocument.h" |
| 13 #include "third_party/WebKit/public/web/WebFrame.h" | 13 #include "third_party/WebKit/public/web/WebFrame.h" |
| 14 #include "third_party/WebKit/public/web/WebNotificationPermissionCallback.h" | 14 #include "third_party/WebKit/public/web/WebNotificationPermissionCallback.h" |
| 15 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 15 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
| 16 #include "third_party/WebKit/public/web/WebView.h" | 16 #include "third_party/WebKit/public/web/WebView.h" |
| 17 | 17 |
| 18 using WebKit::WebDocument; | 18 using blink::WebDocument; |
| 19 using WebKit::WebNotification; | 19 using blink::WebNotification; |
| 20 using WebKit::WebNotificationPresenter; | 20 using blink::WebNotificationPresenter; |
| 21 using WebKit::WebNotificationPermissionCallback; | 21 using blink::WebNotificationPermissionCallback; |
| 22 using WebKit::WebSecurityOrigin; | 22 using blink::WebSecurityOrigin; |
| 23 using WebKit::WebString; | 23 using blink::WebString; |
| 24 using WebKit::WebURL; | 24 using blink::WebURL; |
| 25 using WebKit::WebUserGestureIndicator; | 25 using blink::WebUserGestureIndicator; |
| 26 | 26 |
| 27 namespace content { | 27 namespace content { |
| 28 | 28 |
| 29 | 29 |
| 30 NotificationProvider::NotificationProvider(RenderViewImpl* render_view) | 30 NotificationProvider::NotificationProvider(RenderViewImpl* render_view) |
| 31 : RenderViewObserver(render_view) { | 31 : RenderViewObserver(render_view) { |
| 32 } | 32 } |
| 33 | 33 |
| 34 NotificationProvider::~NotificationProvider() { | 34 NotificationProvider::~NotificationProvider() { |
| 35 manager_.DetachAll(); | 35 manager_.DetachAll(); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 DCHECK(callback); | 173 DCHECK(callback); |
| 174 callback->permissionRequestComplete(); | 174 callback->permissionRequestComplete(); |
| 175 manager_.OnPermissionRequestComplete(id); | 175 manager_.OnPermissionRequestComplete(id); |
| 176 } | 176 } |
| 177 | 177 |
| 178 void NotificationProvider::OnNavigate() { | 178 void NotificationProvider::OnNavigate() { |
| 179 manager_.Clear(); | 179 manager_.Clear(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 } // namespace content | 182 } // namespace content |
| OLD | NEW |