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

Unified Diff: content/browser/renderer_host/render_message_filter.cc

Issue 398163008: Export content_common dependency from some content targets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add content::NotificationPresenterPermission enum 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 | « chrome/browser/chrome_content_browser_client.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_message_filter.cc
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index e7f7ad8263a29535de5fabafcfb657b829589e5f..461650ff15f25377377847700e83aa093f9b71a7 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -43,6 +43,7 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/download_save_info.h"
+#include "content/public/browser/notification_presenter_permission.h"
#include "content/public/browser/plugin_service_filter.h"
#include "content/public/browser/resource_context.h"
#include "content/public/browser/user_metrics.h"
@@ -888,6 +889,16 @@ void RenderMessageFilter::OnDownloadUrl(int render_view_id,
ResourceDispatcherHostImpl::DownloadStartedCallback());
}
+COMPILE_ASSERT(static_cast<int>(NOTIFICATION_PRESENTER_PERMISSION_ALLOWED)
+ == static_cast<int>(blink::WebNotificationPresenter::PermissionAllowed),
+ mismatching_enums);
+COMPILE_ASSERT(static_cast<int>(NOTIFICATION_PRESENTER_PERMISSION_NOT_ALLOWED)
+ == static_cast<int>(blink::WebNotificationPresenter::PermissionNotAllowed),
+ mismatching_enums);
+COMPILE_ASSERT(static_cast<int>(NOTIFICATION_PRESENTER_PERMISSION_DENIED)
+ == static_cast<int>(blink::WebNotificationPresenter::PermissionDenied),
+ mismatching_enums);
+
void RenderMessageFilter::OnCheckNotificationPermission(
const GURL& source_origin, int* result) {
#if defined(ENABLE_NOTIFICATIONS)
@@ -895,7 +906,7 @@ void RenderMessageFilter::OnCheckNotificationPermission(
CheckDesktopNotificationPermission(source_origin, resource_context_,
render_process_id_);
#else
- *result = blink::WebNotificationPresenter::PermissionAllowed;
+ *result = NOTIFICATION_PRESENTER_PERMISSION_ALLOWED;
#endif
}
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698