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

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

Issue 2784433002: Ensures that audio tasks cannot run after AudioManager is deleted. (Closed)
Patch Set: fixes content_browsertests and content_unittests Created 3 years, 8 months 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
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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <utility> 13 #include <utility>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/callback_forward.h" 16 #include "base/callback_forward.h"
17 #include "base/task_scheduler/task_scheduler.h" 17 #include "base/task_scheduler/task_scheduler.h"
18 #include "base/values.h" 18 #include "base/values.h"
19 #include "build/build_config.h" 19 #include "build/build_config.h"
20 #include "content/public/browser/certificate_request_result_type.h" 20 #include "content/public/browser/certificate_request_result_type.h"
21 #include "content/public/browser/navigation_throttle.h" 21 #include "content/public/browser/navigation_throttle.h"
22 #include "content/public/common/content_client.h" 22 #include "content/public/common/content_client.h"
23 #include "content/public/common/media_stream_request.h" 23 #include "content/public/common/media_stream_request.h"
24 #include "content/public/common/resource_type.h" 24 #include "content/public/common/resource_type.h"
25 #include "content/public/common/service_info.h" 25 #include "content/public/common/service_info.h"
26 #include "content/public/common/socket_permission_request.h" 26 #include "content/public/common/socket_permission_request.h"
27 #include "content/public/common/window_container_type.mojom.h" 27 #include "content/public/common/window_container_type.mojom.h"
28 #include "media/audio/audio_manager.h"
29 #include "media/media_features.h" 28 #include "media/media_features.h"
30 #include "media/mojo/interfaces/remoting.mojom.h" 29 #include "media/mojo/interfaces/remoting.mojom.h"
31 #include "net/base/mime_util.h" 30 #include "net/base/mime_util.h"
32 #include "net/cookies/canonical_cookie.h" 31 #include "net/cookies/canonical_cookie.h"
33 #include "storage/browser/fileapi/file_system_context.h" 32 #include "storage/browser/fileapi/file_system_context.h"
34 #include "storage/browser/quota/quota_manager.h" 33 #include "storage/browser/quota/quota_manager.h"
35 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" 34 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
36 #include "third_party/WebKit/public/web/window_features.mojom.h" 35 #include "third_party/WebKit/public/web/window_features.mojom.h"
37 #include "ui/base/page_transition_types.h" 36 #include "ui/base/page_transition_types.h"
38 #include "ui/base/window_open_disposition.h" 37 #include "ui/base/window_open_disposition.h"
(...skipping 16 matching lines...) Expand all
55 54
56 namespace gfx { 55 namespace gfx {
57 class ImageSkia; 56 class ImageSkia;
58 } 57 }
59 58
60 namespace gpu { 59 namespace gpu {
61 class GpuChannelEstablishFactory; 60 class GpuChannelEstablishFactory;
62 } 61 }
63 62
64 namespace media { 63 namespace media {
64 class AudioLogFactory;
65 class AudioManager;
65 class CdmFactory; 66 class CdmFactory;
66 } 67 }
67 68
68 namespace service_manager { 69 namespace service_manager {
69 class InterfaceRegistry; 70 class InterfaceRegistry;
70 class Service; 71 class Service;
71 } 72 }
72 73
73 namespace net { 74 namespace net {
74 class CookieOptions; 75 class CookieOptions;
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 764
764 // PlzNavigate 765 // PlzNavigate
765 // Called at the start of the navigation to get opaque data the embedder 766 // Called at the start of the navigation to get opaque data the embedder
766 // wants to see passed to the corresponding URLRequest on the IO thread. 767 // wants to see passed to the corresponding URLRequest on the IO thread.
767 virtual std::unique_ptr<NavigationUIData> GetNavigationUIData( 768 virtual std::unique_ptr<NavigationUIData> GetNavigationUIData(
768 NavigationHandle* navigation_handle); 769 NavigationHandle* navigation_handle);
769 770
770 // Allows the embedder to provide its own AudioManager implementation. 771 // Allows the embedder to provide its own AudioManager implementation.
771 // If this function returns nullptr, a default platform implementation 772 // If this function returns nullptr, a default platform implementation
772 // will be used. 773 // will be used.
773 virtual media::ScopedAudioManagerPtr CreateAudioManager( 774 virtual std::unique_ptr<media::AudioManager> CreateAudioManager(
775 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
776 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner,
774 media::AudioLogFactory* audio_log_factory); 777 media::AudioLogFactory* audio_log_factory);
775 // Creates and returns a factory used for creating CDM instances for playing 778 // Creates and returns a factory used for creating CDM instances for playing
776 // protected content. 779 // protected content.
777 virtual std::unique_ptr<media::CdmFactory> CreateCdmFactory(); 780 virtual std::unique_ptr<media::CdmFactory> CreateCdmFactory();
778 781
779 // Populates |mappings| with all files that need to be mapped before launching 782 // Populates |mappings| with all files that need to be mapped before launching
780 // a child process. 783 // a child process.
781 #if defined(OS_POSIX) && !defined(OS_MACOSX) 784 #if defined(OS_POSIX) && !defined(OS_MACOSX)
782 virtual void GetAdditionalMappedFilesForChildProcess( 785 virtual void GetAdditionalMappedFilesForChildProcess(
783 const base::CommandLine& command_line, 786 const base::CommandLine& command_line,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 virtual bool ShouldRedirectDOMStorageTaskRunner(); 831 virtual bool ShouldRedirectDOMStorageTaskRunner();
829 832
830 // If this returns true, all BrowserThreads (but UI/IO) that support it on 833 // If this returns true, all BrowserThreads (but UI/IO) that support it on
831 // this platform will experimentally be redirected to TaskScheduler. 834 // this platform will experimentally be redirected to TaskScheduler.
832 virtual bool RedirectNonUINonIOBrowserThreadsToTaskScheduler(); 835 virtual bool RedirectNonUINonIOBrowserThreadsToTaskScheduler();
833 }; 836 };
834 837
835 } // namespace content 838 } // namespace content
836 839
837 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 840 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698