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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 381633005: Refactor Web Notification permission requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 033d466ee83ec9cdd7a72246a1021af7a6917b7c..97e13ccb4bea87a23a1eeb7189250bf34cd8ff0f 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -73,6 +73,7 @@
#include "content/renderer/media/webmediaplayer_impl.h"
#include "content/renderer/media/webmediaplayer_ms.h"
#include "content/renderer/media/webmediaplayer_params.h"
+#include "content/renderer/notification_permission_dispatcher.h"
#include "content/renderer/notification_provider.h"
#include "content/renderer/npapi/plugin_channel_host.h"
#include "content/renderer/push_messaging_dispatcher.h"
@@ -404,6 +405,7 @@ RenderFrameImpl::RenderFrameImpl(RenderViewImpl* render_view, int routing_id)
selection_text_offset_(0),
selection_range_(gfx::Range::InvalidRange()),
handling_select_range_(false),
+ notification_permission_dispatcher_(NULL),
notification_provider_(NULL),
web_user_media_client_(NULL),
midi_dispatcher_(NULL),
@@ -2243,6 +2245,17 @@ void RenderFrameImpl::didChangeThemeColor() {
routing_id_, frame_->document().themeColor()));
}
+void RenderFrameImpl::requestNotificationPermission(
+ const blink::WebSecurityOrigin& origin,
+ blink::WebNotificationPermissionCallback* callback) {
+ if (!notification_permission_dispatcher_) {
+ notification_permission_dispatcher_ =
+ new NotificationPermissionDispatcher(this);
+ }
+
+ notification_permission_dispatcher_->RequestPermission(origin, callback);
+}
+
blink::WebNotificationPresenter* RenderFrameImpl::notificationPresenter() {
return notification_provider_;
}
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698