OLD | NEW |
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 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_CONTENT_BROWSER_CLIENT_H_ | 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_ | 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_CONTENT_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include "content/public/browser/permission_type.h" | 8 #include "content/public/browser/permission_type.h" |
9 #include "content/shell/browser/shell_content_browser_client.h" | 9 #include "content/shell/browser/shell_content_browser_client.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 class LayoutTestBrowserContext; | 13 class LayoutTestBrowserContext; |
14 class LayoutTestNotificationManager; | 14 class LayoutTestNotificationManager; |
15 | 15 |
16 class LayoutTestContentBrowserClient : public ShellContentBrowserClient { | 16 class LayoutTestContentBrowserClient : public ShellContentBrowserClient { |
17 public: | 17 public: |
18 // Gets the current instance. | 18 // Gets the current instance. |
19 static LayoutTestContentBrowserClient* Get(); | 19 static LayoutTestContentBrowserClient* Get(); |
20 | 20 |
21 LayoutTestContentBrowserClient(); | 21 LayoutTestContentBrowserClient(); |
22 ~LayoutTestContentBrowserClient() override; | 22 ~LayoutTestContentBrowserClient() override; |
23 | 23 |
24 LayoutTestBrowserContext* GetLayoutTestBrowserContext(); | 24 LayoutTestBrowserContext* GetLayoutTestBrowserContext(); |
25 | 25 |
26 // Will be lazily created when running layout tests. | 26 // Implements the PlatformNotificationService interface. |
27 LayoutTestNotificationManager* GetLayoutTestNotificationManager(); | 27 LayoutTestNotificationManager* GetLayoutTestNotificationManager(); |
28 | 28 |
29 // ContentBrowserClient overrides. | 29 // ContentBrowserClient overrides. |
30 void RenderProcessWillLaunch(RenderProcessHost* host) override; | 30 void RenderProcessWillLaunch(RenderProcessHost* host) override; |
31 void RequestPermission( | 31 void RequestPermission( |
32 PermissionType permission, | 32 PermissionType permission, |
33 WebContents* web_contents, | 33 WebContents* web_contents, |
34 int bridge_id, | 34 int bridge_id, |
35 const GURL& requesting_frame, | 35 const GURL& requesting_frame, |
36 bool user_gesture, | 36 bool user_gesture, |
37 const base::Callback<void(bool)>& result_callback) override; | 37 const base::Callback<void(bool)>& result_callback) override; |
38 blink::WebNotificationPermission CheckDesktopNotificationPermission( | 38 PlatformNotificationService* GetPlatformNotificationService() override; |
39 const GURL& source_url, | |
40 ResourceContext* context, | |
41 int render_process_id) override; | |
42 void ShowDesktopNotification( | |
43 const ShowDesktopNotificationHostMsgParams& params, | |
44 BrowserContext* browser_context, | |
45 int render_process_id, | |
46 scoped_ptr<DesktopNotificationDelegate> delegate, | |
47 base::Closure* cancel_callback) override; | |
48 | 39 |
49 private: | 40 private: |
50 scoped_ptr<LayoutTestNotificationManager> layout_test_notification_manager_; | 41 scoped_ptr<LayoutTestNotificationManager> layout_test_notification_manager_; |
51 }; | 42 }; |
52 | 43 |
53 } // content | 44 } // content |
54 | 45 |
55 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_CONTENT_BROWSER_CLIENT_
H_ | 46 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_CONTENT_BROWSER_CLIENT_
H_ |
OLD | NEW |