Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: content/public/browser/content_browser_client.h

Issue 774573003: Start pulling away notification logic from ChromeContentBrowserClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/content_common.gypi ('k') | content/public/browser/content_browser_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/permission_status.mojom.h" 22 #include "content/public/common/permission_status.mojom.h"
24 #include "content/public/common/resource_type.h" 23 #include "content/public/common/resource_type.h"
25 #include "content/public/common/socket_permission_request.h" 24 #include "content/public/common/socket_permission_request.h"
26 #include "content/public/common/window_container_type.h" 25 #include "content/public/common/window_container_type.h"
27 #include "net/base/mime_util.h" 26 #include "net/base/mime_util.h"
28 #include "net/cookies/canonical_cookie.h" 27 #include "net/cookies/canonical_cookie.h"
29 #include "net/url_request/url_request_interceptor.h" 28 #include "net/url_request/url_request_interceptor.h"
30 #include "net/url_request/url_request_job_factory.h" 29 #include "net/url_request/url_request_job_factory.h"
31 #include "storage/browser/fileapi/file_system_context.h" 30 #include "storage/browser/fileapi/file_system_context.h"
32 #include "third_party/WebKit/public/platform/WebNotificationPermission.h"
33 #include "ui/base/window_open_disposition.h" 31 #include "ui/base/window_open_disposition.h"
34 32
35 #if defined(OS_POSIX) && !defined(OS_MACOSX) 33 #if defined(OS_POSIX) && !defined(OS_MACOSX)
36 #include "base/posix/global_descriptors.h" 34 #include "base/posix/global_descriptors.h"
37 #endif 35 #endif
38 36
39 #if defined(OS_POSIX) 37 #if defined(OS_POSIX)
40 #include "content/public/browser/file_descriptor_info.h" 38 #include "content/public/browser/file_descriptor_info.h"
41 #endif 39 #endif
42 40
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 81
84 namespace content { 82 namespace content {
85 83
86 class AccessTokenStore; 84 class AccessTokenStore;
87 class BrowserChildProcessHost; 85 class BrowserChildProcessHost;
88 class BrowserContext; 86 class BrowserContext;
89 class BrowserMainParts; 87 class BrowserMainParts;
90 class BrowserPluginGuestDelegate; 88 class BrowserPluginGuestDelegate;
91 class BrowserPpapiHost; 89 class BrowserPpapiHost;
92 class BrowserURLHandler; 90 class BrowserURLHandler;
93 class DesktopNotificationDelegate;
94 class DevToolsManagerDelegate; 91 class DevToolsManagerDelegate;
95 class ExternalVideoSurfaceContainer; 92 class ExternalVideoSurfaceContainer;
96 class LocationProvider; 93 class LocationProvider;
97 class MediaObserver; 94 class MediaObserver;
95 class PlatformNotificationService;
98 class QuotaPermissionContext; 96 class QuotaPermissionContext;
99 class RenderFrameHost; 97 class RenderFrameHost;
100 class RenderProcessHost; 98 class RenderProcessHost;
101 class RenderViewHost; 99 class RenderViewHost;
102 class ResourceContext; 100 class ResourceContext;
103 class ServiceRegistry; 101 class ServiceRegistry;
104 class SiteInstance; 102 class SiteInstance;
105 class SpeechRecognitionManagerDelegate; 103 class SpeechRecognitionManagerDelegate;
106 class WebContents; 104 class WebContents;
107 class WebContentsViewDelegate; 105 class WebContentsViewDelegate;
108 struct MainFunctionParams; 106 struct MainFunctionParams;
109 struct Referrer; 107 struct Referrer;
110 struct ShowDesktopNotificationHostMsgParams;
111 struct WebPreferences; 108 struct WebPreferences;
112 109
113 // A mapping from the scheme name to the protocol handler that services its 110 // A mapping from the scheme name to the protocol handler that services its
114 // content. 111 // content.
115 typedef std::map< 112 typedef std::map<
116 std::string, linked_ptr<net::URLRequestJobFactory::ProtocolHandler> > 113 std::string, linked_ptr<net::URLRequestJobFactory::ProtocolHandler> >
117 ProtocolHandlerMap; 114 ProtocolHandlerMap;
118 115
119 // A scoped vector of protocol interceptors. 116 // A scoped vector of protocol interceptors.
120 typedef ScopedVector<net::URLRequestInterceptor> 117 typedef ScopedVector<net::URLRequestInterceptor>
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 virtual void AddCertificate(net::CertificateMimeType cert_type, 409 virtual void AddCertificate(net::CertificateMimeType cert_type,
413 const void* cert_data, 410 const void* cert_data,
414 size_t cert_size, 411 size_t cert_size,
415 int render_process_id, 412 int render_process_id,
416 int render_frame_id) {} 413 int render_frame_id) {}
417 414
418 // Returns a class to get notifications about media event. The embedder can 415 // Returns a class to get notifications about media event. The embedder can
419 // return NULL if they're not interested. 416 // return NULL if they're not interested.
420 virtual MediaObserver* GetMediaObserver(); 417 virtual MediaObserver* GetMediaObserver();
421 418
422 // Checks if the given page has permission to show desktop notifications. 419 // Returns the platform notification service, capable of displaying Web
423 // This is called on the IO thread. 420 // Notifications to the user. The embedder can return a nullptr if they don't
424 virtual blink::WebNotificationPermission 421 // support this functionality. May be called from any thread.
425 CheckDesktopNotificationPermission( 422 virtual PlatformNotificationService* GetPlatformNotificationService();
426 const GURL& source_url,
427 ResourceContext* context,
428 int render_process_id);
429
430 // Show a desktop notification. If |cancel_callback| is non-null, it's set to
431 // a callback which can be used to cancel the notification.
432 virtual void ShowDesktopNotification(
433 const ShowDesktopNotificationHostMsgParams& params,
434 BrowserContext* browser_context,
435 int render_process_id,
436 scoped_ptr<DesktopNotificationDelegate> delegate,
437 base::Closure* cancel_callback) {}
438 423
439 virtual void RequestPermission( 424 virtual void RequestPermission(
440 PermissionType permission, 425 PermissionType permission,
441 WebContents* web_contents, 426 WebContents* web_contents,
442 int bridge_id, 427 int bridge_id,
443 const GURL& requesting_frame, 428 const GURL& requesting_frame,
444 bool user_gesture, 429 bool user_gesture,
445 const base::Callback<void(bool)>& result_callback); 430 const base::Callback<void(bool)>& result_callback);
446 431
447 virtual void CancelPermissionRequest(PermissionType permission, 432 virtual void CancelPermissionRequest(PermissionType permission,
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 // Allows an embedder to provide its own ExternalVideoSurfaceContainer 612 // Allows an embedder to provide its own ExternalVideoSurfaceContainer
628 // implementation. Return NULL to disable external surface video. 613 // implementation. Return NULL to disable external surface video.
629 virtual ExternalVideoSurfaceContainer* 614 virtual ExternalVideoSurfaceContainer*
630 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); 615 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents);
631 #endif 616 #endif
632 }; 617 };
633 618
634 } // namespace content 619 } // namespace content
635 620
636 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 621 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « content/content_common.gypi ('k') | content/public/browser/content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698