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

Side by Side Diff: content/shell/browser/layout_test/layout_test_content_browser_client.cc

Issue 578883003: Remove the strict dependency on WebContents for Web Notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: plumb through render_process_id Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « content/shell/browser/layout_test/layout_test_content_browser_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/shell/browser/layout_test/layout_test_content_browser_client.h " 5 #include "content/shell/browser/layout_test/layout_test_content_browser_client.h "
6 6
7 #include "content/public/browser/browser_context.h" 7 #include "content/public/browser/browser_context.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "content/public/browser/render_process_host.h" 9 #include "content/public/browser/render_process_host.h"
10 #include "content/public/browser/storage_partition.h" 10 #include "content/public/browser/storage_partition.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 int render_process_id) { 90 int render_process_id) {
91 LayoutTestNotificationManager* manager = GetLayoutTestNotificationManager(); 91 LayoutTestNotificationManager* manager = GetLayoutTestNotificationManager();
92 if (manager) 92 if (manager)
93 return manager->CheckPermission(source_url); 93 return manager->CheckPermission(source_url);
94 94
95 return blink::WebNotificationPermissionAllowed; 95 return blink::WebNotificationPermissionAllowed;
96 } 96 }
97 97
98 void LayoutTestContentBrowserClient::ShowDesktopNotification( 98 void LayoutTestContentBrowserClient::ShowDesktopNotification(
99 const ShowDesktopNotificationHostMsgParams& params, 99 const ShowDesktopNotificationHostMsgParams& params,
100 RenderFrameHost* render_frame_host, 100 BrowserContext* browser_context,
101 int render_process_id,
101 scoped_ptr<DesktopNotificationDelegate> delegate, 102 scoped_ptr<DesktopNotificationDelegate> delegate,
102 base::Closure* cancel_callback) { 103 base::Closure* cancel_callback) {
103 if (auto* manager = GetLayoutTestNotificationManager()) 104 if (auto* manager = GetLayoutTestNotificationManager())
104 manager->Show(params, delegate.Pass(), cancel_callback); 105 manager->Show(params, delegate.Pass(), cancel_callback);
105 } 106 }
106 107
107 } // namespace content 108 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/layout_test/layout_test_content_browser_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698