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/shell/browser/shell_content_browser_client.h" | 9 #include "content/shell/browser/shell_content_browser_client.h" |
9 | 10 |
10 namespace content { | 11 namespace content { |
11 | 12 |
12 class LayoutTestNotificationManager; | 13 class LayoutTestNotificationManager; |
13 | 14 |
14 class LayoutTestContentBrowserClient : public ShellContentBrowserClient { | 15 class LayoutTestContentBrowserClient : public ShellContentBrowserClient { |
15 public: | 16 public: |
16 // Gets the current instance. | 17 // Gets the current instance. |
17 static LayoutTestContentBrowserClient* Get(); | 18 static LayoutTestContentBrowserClient* Get(); |
18 | 19 |
19 LayoutTestContentBrowserClient(); | 20 LayoutTestContentBrowserClient(); |
20 ~LayoutTestContentBrowserClient() override; | 21 ~LayoutTestContentBrowserClient() override; |
21 | 22 |
22 // Will be lazily created when running layout tests. | 23 // Will be lazily created when running layout tests. |
23 LayoutTestNotificationManager* GetLayoutTestNotificationManager(); | 24 LayoutTestNotificationManager* GetLayoutTestNotificationManager(); |
24 | 25 |
25 // ContentBrowserClient overrides. | 26 // ContentBrowserClient overrides. |
26 void RenderProcessWillLaunch(RenderProcessHost* host) override; | 27 void RenderProcessWillLaunch(RenderProcessHost* host) override; |
27 void RequestDesktopNotificationPermission( | 28 void RequestPermission( |
28 const GURL& source_origin, | 29 PermissionType permission, |
29 RenderFrameHost* render_frame_host, | 30 WebContents* web_contents, |
30 const base::Callback<void(blink::WebNotificationPermission)>& callback) | 31 int bridge_id, |
31 override; | 32 const GURL& requesting_frame, |
| 33 bool user_gesture, |
| 34 const base::Callback<void(bool)>& result_callback) override; |
32 blink::WebNotificationPermission CheckDesktopNotificationPermission( | 35 blink::WebNotificationPermission CheckDesktopNotificationPermission( |
33 const GURL& source_url, | 36 const GURL& source_url, |
34 ResourceContext* context, | 37 ResourceContext* context, |
35 int render_process_id) override; | 38 int render_process_id) override; |
36 | 39 |
37 private: | 40 private: |
38 scoped_ptr<LayoutTestNotificationManager> layout_test_notification_manager_; | 41 scoped_ptr<LayoutTestNotificationManager> layout_test_notification_manager_; |
39 }; | 42 }; |
40 | 43 |
41 } // content | 44 } // content |
42 | 45 |
43 #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 |