OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
14 #include "base/memory/linked_ptr.h" | 14 #include "base/memory/linked_ptr.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/memory/scoped_vector.h" | 16 #include "base/memory/scoped_vector.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "content/public/browser/certificate_request_result_type.h" | 18 #include "content/public/browser/certificate_request_result_type.h" |
19 #include "content/public/browser/desktop_notification_delegate.h" | |
20 #include "content/public/browser/permission_type.h" | 19 #include "content/public/browser/permission_type.h" |
21 #include "content/public/common/content_client.h" | 20 #include "content/public/common/content_client.h" |
22 #include "content/public/common/media_stream_request.h" | 21 #include "content/public/common/media_stream_request.h" |
23 #include "content/public/common/resource_type.h" | 22 #include "content/public/common/resource_type.h" |
24 #include "content/public/common/socket_permission_request.h" | 23 #include "content/public/common/socket_permission_request.h" |
25 #include "content/public/common/window_container_type.h" | 24 #include "content/public/common/window_container_type.h" |
26 #include "net/base/mime_util.h" | 25 #include "net/base/mime_util.h" |
27 #include "net/cookies/canonical_cookie.h" | 26 #include "net/cookies/canonical_cookie.h" |
28 #include "net/url_request/url_request_interceptor.h" | 27 #include "net/url_request/url_request_interceptor.h" |
29 #include "net/url_request/url_request_job_factory.h" | 28 #include "net/url_request/url_request_job_factory.h" |
30 #include "storage/browser/fileapi/file_system_context.h" | 29 #include "storage/browser/fileapi/file_system_context.h" |
31 #include "third_party/WebKit/public/platform/WebNotificationPermission.h" | |
32 #include "ui/base/window_open_disposition.h" | 30 #include "ui/base/window_open_disposition.h" |
33 | 31 |
34 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 32 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
35 #include "base/posix/global_descriptors.h" | 33 #include "base/posix/global_descriptors.h" |
36 #endif | 34 #endif |
37 | 35 |
38 #if defined(OS_POSIX) | 36 #if defined(OS_POSIX) |
39 #include "content/public/browser/file_descriptor_info.h" | 37 #include "content/public/browser/file_descriptor_info.h" |
40 #endif | 38 #endif |
41 | 39 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
82 | 80 |
83 namespace content { | 81 namespace content { |
84 | 82 |
85 class AccessTokenStore; | 83 class AccessTokenStore; |
86 class BrowserChildProcessHost; | 84 class BrowserChildProcessHost; |
87 class BrowserContext; | 85 class BrowserContext; |
88 class BrowserMainParts; | 86 class BrowserMainParts; |
89 class BrowserPluginGuestDelegate; | 87 class BrowserPluginGuestDelegate; |
90 class BrowserPpapiHost; | 88 class BrowserPpapiHost; |
91 class BrowserURLHandler; | 89 class BrowserURLHandler; |
92 class DesktopNotificationDelegate; | |
93 class DevToolsManagerDelegate; | 90 class DevToolsManagerDelegate; |
94 class ExternalVideoSurfaceContainer; | 91 class ExternalVideoSurfaceContainer; |
95 class LocationProvider; | 92 class LocationProvider; |
96 class MediaObserver; | 93 class MediaObserver; |
94 class PlatformNotificationService; | |
97 class QuotaPermissionContext; | 95 class QuotaPermissionContext; |
98 class RenderFrameHost; | 96 class RenderFrameHost; |
99 class RenderProcessHost; | 97 class RenderProcessHost; |
100 class RenderViewHost; | 98 class RenderViewHost; |
101 class ResourceContext; | 99 class ResourceContext; |
102 class ServiceRegistry; | 100 class ServiceRegistry; |
103 class SiteInstance; | 101 class SiteInstance; |
104 class SpeechRecognitionManagerDelegate; | 102 class SpeechRecognitionManagerDelegate; |
105 class WebContents; | 103 class WebContents; |
106 class WebContentsViewDelegate; | 104 class WebContentsViewDelegate; |
107 struct MainFunctionParams; | 105 struct MainFunctionParams; |
108 struct Referrer; | 106 struct Referrer; |
109 struct ShowDesktopNotificationHostMsgParams; | |
110 struct WebPreferences; | 107 struct WebPreferences; |
111 | 108 |
112 // A mapping from the scheme name to the protocol handler that services its | 109 // A mapping from the scheme name to the protocol handler that services its |
113 // content. | 110 // content. |
114 typedef std::map< | 111 typedef std::map< |
115 std::string, linked_ptr<net::URLRequestJobFactory::ProtocolHandler> > | 112 std::string, linked_ptr<net::URLRequestJobFactory::ProtocolHandler> > |
116 ProtocolHandlerMap; | 113 ProtocolHandlerMap; |
117 | 114 |
118 // A scoped vector of protocol interceptors. | 115 // A scoped vector of protocol interceptors. |
119 typedef ScopedVector<net::URLRequestInterceptor> | 116 typedef ScopedVector<net::URLRequestInterceptor> |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
411 virtual void AddCertificate(net::CertificateMimeType cert_type, | 408 virtual void AddCertificate(net::CertificateMimeType cert_type, |
412 const void* cert_data, | 409 const void* cert_data, |
413 size_t cert_size, | 410 size_t cert_size, |
414 int render_process_id, | 411 int render_process_id, |
415 int render_frame_id) {} | 412 int render_frame_id) {} |
416 | 413 |
417 // Returns a class to get notifications about media event. The embedder can | 414 // Returns a class to get notifications about media event. The embedder can |
418 // return NULL if they're not interested. | 415 // return NULL if they're not interested. |
419 virtual MediaObserver* GetMediaObserver(); | 416 virtual MediaObserver* GetMediaObserver(); |
420 | 417 |
421 // Checks if the given page has permission to show desktop notifications. | 418 // Returns the platform notification service, capable of displaying Web |
422 // This is called on the IO thread. | 419 // Notifications to the user. The embedder can return NULL if they don't |
Avi (use Gerrit)
2014/12/10 00:18:39
nullptr?
Peter Beverloo
2014/12/10 12:14:13
Done.
| |
423 virtual blink::WebNotificationPermission | 420 // support this functionality. May be called from any thread. |
424 CheckDesktopNotificationPermission( | 421 virtual PlatformNotificationService* GetPlatformNotificationService(); |
425 const GURL& source_url, | |
426 ResourceContext* context, | |
427 int render_process_id); | |
428 | |
429 // Show a desktop notification. If |cancel_callback| is non-null, it's set to | |
430 // a callback which can be used to cancel the notification. | |
431 virtual void ShowDesktopNotification( | |
432 const ShowDesktopNotificationHostMsgParams& params, | |
433 BrowserContext* browser_context, | |
434 int render_process_id, | |
435 scoped_ptr<DesktopNotificationDelegate> delegate, | |
436 base::Closure* cancel_callback) {} | |
437 | 422 |
438 virtual void RequestPermission( | 423 virtual void RequestPermission( |
439 PermissionType permission, | 424 PermissionType permission, |
440 WebContents* web_contents, | 425 WebContents* web_contents, |
441 int bridge_id, | 426 int bridge_id, |
442 const GURL& requesting_frame, | 427 const GURL& requesting_frame, |
443 bool user_gesture, | 428 bool user_gesture, |
444 const base::Callback<void(bool)>& result_callback); | 429 const base::Callback<void(bool)>& result_callback); |
445 | 430 |
446 virtual void CancelPermissionRequest(PermissionType permission, | 431 virtual void CancelPermissionRequest(PermissionType permission, |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
620 // Allows an embedder to provide its own ExternalVideoSurfaceContainer | 605 // Allows an embedder to provide its own ExternalVideoSurfaceContainer |
621 // implementation. Return NULL to disable external surface video. | 606 // implementation. Return NULL to disable external surface video. |
622 virtual ExternalVideoSurfaceContainer* | 607 virtual ExternalVideoSurfaceContainer* |
623 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); | 608 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); |
624 #endif | 609 #endif |
625 }; | 610 }; |
626 | 611 |
627 } // namespace content | 612 } // namespace content |
628 | 613 |
629 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 614 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |