| 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 LayoutTestNotificationManager; | 13 class LayoutTestNotificationManager; |
| 14 | 14 |
| 15 class LayoutTestContentBrowserClient : public ShellContentBrowserClient { | 15 class LayoutTestContentBrowserClient : public ShellContentBrowserClient { |
| 16 public: | 16 public: |
| 17 // Gets the current instance. | 17 // Gets the current instance. |
| 18 static LayoutTestContentBrowserClient* Get(); | 18 static LayoutTestContentBrowserClient* Get(); |
| 19 | 19 |
| 20 LayoutTestContentBrowserClient(); | 20 LayoutTestContentBrowserClient(); |
| 21 ~LayoutTestContentBrowserClient() override; | 21 ~LayoutTestContentBrowserClient() override; |
| 22 | 22 |
| 23 // Will be lazily created when running layout tests. | 23 // Implements the PlatformNotificationService interface. |
| 24 LayoutTestNotificationManager* GetLayoutTestNotificationManager(); | 24 LayoutTestNotificationManager* GetLayoutTestNotificationManager(); |
| 25 | 25 |
| 26 // ContentBrowserClient overrides. | 26 // ContentBrowserClient overrides. |
| 27 void RenderProcessWillLaunch(RenderProcessHost* host) override; | 27 void RenderProcessWillLaunch(RenderProcessHost* host) override; |
| 28 void RequestPermission( | 28 void RequestPermission( |
| 29 PermissionType permission, | 29 PermissionType permission, |
| 30 WebContents* web_contents, | 30 WebContents* web_contents, |
| 31 int bridge_id, | 31 int bridge_id, |
| 32 const GURL& requesting_frame, | 32 const GURL& requesting_frame, |
| 33 bool user_gesture, | 33 bool user_gesture, |
| 34 const base::Callback<void(bool)>& result_callback) override; | 34 const base::Callback<void(bool)>& result_callback) override; |
| 35 blink::WebNotificationPermission CheckDesktopNotificationPermission( | 35 PlatformNotificationService* GetPlatformNotificationService() override; |
| 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; | |
| 45 | 36 |
| 46 private: | 37 private: |
| 47 scoped_ptr<LayoutTestNotificationManager> layout_test_notification_manager_; | 38 scoped_ptr<LayoutTestNotificationManager> layout_test_notification_manager_; |
| 48 }; | 39 }; |
| 49 | 40 |
| 50 } // content | 41 } // content |
| 51 | 42 |
| 52 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_CONTENT_BROWSER_CLIENT_
H_ | 43 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_CONTENT_BROWSER_CLIENT_
H_ |
| OLD | NEW |