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
3 // found in the LICENSE file.
5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_CONTENT_BROWSER_CLIENT_H_
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_CONTENT_BROWSER_CLIENT_H_
8 #include "content/public/browser/permission_type.h"
9 #include "content/shell/browser/shell_content_browser_client.h"
13 class LayoutTestNotificationManager;
15 class LayoutTestContentBrowserClient : public ShellContentBrowserClient {
17 // Gets the current instance.
18 static LayoutTestContentBrowserClient* Get();
20 LayoutTestContentBrowserClient();
21 ~LayoutTestContentBrowserClient() override;
23 // Will be lazily created when running layout tests.
24 LayoutTestNotificationManager* GetLayoutTestNotificationManager();
26 // ContentBrowserClient overrides.
27 void RenderProcessWillLaunch(RenderProcessHost* host) override;
28 void RequestPermission(
29 PermissionType permission,
30 WebContents* web_contents,
32 const GURL& requesting_frame,
34 const base::Callback<void(bool)>& result_callback) override;
35 blink::WebNotificationPermission CheckDesktopNotificationPermission(
36 const GURL& source_url,
37 ResourceContext* context,
38 int render_process_id) override;
39 void ShowDesktopNotification(
40 const ShowDesktopNotificationHostMsgParams& params,
41 BrowserContext* browser_context,
42 int render_process_id,
43 scoped_ptr<DesktopNotificationDelegate> delegate,
44 base::Closure* cancel_callback) override;
47 scoped_ptr<LayoutTestNotificationManager> layout_test_notification_manager_;
52 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_CONTENT_BROWSER_CLIENT_H_