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

Unified Diff: content/shell/browser/shell_content_browser_client.h

Issue 395883002: Support layout testing Web Notifications from Document and Worker contexts. (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
Index: content/shell/browser/shell_content_browser_client.h
diff --git a/content/shell/browser/shell_content_browser_client.h b/content/shell/browser/shell_content_browser_client.h
index 4cc0098c860f02ec26ef5fbe1cc1e55b5f7bfc0c..b847150a05d6dd7eff1dadba3bb9a119f2a337cc 100644
--- a/content/shell/browser/shell_content_browser_client.h
+++ b/content/shell/browser/shell_content_browser_client.h
@@ -17,6 +17,7 @@ namespace content {
class ShellBrowserContext;
class ShellBrowserMainParts;
+class ShellNotificationManager;
class ShellResourceDispatcherHostDelegate;
class ShellContentBrowserClient : public ContentBrowserClient {
@@ -29,6 +30,9 @@ class ShellContentBrowserClient : public ContentBrowserClient {
ShellContentBrowserClient();
virtual ~ShellContentBrowserClient();
+ // Will be lazily created when running layout tests.
+ ShellNotificationManager* GetShellNotificationManager();
+
// ContentBrowserClient overrides.
virtual BrowserMainParts* CreateBrowserMainParts(
const MainFunctionParams& parameters) OVERRIDE;
@@ -55,6 +59,15 @@ class ShellContentBrowserClient : public ContentBrowserClient {
virtual WebContentsViewDelegate* GetWebContentsViewDelegate(
WebContents* web_contents) OVERRIDE;
virtual QuotaPermissionContext* CreateQuotaPermissionContext() OVERRIDE;
+ virtual void RequestDesktopNotificationPermission(
+ const GURL& source_origin,
+ RenderFrameHost* render_frame_host,
+ const base::Closure& callback) OVERRIDE;
+ virtual blink::WebNotificationPresenter::Permission
+ CheckDesktopNotificationPermission(
+ const GURL& source_url,
+ ResourceContext* context,
+ int render_process_id) OVERRIDE;
virtual SpeechRecognitionManagerDelegate*
GetSpeechRecognitionManagerDelegate() OVERRIDE;
virtual net::NetLog* GetNetLog() OVERRIDE;
@@ -86,6 +99,8 @@ class ShellContentBrowserClient : public ContentBrowserClient {
ShellBrowserContext* ShellBrowserContextForBrowserContext(
BrowserContext* content_browser_context);
+ scoped_ptr<ShellNotificationManager> shell_notification_manager_;
+
scoped_ptr<ShellResourceDispatcherHostDelegate>
resource_dispatcher_host_delegate_;

Powered by Google App Engine
This is Rietveld 408576698