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

Unified Diff: content/shell/browser/layout_test/layout_test_content_browser_client.cc

Issue 774573003: Start pulling away notification logic from ChromeContentBrowserClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
Index: content/shell/browser/layout_test/layout_test_content_browser_client.cc
diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.cc b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
index b4d25f6293bb40d68f88729754b390b46f778f07..e881c1cd1dd6981a86119d2128ccdc0455baac74 100644
--- a/content/shell/browser/layout_test/layout_test_content_browser_client.cc
+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
@@ -40,8 +40,7 @@ void RequestDesktopNotificationPermissionOnIO(
LayoutTestContentBrowserClient::LayoutTestContentBrowserClient() {
DCHECK(!g_layout_test_browser_client);
- layout_test_notification_manager_.reset(
- new LayoutTestNotificationManager());
+ layout_test_notification_manager_.reset(new LayoutTestNotificationManager());
g_layout_test_browser_client = this;
}
@@ -104,26 +103,9 @@ void LayoutTestContentBrowserClient::RequestPermission(
result_callback);
}
-blink::WebNotificationPermission
-LayoutTestContentBrowserClient::CheckDesktopNotificationPermission(
- const GURL& source_url,
- ResourceContext* context,
- int render_process_id) {
- LayoutTestNotificationManager* manager = GetLayoutTestNotificationManager();
- if (manager)
- return manager->CheckPermission(source_url);
-
- return blink::WebNotificationPermissionAllowed;
-}
-
-void LayoutTestContentBrowserClient::ShowDesktopNotification(
- const ShowDesktopNotificationHostMsgParams& params,
- BrowserContext* browser_context,
- int render_process_id,
- scoped_ptr<DesktopNotificationDelegate> delegate,
- base::Closure* cancel_callback) {
- if (auto* manager = GetLayoutTestNotificationManager())
- manager->Show(params, delegate.Pass(), cancel_callback);
+PlatformNotificationService*
+LayoutTestContentBrowserClient::GetPlatformNotificationService() {
+ return layout_test_notification_manager_.get();
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698