Convert //content from scoped_ptr to std::unique_ptr
BUG=554298 R=avi@chromium.org TBR=rdevlin.cronin@chromium.org,thestig@chromium.org Review URL: https://codereview.chromium.org/1874903002 Cr-Commit-Position: refs/heads/master@{#386303}
This commit is contained in:
chrome
browser
utility
components
content
app
gpu
ppapi_plugin
public
browser
android
appcache_service.hbackground_tracing_config.ccbackground_tracing_config.hbackground_tracing_manager.hbrowser_context.hbrowser_thread.hcontent_browser_client.cccontent_browser_client.hcookie_store_factory.hdevtools_agent_host.hdownload_manager.hdownload_save_info.hdownload_url_parameters.ccdownload_url_parameters.hfont_list_async.hgeolocation_provider.hhost_zoom_map.hmojo_app_connection.hnavigation_entry.hnavigation_handle.ccnavigation_handle.hplatform_notification_service.hpower_save_blocker.hpresentation_service_delegate.hpresentation_session_message.hrender_process_host.hrender_widget_host.hrender_widget_host_view.hresource_context.hresource_dispatcher_host.hresource_dispatcher_host_delegate.ccresource_dispatcher_host_delegate.hscreen_orientation_provider.hssl_host_state_delegate.hstream_info.htrace_uploader.htracing_controller.htracing_delegate.hweb_contents.hweb_contents_delegate.ccweb_contents_delegate.hchild
common
gpu
renderer
content_renderer_client.cccontent_renderer_client.hdocument_state.hmedia_stream_utils.ccmedia_stream_utils.hplugin_instance_throttler.hrender_frame.hrender_thread.hvideo_encode_accelerator.ccvideo_encode_accelerator.h
test
browser_test_base.hbrowser_test_utils.ccbrowser_test_utils.hcontent_browser_test.hcontent_test_suite_base.cclayouttest_support.hmock_blob_url_request_context.ccmock_blob_url_request_context.hmock_download_manager.ccmock_download_manager.hmock_render_process_host.ccmock_render_process_host.hmock_render_thread.ccmock_render_thread.hmock_resource_context.hmock_storage_client.ccrender_view_test.ccrender_view_test.hsandbox_file_system_test_helper.cctest_browser_context.cctest_browser_context.htest_browser_thread.htest_browser_thread_bundle.htest_content_client_initializer.htest_download_request_handler.cctest_download_request_handler.htest_file_error_injector.cctest_file_error_injector.htest_file_system_backend.cctest_file_system_backend.htest_launcher.cctest_launcher.htest_navigation_observer.htest_renderer_host.htest_synchronous_compositor_android.cctest_synchronous_compositor_android.htest_utils.cctest_utils.htest_web_contents_factory.htest_web_ui.hunittest_test_suite.h
utility
renderer
shell
app
browser
layout_test
blink_test_controller.ccblink_test_controller.hlayout_test_android.cclayout_test_bluetooth_adapter_provider.cclayout_test_bluetooth_adapter_provider.hlayout_test_bluetooth_chooser_factory.cclayout_test_bluetooth_chooser_factory.hlayout_test_browser_context.hlayout_test_browser_main.cclayout_test_browser_main.hlayout_test_browser_main_parts.hlayout_test_content_browser_client.cclayout_test_content_browser_client.hlayout_test_devtools_frontend.cclayout_test_javascript_dialog_manager.hlayout_test_notification_manager.cclayout_test_notification_manager.hlayout_test_url_request_context_getter.cclayout_test_url_request_context_getter.h
shell.ccshell.hshell_browser_context.ccshell_browser_context.hshell_browser_main.ccshell_browser_main.hshell_browser_main_parts.hshell_content_browser_client.ccshell_content_browser_client.hshell_devtools_frontend.ccshell_devtools_frontend.hshell_devtools_manager_delegate.ccshell_javascript_dialog_manager.hshell_net_log.ccshell_net_log.hshell_platform_data_aura.hshell_url_request_context_getter.ccshell_url_request_context_getter.hshell_views.ccrenderer
layout_test
blink_test_runner.ccblink_test_runner.hlayout_test_content_renderer_client.cclayout_test_content_renderer_client.hlayout_test_render_process_observer.hleak_detector.h
shell_content_renderer_client.hutility
test
blink_test_environment.ccbrowser_side_navigation_test_utils.ccbrowser_side_navigation_test_utils.hcontent_browser_test_utils_internal.cccontent_test_launcher.cccontent_test_suite.hdwrite_font_fake_sender_win.ccdwrite_font_fake_sender_win.hfake_compositor_dependencies.ccfake_compositor_dependencies.hfake_renderer_scheduler.ccfake_renderer_scheduler.himage_decoder_test.cclayouttest_support.cc
net
ppapi_unittest.hrender_thread_impl_browser_test_ipc_helper.hrun_all_unittests.cctest_background_sync_context_impl.cctest_background_sync_context_impl.htest_background_sync_manager.htest_blink_web_unit_test_support.cctest_blink_web_unit_test_support.htest_frame_navigation_observer.htest_navigation_url_loader.cctest_navigation_url_loader.htest_navigation_url_loader_factory.cctest_navigation_url_loader_factory.htest_render_frame_host_factory.cctest_render_frame_host_factory.htest_render_view_host.cctest_render_view_host.htest_render_view_host_factory.ccweb_gesture_curve_mock.hutility
zygote
extensions/shell/browser
@ -13,6 +13,7 @@
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/process/process_iterator.h"
|
||||
#include "base/process/process_metrics.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "base/file_version_info.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/process/process_iterator.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "base/bind.h"
|
||||
#include "base/file_version_info.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/process/process_handle.h"
|
||||
#include "base/timer/timer.h"
|
||||
#include "chrome/browser/performance_monitor/process_metrics_history.h"
|
||||
|
@ -5,6 +5,7 @@
|
||||
#ifndef CHROME_BROWSER_TRACING_CHROME_TRACING_DELEGATE_H_
|
||||
#define CHROME_BROWSER_TRACING_CHROME_TRACING_DELEGATE_H_
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "chrome/browser/ui/browser_list_observer.h"
|
||||
#include "content/public/browser/tracing_delegate.h"
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/scoped_vector.h"
|
||||
#include "build/build_config.h"
|
||||
#include "content/public/utility/content_utility_client.h"
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/time/time.h"
|
||||
#include "build/build_config.h"
|
||||
#include "content/public/common/sandbox_init.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/files/scoped_file.h"
|
||||
#include "base/logging.h"
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "components/nacl/common/nacl_switches.h"
|
||||
#include "content/public/common/sandbox_init.h"
|
||||
#include "sandbox/linux/bpf_dsl/bpf_dsl.h"
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include "base/callback_list.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/observer_list.h"
|
||||
#include "base/supports_user_data.h"
|
||||
|
@ -4,11 +4,12 @@
|
||||
|
||||
#include "content/app/android/content_main.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/at_exit.h"
|
||||
#include "base/base_switches.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "content/public/app/content_main.h"
|
||||
#include "content/public/app/content_main_delegate.h"
|
||||
@ -21,10 +22,10 @@ using base::LazyInstance;
|
||||
namespace content {
|
||||
|
||||
namespace {
|
||||
LazyInstance<scoped_ptr<ContentMainRunner> > g_content_runner =
|
||||
LazyInstance<std::unique_ptr<ContentMainRunner>> g_content_runner =
|
||||
LAZY_INSTANCE_INITIALIZER;
|
||||
|
||||
LazyInstance<scoped_ptr<ContentMainDelegate> > g_content_main_delegate =
|
||||
LazyInstance<std::unique_ptr<ContentMainDelegate>> g_content_main_delegate =
|
||||
LAZY_INSTANCE_INITIALIZER;
|
||||
|
||||
} // namespace
|
||||
|
@ -4,13 +4,14 @@
|
||||
|
||||
#include "content/public/app/content_main.h"
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include <memory>
|
||||
|
||||
#include "content/public/app/content_main_runner.h"
|
||||
|
||||
namespace content {
|
||||
|
||||
int ContentMain(const ContentMainParams& params) {
|
||||
scoped_ptr<ContentMainRunner> main_runner(ContentMainRunner::Create());
|
||||
std::unique_ptr<ContentMainRunner> main_runner(ContentMainRunner::Create());
|
||||
|
||||
int exit_code = main_runner->Initialize(params);
|
||||
if (exit_code >= 0)
|
||||
|
@ -7,6 +7,8 @@
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
@ -21,7 +23,6 @@
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/scoped_vector.h"
|
||||
#include "base/metrics/histogram_base.h"
|
||||
#include "base/metrics/statistics_recorder.h"
|
||||
@ -786,11 +787,11 @@ class ContentMainRunnerImpl : public ContentMainRunner {
|
||||
// The delegate will outlive this object.
|
||||
ContentMainDelegate* delegate_;
|
||||
|
||||
scoped_ptr<base::AtExitManager> exit_manager_;
|
||||
std::unique_ptr<base::AtExitManager> exit_manager_;
|
||||
#if defined(OS_WIN)
|
||||
sandbox::SandboxInterfaceInfo sandbox_info_;
|
||||
#elif defined(OS_MACOSX)
|
||||
scoped_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_;
|
||||
std::unique_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_;
|
||||
#endif
|
||||
|
||||
base::Closure* ui_task_;
|
||||
|
@ -4,9 +4,10 @@
|
||||
|
||||
#include "content/app/mojo/mojo_init.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "ipc/ipc_channel.h"
|
||||
#include "mojo/edk/embedder/embedder.h"
|
||||
|
@ -7,13 +7,13 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
#include <queue>
|
||||
#include <string>
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/time/time.h"
|
||||
#include "build/build_config.h"
|
||||
#include "content/child/child_thread_impl.h"
|
||||
@ -165,9 +165,9 @@ class GpuChildThread : public ChildThreadImpl,
|
||||
// Non-owning.
|
||||
gpu::SyncPointManager* sync_point_manager_;
|
||||
|
||||
scoped_ptr<gpu::GpuChannelManager> gpu_channel_manager_;
|
||||
std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_;
|
||||
|
||||
scoped_ptr<MediaService> media_service_;
|
||||
std::unique_ptr<MediaService> media_service_;
|
||||
|
||||
// Information about the GPU, such as device and vendor ID.
|
||||
gpu::GPUInfo gpu_info_;
|
||||
@ -182,7 +182,7 @@ class GpuChildThread : public ChildThreadImpl,
|
||||
gpu::GpuMemoryBufferFactory* const gpu_memory_buffer_factory_;
|
||||
|
||||
// Process control for Mojo application hosting.
|
||||
scoped_ptr<GpuProcessControlImpl> process_control_;
|
||||
std::unique_ptr<GpuProcessControlImpl> process_control_;
|
||||
|
||||
// Bindings to the mojom::ProcessControl impl.
|
||||
mojo::BindingSet<mojom::ProcessControl> process_control_bindings_;
|
||||
|
@ -189,14 +189,14 @@ int GpuMain(const MainFunctionParams& parameters) {
|
||||
// We need a UI loop so that we can grab the Expose events. See GLSurfaceGLX
|
||||
// and https://crbug.com/326995.
|
||||
base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI);
|
||||
scoped_ptr<ui::PlatformEventSource> event_source =
|
||||
std::unique_ptr<ui::PlatformEventSource> event_source =
|
||||
ui::PlatformEventSource::CreateDefault();
|
||||
#elif defined(OS_LINUX)
|
||||
base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT);
|
||||
#elif defined(OS_MACOSX)
|
||||
// This is necessary for CoreAnimation layers hosted in the GPU process to be
|
||||
// drawn. See http://crbug.com/312462.
|
||||
scoped_ptr<base::MessagePump> pump(new base::MessagePumpCFRunLoop());
|
||||
std::unique_ptr<base::MessagePump> pump(new base::MessagePumpCFRunLoop());
|
||||
base::MessageLoop main_message_loop(std::move(pump));
|
||||
#else
|
||||
base::MessageLoop main_message_loop(base::MessageLoop::TYPE_IO);
|
||||
@ -379,7 +379,7 @@ int GpuMain(const MainFunctionParams& parameters) {
|
||||
|
||||
logging::SetLogMessageHandler(NULL);
|
||||
|
||||
scoped_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory;
|
||||
std::unique_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory;
|
||||
if (gpu::GetNativeGpuMemoryBufferType() != gfx::EMPTY_BUFFER)
|
||||
gpu_memory_buffer_factory = gpu::GpuMemoryBufferFactory::CreateNativeType();
|
||||
|
||||
|
@ -5,8 +5,9 @@
|
||||
#ifndef CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_
|
||||
#define CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/threading/thread.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "content/common/in_process_child_thread_params.h"
|
||||
@ -44,12 +45,12 @@ class InProcessGpuThread : public base::Thread {
|
||||
const gpu::GpuPreferences gpu_preferences_;
|
||||
|
||||
// Can be null if overridden.
|
||||
scoped_ptr<gpu::SyncPointManager> sync_point_manager_;
|
||||
std::unique_ptr<gpu::SyncPointManager> sync_point_manager_;
|
||||
|
||||
// Non-owning.
|
||||
gpu::SyncPointManager* sync_point_manager_override_;
|
||||
|
||||
scoped_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory_;
|
||||
std::unique_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(InProcessGpuThread);
|
||||
};
|
||||
|
@ -6,9 +6,10 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/bind_helpers.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "build/build_config.h"
|
||||
#include "content/child/child_process.h"
|
||||
@ -47,7 +48,7 @@ void GetPermissionSettingsCallback(
|
||||
PP_Flash_BrowserOperations_Permission default_permission,
|
||||
uint32_t site_count,
|
||||
const PP_Flash_BrowserOperations_SiteSetting sites[]) {
|
||||
scoped_ptr<GetPermissionSettingsContext> context(
|
||||
std::unique_ptr<GetPermissionSettingsContext> context(
|
||||
reinterpret_cast<GetPermissionSettingsContext*>(user_data));
|
||||
|
||||
if (!context->dispatcher.get())
|
||||
@ -300,7 +301,7 @@ bool BrokerProcessDispatcher::SetSitePermission(
|
||||
return true;
|
||||
|
||||
std::string data_str = ConvertPluginDataPath(plugin_data_path);
|
||||
scoped_ptr<PP_Flash_BrowserOperations_SiteSetting[]> site_array(
|
||||
std::unique_ptr<PP_Flash_BrowserOperations_SiteSetting[]> site_array(
|
||||
new PP_Flash_BrowserOperations_SiteSetting[sites.size()]);
|
||||
|
||||
for (size_t i = 0; i < sites.size(); ++i) {
|
||||
|
@ -7,8 +7,9 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "build/build_config.h"
|
||||
#include "content/child/blink_platform_impl.h"
|
||||
|
||||
@ -56,7 +57,7 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
private:
|
||||
#if !defined(OS_ANDROID) && !defined(OS_WIN)
|
||||
class SandboxSupport;
|
||||
scoped_ptr<SandboxSupport> sandbox_support_;
|
||||
std::unique_ptr<SandboxSupport> sandbox_support_;
|
||||
#endif
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(PpapiBlinkPlatformImpl);
|
||||
|
@ -135,7 +135,7 @@ int PpapiPluginMain(const MainFunctionParams& parameters) {
|
||||
LinuxSandbox::InitializeSandbox();
|
||||
#endif
|
||||
|
||||
scoped_ptr<base::FeatureList> feature_list(new base::FeatureList);
|
||||
std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
|
||||
feature_list->InitializeFromCommandLine(
|
||||
command_line.GetSwitchValueASCII(switches::kEnableFeatures),
|
||||
command_line.GetSwitchValueASCII(switches::kDisableFeatures));
|
||||
|
@ -8,11 +8,11 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/process/process.h"
|
||||
#include "base/scoped_native_library.h"
|
||||
#include "build/build_config.h"
|
||||
@ -163,7 +163,7 @@ class PpapiThread : public ChildThreadImpl,
|
||||
uint32_t next_plugin_dispatcher_id_;
|
||||
|
||||
// The BlinkPlatformImpl implementation.
|
||||
scoped_ptr<PpapiBlinkPlatformImpl> blink_platform_impl_;
|
||||
std::unique_ptr<PpapiBlinkPlatformImpl> blink_platform_impl_;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
// Caches the handle to the peer process if this is a broker.
|
||||
|
@ -5,8 +5,9 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_PROTOCOL_HANDLER_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_PROTOCOL_HANDLER_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "net/url_request/url_request_job_factory.h"
|
||||
|
||||
@ -21,7 +22,7 @@ class CONTENT_EXPORT ContentProtocolHandler :
|
||||
public net::URLRequestJobFactory::ProtocolHandler {
|
||||
public:
|
||||
// Creates and returns a ContentProtocolHandler instance.
|
||||
static scoped_ptr<ContentProtocolHandler> Create(
|
||||
static std::unique_ptr<ContentProtocolHandler> Create(
|
||||
const scoped_refptr<base::TaskRunner>& content_task_runner);
|
||||
|
||||
~ContentProtocolHandler() override {}
|
||||
|
@ -5,7 +5,8 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_ANDROID_PROVISION_FETCHER_FACTORY_H
|
||||
#define CONTENT_PUBLIC_BROWSER_ANDROID_PROVISION_FETCHER_FACTORY_H
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include <memory>
|
||||
|
||||
#include "content/common/content_export.h"
|
||||
|
||||
namespace media {
|
||||
@ -21,7 +22,7 @@ namespace content {
|
||||
// Factory method for media::ProvisionFetcher objects.
|
||||
|
||||
CONTENT_EXPORT
|
||||
scoped_ptr<media::ProvisionFetcher> CreateProvisionFetcher(
|
||||
std::unique_ptr<media::ProvisionFetcher> CreateProvisionFetcher(
|
||||
net::URLRequestContextGetter* context_getter);
|
||||
|
||||
} // namespace content
|
||||
|
@ -57,7 +57,7 @@ class CONTENT_EXPORT SynchronousCompositor {
|
||||
Frame& operator=(Frame&& rhs);
|
||||
|
||||
uint32_t output_surface_id;
|
||||
scoped_ptr<cc::CompositorFrame> frame;
|
||||
std::unique_ptr<cc::CompositorFrame> frame;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(Frame);
|
||||
|
@ -6,10 +6,10 @@
|
||||
#define CONTENT_PUBLIC_BROWSER_APPCACHE_SERVICE_H_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "content/public/common/appcache_info.h"
|
||||
#include "net/base/completion_callback.h"
|
||||
|
@ -13,7 +13,7 @@ BackgroundTracingConfig::BackgroundTracingConfig(TracingMode tracing_mode)
|
||||
|
||||
BackgroundTracingConfig::~BackgroundTracingConfig() {}
|
||||
|
||||
scoped_ptr<BackgroundTracingConfig> BackgroundTracingConfig::FromDict(
|
||||
std::unique_ptr<BackgroundTracingConfig> BackgroundTracingConfig::FromDict(
|
||||
const base::DictionaryValue* dict) {
|
||||
return BackgroundTracingConfigImpl::FromDict(dict);
|
||||
}
|
||||
|
@ -5,7 +5,8 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_CONFIG_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_CONFIG_H_
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include <memory>
|
||||
|
||||
#include "base/trace_event/trace_event_impl.h"
|
||||
#include "content/common/content_export.h"
|
||||
|
||||
@ -27,7 +28,7 @@ class CONTENT_EXPORT BackgroundTracingConfig {
|
||||
};
|
||||
TracingMode tracing_mode() const { return tracing_mode_; }
|
||||
|
||||
static scoped_ptr<BackgroundTracingConfig> FromDict(
|
||||
static std::unique_ptr<BackgroundTracingConfig> FromDict(
|
||||
const base::DictionaryValue* dict);
|
||||
|
||||
virtual void IntoDict(base::DictionaryValue* dict) const = 0;
|
||||
|
@ -5,7 +5,8 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_MANAGER_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_MANAGER_H_
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include <memory>
|
||||
|
||||
#include "base/trace_event/trace_event_impl.h"
|
||||
#include "base/values.h"
|
||||
#include "content/common/content_export.h"
|
||||
@ -32,7 +33,7 @@ class BackgroundTracingManager {
|
||||
// Example:
|
||||
//
|
||||
// void Upload(const scoped_refptr<base::RefCountedString>& data,
|
||||
// scoped_ptr<base::DictionaryValue>,
|
||||
// std::unique_ptr<base::DictionaryValue>,
|
||||
// base::Closure done_callback) {
|
||||
// BrowserThread::PostTaskAndReply(
|
||||
// BrowserThread::FILE,
|
||||
@ -43,8 +44,9 @@ class BackgroundTracingManager {
|
||||
// }
|
||||
//
|
||||
typedef base::Callback<void(const scoped_refptr<base::RefCountedString>&,
|
||||
scoped_ptr<const base::DictionaryValue>,
|
||||
base::Closure)> ReceiveCallback;
|
||||
std::unique_ptr<const base::DictionaryValue>,
|
||||
base::Closure)>
|
||||
ReceiveCallback;
|
||||
|
||||
// Set the triggering rules for when to start recording.
|
||||
//
|
||||
@ -65,9 +67,10 @@ class BackgroundTracingManager {
|
||||
NO_DATA_FILTERING,
|
||||
ANONYMIZE_DATA,
|
||||
};
|
||||
virtual bool SetActiveScenario(scoped_ptr<BackgroundTracingConfig> config,
|
||||
const ReceiveCallback& receive_callback,
|
||||
DataFiltering data_filtering) = 0;
|
||||
virtual bool SetActiveScenario(
|
||||
std::unique_ptr<BackgroundTracingConfig> config,
|
||||
const ReceiveCallback& receive_callback,
|
||||
DataFiltering data_filtering) = 0;
|
||||
|
||||
// Notifies the caller when the manager is idle (not recording or uploading),
|
||||
// so that a call to SetActiveScenario() is likely to succeed.
|
||||
|
@ -9,11 +9,11 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
#include "base/callback_forward.h"
|
||||
#include "base/containers/hash_tables.h"
|
||||
#include "base/memory/linked_ptr.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/scoped_vector.h"
|
||||
#include "base/supports_user_data.h"
|
||||
#include "content/common/content_export.h"
|
||||
@ -96,7 +96,7 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
|
||||
// ownership of the pointer.
|
||||
static void GarbageCollectStoragePartitions(
|
||||
BrowserContext* browser_context,
|
||||
scoped_ptr<base::hash_set<base::FilePath> > active_paths,
|
||||
std::unique_ptr<base::hash_set<base::FilePath>> active_paths,
|
||||
const base::Closure& done);
|
||||
|
||||
// DON'T USE THIS. GetDefaultStoragePartition() is going away.
|
||||
@ -104,7 +104,7 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
|
||||
static content::StoragePartition* GetDefaultStoragePartition(
|
||||
BrowserContext* browser_context);
|
||||
|
||||
typedef base::Callback<void(scoped_ptr<BlobHandle>)> BlobCallback;
|
||||
typedef base::Callback<void(std::unique_ptr<BlobHandle>)> BlobCallback;
|
||||
|
||||
// |callback| returns a nullptr scoped_ptr on failure.
|
||||
static void CreateMemoryBackedBlob(BrowserContext* browser_context,
|
||||
@ -157,7 +157,7 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
|
||||
|
||||
// Creates a delegate to initialize a HostZoomMap and persist its information.
|
||||
// This is called during creation of each StoragePartition.
|
||||
virtual scoped_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate(
|
||||
virtual std::unique_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate(
|
||||
const base::FilePath& partition_path) = 0;
|
||||
|
||||
// Returns the path of the directory where this context's data is stored.
|
||||
|
@ -285,7 +285,7 @@ class CONTENT_EXPORT BrowserThread {
|
||||
// ~Foo();
|
||||
//
|
||||
// Sample usage with scoped_ptr:
|
||||
// scoped_ptr<Foo, BrowserThread::DeleteOnIOThread> ptr;
|
||||
// std::unique_ptr<Foo, BrowserThread::DeleteOnIOThread> ptr;
|
||||
struct DeleteOnUIThread : public DeleteOnThread<UI> { };
|
||||
struct DeleteOnIOThread : public DeleteOnThread<IO> { };
|
||||
struct DeleteOnFileThread : public DeleteOnThread<FILE> { };
|
||||
|
@ -102,7 +102,7 @@ bool ContentBrowserClient::ShouldSwapBrowsingInstancesForNavigation(
|
||||
return false;
|
||||
}
|
||||
|
||||
scoped_ptr<media::CdmFactory> ContentBrowserClient::CreateCdmFactory() {
|
||||
std::unique_ptr<media::CdmFactory> ContentBrowserClient::CreateCdmFactory() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -220,17 +220,16 @@ QuotaPermissionContext* ContentBrowserClient::CreateQuotaPermissionContext() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
scoped_ptr<storage::QuotaEvictionPolicy>
|
||||
std::unique_ptr<storage::QuotaEvictionPolicy>
|
||||
ContentBrowserClient::GetTemporaryStorageEvictionPolicy(
|
||||
content::BrowserContext* context) {
|
||||
return scoped_ptr<storage::QuotaEvictionPolicy>();
|
||||
return std::unique_ptr<storage::QuotaEvictionPolicy>();
|
||||
}
|
||||
|
||||
void ContentBrowserClient::SelectClientCertificate(
|
||||
WebContents* web_contents,
|
||||
net::SSLCertRequestInfo* cert_request_info,
|
||||
scoped_ptr<ClientCertificateDelegate> delegate) {
|
||||
}
|
||||
std::unique_ptr<ClientCertificateDelegate> delegate) {}
|
||||
|
||||
net::URLRequestContext* ContentBrowserClient::OverrideRequestContextForURL(
|
||||
const GURL& url, ResourceContext* context) {
|
||||
|
@ -8,12 +8,12 @@
|
||||
#include <stddef.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback_forward.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/scoped_vector.h"
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
@ -452,7 +452,7 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
|
||||
// Gives the embedder a chance to register a custom QuotaEvictionPolicy for
|
||||
// temporary storage.
|
||||
virtual scoped_ptr<storage::QuotaEvictionPolicy>
|
||||
virtual std::unique_ptr<storage::QuotaEvictionPolicy>
|
||||
GetTemporaryStorageEvictionPolicy(BrowserContext* context);
|
||||
|
||||
// Informs the embedder that a certificate error has occured. If
|
||||
@ -479,7 +479,7 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
virtual void SelectClientCertificate(
|
||||
WebContents* web_contents,
|
||||
net::SSLCertRequestInfo* cert_request_info,
|
||||
scoped_ptr<ClientCertificateDelegate> delegate);
|
||||
std::unique_ptr<ClientCertificateDelegate> delegate);
|
||||
|
||||
// Adds a new installable certificate or private key.
|
||||
// Typically used to install an X.509 user certificate.
|
||||
@ -650,7 +650,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
RenderFrameHost* render_frame_host) {}
|
||||
|
||||
using StaticMojoApplicationMap =
|
||||
std::map<std::string, base::Callback<scoped_ptr<mojo::ShellClient>()>>;
|
||||
std::map<std::string,
|
||||
base::Callback<std::unique_ptr<mojo::ShellClient>()>>;
|
||||
|
||||
// Registers Mojo applications to be loaded in the browser process by the
|
||||
// browser's global Mojo shell.
|
||||
@ -706,7 +707,7 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
|
||||
// Creates and returns a factory used for creating CDM instances for playing
|
||||
// protected content.
|
||||
virtual scoped_ptr<media::CdmFactory> CreateCdmFactory();
|
||||
virtual std::unique_ptr<media::CdmFactory> CreateCdmFactory();
|
||||
|
||||
// Populates |mappings| with all files that need to be mapped before launching
|
||||
// a child process.
|
||||
|
@ -5,12 +5,12 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
|
||||
namespace base {
|
||||
@ -96,7 +96,7 @@ struct CONTENT_EXPORT CookieStoreConfig {
|
||||
std::vector<std::string> cookieable_schemes;
|
||||
};
|
||||
|
||||
CONTENT_EXPORT scoped_ptr<net::CookieStore> CreateCookieStore(
|
||||
CONTENT_EXPORT std::unique_ptr<net::CookieStore> CreateCookieStore(
|
||||
const CookieStoreConfig& config);
|
||||
|
||||
} // namespace content
|
||||
|
@ -5,12 +5,12 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "content/public/browser/devtools_agent_host_client.h"
|
||||
#include "url/gurl.h"
|
||||
@ -93,7 +93,7 @@ class CONTENT_EXPORT DevToolsAgentHost
|
||||
DevToolsExternalAgentProxyDelegate* delegate);
|
||||
|
||||
using CreateServerSocketCallback =
|
||||
base::Callback<scoped_ptr<net::ServerSocket>(std::string*)>;
|
||||
base::Callback<std::unique_ptr<net::ServerSocket>(std::string*)>;
|
||||
|
||||
// Creates DevToolsAgentHost for the browser, which works with browser-wide
|
||||
// debugging protocol.
|
||||
|
@ -110,8 +110,8 @@ class CONTENT_EXPORT DownloadManager : public base::SupportsUserData::Data {
|
||||
// Returns the id assigned to the download. If the DownloadCreateInfo
|
||||
// specifies an id, that id will be used.
|
||||
virtual void StartDownload(
|
||||
scoped_ptr<DownloadCreateInfo> info,
|
||||
scoped_ptr<ByteStreamReader> stream,
|
||||
std::unique_ptr<DownloadCreateInfo> info,
|
||||
std::unique_ptr<ByteStreamReader> stream,
|
||||
const DownloadUrlParameters::OnStartedCallback& on_started) = 0;
|
||||
|
||||
// Remove downloads whose URLs match the |url_filter| and are within
|
||||
@ -128,7 +128,8 @@ class CONTENT_EXPORT DownloadManager : public base::SupportsUserData::Data {
|
||||
virtual int RemoveAllDownloads() = 0;
|
||||
|
||||
// See DownloadUrlParameters for details about controlling the download.
|
||||
virtual void DownloadUrl(scoped_ptr<DownloadUrlParameters> parameters) = 0;
|
||||
virtual void DownloadUrl(
|
||||
std::unique_ptr<DownloadUrlParameters> parameters) = 0;
|
||||
|
||||
// Allow objects to observe the download creation process.
|
||||
virtual void AddObserver(Observer* observer) = 0;
|
||||
|
@ -7,10 +7,11 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/files/file.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "crypto/secure_hash.h"
|
||||
|
||||
@ -42,7 +43,7 @@ struct CONTENT_EXPORT DownloadSaveInfo {
|
||||
|
||||
// The state of the hash. If specified, this hash state must indicate the
|
||||
// state of the partial file for the first |offset| bytes.
|
||||
scoped_ptr<crypto::SecureHash> hash_state;
|
||||
std::unique_ptr<crypto::SecureHash> hash_state;
|
||||
|
||||
// SHA-256 hash of the first |offset| bytes of the file. Only used if |offset|
|
||||
// is non-zero and either |file_path| or |file| specifies the file which
|
||||
|
@ -37,10 +37,10 @@ DownloadUrlParameters::~DownloadUrlParameters() {
|
||||
}
|
||||
|
||||
// static
|
||||
scoped_ptr<DownloadUrlParameters> DownloadUrlParameters::FromWebContents(
|
||||
std::unique_ptr<DownloadUrlParameters> DownloadUrlParameters::FromWebContents(
|
||||
WebContents* web_contents,
|
||||
const GURL& url) {
|
||||
return scoped_ptr<DownloadUrlParameters>(new DownloadUrlParameters(
|
||||
return std::unique_ptr<DownloadUrlParameters>(new DownloadUrlParameters(
|
||||
url, web_contents->GetRenderProcessHost()->GetID(),
|
||||
web_contents->GetRenderViewHost()->GetRoutingID(),
|
||||
web_contents->GetMainFrame()->GetRoutingID(),
|
||||
|
@ -6,13 +6,14 @@
|
||||
#define CONTENT_PUBLIC_BROWSER_DOWNLOAD_URL_PARAMETERS_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/public/browser/download_interrupt_reasons.h"
|
||||
#include "content/public/browser/download_save_info.h"
|
||||
#include "content/public/common/referrer.h"
|
||||
@ -60,7 +61,7 @@ class CONTENT_EXPORT DownloadUrlParameters {
|
||||
|
||||
// Construct DownloadUrlParameters for downloading the resource at |url| and
|
||||
// associating the download with |web_contents|.
|
||||
static scoped_ptr<DownloadUrlParameters> FromWebContents(
|
||||
static std::unique_ptr<DownloadUrlParameters> FromWebContents(
|
||||
WebContents* web_contents,
|
||||
const GURL& url);
|
||||
|
||||
@ -169,7 +170,7 @@ class CONTENT_EXPORT DownloadUrlParameters {
|
||||
// of the first |offset| bytes of the target file. In this case, the prefix
|
||||
// hash will be ignored since the |hash_state| is assumed to be correct if
|
||||
// provided.
|
||||
void set_hash_state(scoped_ptr<crypto::SecureHash> hash_state) {
|
||||
void set_hash_state(std::unique_ptr<crypto::SecureHash> hash_state) {
|
||||
save_info_.hash_state = std::move(hash_state);
|
||||
}
|
||||
|
||||
@ -190,7 +191,7 @@ class CONTENT_EXPORT DownloadUrlParameters {
|
||||
// a blob by the time the download request starts, then the download will
|
||||
// fail.
|
||||
void set_blob_data_handle(
|
||||
scoped_ptr<storage::BlobDataHandle> blob_data_handle) {
|
||||
std::unique_ptr<storage::BlobDataHandle> blob_data_handle) {
|
||||
blob_data_handle_ = std::move(blob_data_handle);
|
||||
}
|
||||
|
||||
@ -226,7 +227,7 @@ class CONTENT_EXPORT DownloadUrlParameters {
|
||||
bool do_not_prompt_for_login() const { return do_not_prompt_for_login_; }
|
||||
|
||||
// STATE_CHANGING: Return the BlobDataHandle.
|
||||
scoped_ptr<storage::BlobDataHandle> GetBlobDataHandle() {
|
||||
std::unique_ptr<storage::BlobDataHandle> GetBlobDataHandle() {
|
||||
return std::move(blob_data_handle_);
|
||||
}
|
||||
|
||||
@ -253,7 +254,7 @@ class CONTENT_EXPORT DownloadUrlParameters {
|
||||
DownloadSaveInfo save_info_;
|
||||
GURL url_;
|
||||
bool do_not_prompt_for_login_;
|
||||
scoped_ptr<storage::BlobDataHandle> blob_data_handle_;
|
||||
std::unique_ptr<storage::BlobDataHandle> blob_data_handle_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(DownloadUrlParameters);
|
||||
};
|
||||
|
@ -5,8 +5,9 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_FONT_LIST_ASYNC_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_FONT_LIST_ASYNC_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/callback_forward.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
|
||||
namespace base {
|
||||
@ -23,7 +24,7 @@ namespace content {
|
||||
// any thread that has a BrowserThread::ID. The callback will be executed on
|
||||
// the calling thread.
|
||||
CONTENT_EXPORT void GetFontListAsync(
|
||||
const base::Callback<void(scoped_ptr<base::ListValue>)>& callback);
|
||||
const base::Callback<void(std::unique_ptr<base::ListValue>)>& callback);
|
||||
|
||||
} // namespace content
|
||||
|
||||
|
@ -5,8 +5,9 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_GEOLOCATION_PROVIDER_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_GEOLOCATION_PROVIDER_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/callback_list.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
|
||||
namespace content {
|
||||
@ -34,7 +35,7 @@ class GeolocationProvider {
|
||||
// |enable_high_accuracy| is used as a 'hint' for the provider preferences for
|
||||
// this particular observer, however the observer could receive updates for
|
||||
// best available locations from any active provider whilst it is registered.
|
||||
virtual scoped_ptr<Subscription> AddLocationUpdateCallback(
|
||||
virtual std::unique_ptr<Subscription> AddLocationUpdateCallback(
|
||||
const LocationUpdateCallback& callback,
|
||||
bool enable_high_accuracy) = 0;
|
||||
|
||||
|
@ -6,12 +6,12 @@
|
||||
#define CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/callback_list.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
@ -171,7 +171,7 @@ class HostZoomMap {
|
||||
typedef base::CallbackList<void(const ZoomLevelChange&)>::Subscription
|
||||
Subscription;
|
||||
// Add and remove zoom level changed callbacks.
|
||||
virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback(
|
||||
virtual std::unique_ptr<Subscription> AddZoomLevelChangedCallback(
|
||||
const ZoomLevelChangedCallback& callback) = 0;
|
||||
|
||||
protected:
|
||||
|
@ -5,9 +5,9 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_MOJO_APP_CONNECTION_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_MOJO_APP_CONNECTION_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "mojo/public/cpp/bindings/interface_ptr.h"
|
||||
#include "mojo/public/cpp/bindings/interface_request.h"
|
||||
@ -31,7 +31,7 @@ class CONTENT_EXPORT MojoAppConnection {
|
||||
// |requestor_name| to identify the requestor and |context|'s mojo userid to
|
||||
// specify a profile specific application instantiation. This may be called
|
||||
// from any thread.
|
||||
static scoped_ptr<MojoAppConnection> Create(
|
||||
static std::unique_ptr<MojoAppConnection> Create(
|
||||
const std::string& user_id,
|
||||
const std::string& name,
|
||||
const std::string& requestor_name);
|
||||
|
@ -7,10 +7,10 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/memory/ref_counted_memory.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "base/time/time.h"
|
||||
#include "build/build_config.h"
|
||||
@ -35,7 +35,7 @@ class NavigationEntry {
|
||||
public:
|
||||
virtual ~NavigationEntry() {}
|
||||
|
||||
CONTENT_EXPORT static scoped_ptr<NavigationEntry> Create();
|
||||
CONTENT_EXPORT static std::unique_ptr<NavigationEntry> Create();
|
||||
|
||||
// Page-related stuff --------------------------------------------------------
|
||||
|
||||
|
@ -21,16 +21,18 @@ WebContents* NavigationHandle::GetWebContents() {
|
||||
}
|
||||
|
||||
// static
|
||||
scoped_ptr<NavigationHandle> NavigationHandle::CreateNavigationHandleForTesting(
|
||||
std::unique_ptr<NavigationHandle>
|
||||
NavigationHandle::CreateNavigationHandleForTesting(
|
||||
const GURL& url,
|
||||
RenderFrameHost* render_frame_host) {
|
||||
scoped_ptr<NavigationHandleImpl> handle_impl = NavigationHandleImpl::Create(
|
||||
url,
|
||||
static_cast<RenderFrameHostImpl*>(render_frame_host)->frame_tree_node(),
|
||||
false, // is_synchronous
|
||||
false, // is_srcdoc
|
||||
base::TimeTicks::Now(), 0);
|
||||
return scoped_ptr<NavigationHandle>(std::move(handle_impl));
|
||||
std::unique_ptr<NavigationHandleImpl> handle_impl =
|
||||
NavigationHandleImpl::Create(
|
||||
url, static_cast<RenderFrameHostImpl*>(render_frame_host)
|
||||
->frame_tree_node(),
|
||||
false, // is_synchronous
|
||||
false, // is_srcdoc
|
||||
base::TimeTicks::Now(), 0);
|
||||
return std::unique_ptr<NavigationHandle>(std::move(handle_impl));
|
||||
}
|
||||
|
||||
} // namespace content
|
||||
|
@ -5,7 +5,8 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include <memory>
|
||||
|
||||
#include "content/common/content_export.h"
|
||||
#include "content/public/browser/navigation_throttle.h"
|
||||
#include "content/public/common/referrer.h"
|
||||
@ -139,7 +140,7 @@ class CONTENT_EXPORT NavigationHandle {
|
||||
//
|
||||
// The following methods should be used exclusively for writing unit tests.
|
||||
|
||||
static scoped_ptr<NavigationHandle> CreateNavigationHandleForTesting(
|
||||
static std::unique_ptr<NavigationHandle> CreateNavigationHandleForTesting(
|
||||
const GURL& url,
|
||||
RenderFrameHost* render_frame_host);
|
||||
|
||||
@ -151,7 +152,7 @@ class CONTENT_EXPORT NavigationHandle {
|
||||
// ContentBrowserClient::CreateThrottlesForNavigation. This ensures proper
|
||||
// ordering of the throttles.
|
||||
virtual void RegisterThrottleForTesting(
|
||||
scoped_ptr<NavigationThrottle> navigation_throttle) = 0;
|
||||
std::unique_ptr<NavigationThrottle> navigation_throttle) = 0;
|
||||
|
||||
// Simulates the network request starting.
|
||||
virtual NavigationThrottle::ThrottleCheckResult
|
||||
|
@ -6,12 +6,13 @@
|
||||
#define CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback_forward.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "third_party/WebKit/public/platform/modules/notifications/WebNotificationPermission.h"
|
||||
|
||||
@ -57,7 +58,7 @@ class CONTENT_EXPORT PlatformNotificationService {
|
||||
const GURL& origin,
|
||||
const PlatformNotificationData& notification_data,
|
||||
const NotificationResources& notification_resources,
|
||||
scoped_ptr<DesktopNotificationDelegate> delegate,
|
||||
std::unique_ptr<DesktopNotificationDelegate> delegate,
|
||||
base::Closure* cancel_callback) = 0;
|
||||
|
||||
// Displays the persistent notification described in |notification_data| to
|
||||
|
@ -5,9 +5,9 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_POWER_SAVE_BLOCKER_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_POWER_SAVE_BLOCKER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
|
||||
namespace content {
|
||||
@ -48,9 +48,10 @@ class CONTENT_EXPORT PowerSaveBlocker {
|
||||
// |reason| and |description| (a more-verbose, human-readable justification of
|
||||
// the blocking) may be provided to the underlying system APIs on some
|
||||
// platforms.
|
||||
static scoped_ptr<PowerSaveBlocker> Create(PowerSaveBlockerType type,
|
||||
Reason reason,
|
||||
const std::string& description);
|
||||
static std::unique_ptr<PowerSaveBlocker> Create(
|
||||
PowerSaveBlockerType type,
|
||||
Reason reason,
|
||||
const std::string& description);
|
||||
};
|
||||
|
||||
} // namespace content
|
||||
|
@ -5,11 +5,11 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/scoped_vector.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "content/public/browser/presentation_session.h"
|
||||
@ -186,7 +186,7 @@ class CONTENT_EXPORT PresentationServiceDelegate {
|
||||
virtual void SendMessage(int render_process_id,
|
||||
int render_frame_id,
|
||||
const content::PresentationSessionInfo& session,
|
||||
scoped_ptr<PresentationSessionMessage> message,
|
||||
std::unique_ptr<PresentationSessionMessage> message,
|
||||
const SendMessageCallback& send_message_cb) = 0;
|
||||
|
||||
// Continuously listen for state changes for a PresentationConnection in a
|
||||
|
@ -7,10 +7,10 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
|
||||
namespace content {
|
||||
@ -32,7 +32,7 @@ struct CONTENT_EXPORT PresentationSessionMessage {
|
||||
bool is_binary() const;
|
||||
const PresentationMessageType type;
|
||||
std::string message;
|
||||
scoped_ptr<std::vector<uint8_t>> data;
|
||||
std::unique_ptr<std::vector<uint8_t>> data;
|
||||
};
|
||||
|
||||
} // namespace content
|
||||
|
@ -229,10 +229,11 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::Sender,
|
||||
base::Callback<void(const std::string&)> callback) = 0;
|
||||
virtual void ClearWebRtcLogMessageCallback() = 0;
|
||||
|
||||
typedef base::Callback<void(scoped_ptr<uint8_t[]> packet_header,
|
||||
typedef base::Callback<void(std::unique_ptr<uint8_t[]> packet_header,
|
||||
size_t header_length,
|
||||
size_t packet_length,
|
||||
bool incoming)> WebRtcRtpPacketCallback;
|
||||
bool incoming)>
|
||||
WebRtcRtpPacketCallback;
|
||||
|
||||
typedef base::Callback<void(bool incoming, bool outgoing)>
|
||||
WebRtcStopRtpDumpCallback;
|
||||
@ -261,7 +262,7 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::Sender,
|
||||
// between the Renderer and the Browser, the allocator is created when the
|
||||
// process is created and later retrieved by the SubprocessMetricsProvider
|
||||
// for management.
|
||||
virtual scoped_ptr<base::SharedPersistentMemoryAllocator>
|
||||
virtual std::unique_ptr<base::SharedPersistentMemoryAllocator>
|
||||
TakeMetricsAllocator() = 0;
|
||||
|
||||
// PlzNavigate
|
||||
|
@ -109,7 +109,7 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Sender {
|
||||
|
||||
// Returns an iterator to iterate over the global list of active render widget
|
||||
// hosts.
|
||||
static scoped_ptr<RenderWidgetHostIterator> GetRenderWidgetHosts();
|
||||
static std::unique_ptr<RenderWidgetHostIterator> GetRenderWidgetHosts();
|
||||
|
||||
~RenderWidgetHost() override {}
|
||||
|
||||
|
@ -5,7 +5,8 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include <memory>
|
||||
|
||||
#include "base/strings/string16.h"
|
||||
#include "build/build_config.h"
|
||||
#include "content/common/content_export.h"
|
||||
@ -153,7 +154,7 @@ class CONTENT_EXPORT RenderWidgetHostView {
|
||||
// |subscriber| is now owned by this object, it will be called only on the
|
||||
// UI thread.
|
||||
virtual void BeginFrameSubscription(
|
||||
scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) = 0;
|
||||
std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) = 0;
|
||||
|
||||
// End subscribing for frame presentation events. FrameSubscriber will be
|
||||
// deleted after this call.
|
||||
|
@ -7,10 +7,10 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/supports_user_data.h"
|
||||
#include "build/build_config.h"
|
||||
#include "content/common/content_export.h"
|
||||
@ -43,7 +43,7 @@ class CONTENT_EXPORT ResourceContext : public base::SupportsUserData {
|
||||
virtual net::URLRequestContext* GetRequestContext() = 0;
|
||||
|
||||
// Get platform ClientCertStore. May return nullptr.
|
||||
virtual scoped_ptr<net::ClientCertStore> CreateClientCertStore();
|
||||
virtual std::unique_ptr<net::ClientCertStore> CreateClientCertStore();
|
||||
|
||||
// Create a platform KeygenHandler and pass it to |callback|. The |callback|
|
||||
// may be run synchronously.
|
||||
@ -51,7 +51,8 @@ class CONTENT_EXPORT ResourceContext : public base::SupportsUserData {
|
||||
uint32_t key_size_in_bits,
|
||||
const std::string& challenge_string,
|
||||
const GURL& url,
|
||||
const base::Callback<void(scoped_ptr<net::KeygenHandler>)>& callback);
|
||||
const base::Callback<void(std::unique_ptr<net::KeygenHandler>)>&
|
||||
callback);
|
||||
|
||||
// Returns a callback that can be invoked to get a random salt
|
||||
// string that is used for creating media device IDs. The salt
|
||||
|
@ -7,8 +7,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/callback_forward.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
|
||||
namespace net {
|
||||
|
@ -70,8 +70,7 @@ bool ResourceDispatcherHostDelegate::ShouldInterceptResourceAsStream(
|
||||
|
||||
void ResourceDispatcherHostDelegate::OnStreamCreated(
|
||||
net::URLRequest* request,
|
||||
scoped_ptr<content::StreamInfo> stream) {
|
||||
}
|
||||
std::unique_ptr<content::StreamInfo> stream) {}
|
||||
|
||||
void ResourceDispatcherHostDelegate::OnResponseStarted(
|
||||
net::URLRequest* request,
|
||||
|
@ -5,10 +5,10 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "content/public/browser/resource_request_info.h"
|
||||
#include "content/public/common/resource_type.h"
|
||||
@ -108,7 +108,7 @@ class CONTENT_EXPORT ResourceDispatcherHostDelegate {
|
||||
// Informs the delegate that a Stream was created. The Stream can be read from
|
||||
// the blob URL of the Stream, but can only be read once.
|
||||
virtual void OnStreamCreated(net::URLRequest* request,
|
||||
scoped_ptr<content::StreamInfo> stream);
|
||||
std::unique_ptr<content::StreamInfo> stream);
|
||||
|
||||
// Informs the delegate that a response has started.
|
||||
virtual void OnResponseStarted(net::URLRequest* request,
|
||||
|
@ -5,8 +5,9 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_PROVIDER_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_PROVIDER_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "content/public/browser/web_contents_observer.h"
|
||||
#include "third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationLockType.h"
|
||||
@ -71,7 +72,7 @@ class CONTENT_EXPORT ScreenOrientationProvider : public WebContentsObserver {
|
||||
|
||||
// Locks that require orientation changes are not completed until
|
||||
// OnOrientationChange.
|
||||
scoped_ptr<LockInformation> pending_lock_;
|
||||
std::unique_ptr<LockInformation> pending_lock_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProvider);
|
||||
};
|
||||
|
@ -5,8 +5,9 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/threading/non_thread_safe.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "net/cert/x509_certificate.h"
|
||||
|
@ -5,9 +5,10 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_STREAM_INFO_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_STREAM_INFO_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
@ -28,7 +29,7 @@ struct CONTENT_EXPORT StreamInfo {
|
||||
~StreamInfo();
|
||||
|
||||
// The handle to the stream itself.
|
||||
scoped_ptr<StreamHandle> handle;
|
||||
std::unique_ptr<StreamHandle> handle;
|
||||
|
||||
// The original URL being redirected to this stream.
|
||||
GURL original_url;
|
||||
|
@ -7,8 +7,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/values.h"
|
||||
|
||||
namespace content {
|
||||
@ -32,7 +33,7 @@ class TraceUploader {
|
||||
// Compresses and uploads the given file contents.
|
||||
virtual void DoUpload(const std::string& file_contents,
|
||||
UploadMode upload_mode,
|
||||
scoped_ptr<const base::DictionaryValue> metadata,
|
||||
std::unique_ptr<const base::DictionaryValue> metadata,
|
||||
const UploadProgressCallback& progress_callback,
|
||||
const UploadDoneCallback& done_callback) = 0;
|
||||
};
|
||||
|
@ -52,7 +52,8 @@ class TracingController {
|
||||
// StopTracing is called, which may override metadata that you would
|
||||
// set beforehand in case of key collision.
|
||||
virtual void AddMetadata(const base::DictionaryValue& data);
|
||||
virtual scoped_ptr<const base::DictionaryValue> GetMetadataCopy() const;
|
||||
virtual std::unique_ptr<const base::DictionaryValue> GetMetadataCopy()
|
||||
const;
|
||||
virtual void SetMetadataFilterPredicate(
|
||||
const MetadataFilterPredicate& metadata_filter_predicate);
|
||||
virtual void Close() {}
|
||||
@ -82,8 +83,8 @@ class TracingController {
|
||||
public:
|
||||
virtual void ReceiveTraceChunk(const std::string& chunk) {}
|
||||
virtual void ReceiveTraceFinalContents(
|
||||
scoped_ptr<const base::DictionaryValue> metadata,
|
||||
const std::string& contents) {}
|
||||
std::unique_ptr<const base::DictionaryValue> metadata,
|
||||
const std::string& contents) {}
|
||||
|
||||
protected:
|
||||
friend class base::RefCountedThreadSafe<TraceDataEndpoint>;
|
||||
@ -93,7 +94,7 @@ class TracingController {
|
||||
// Create a trace sink that may be supplied to StopTracing
|
||||
// to capture the trace data as a string.
|
||||
CONTENT_EXPORT static scoped_refptr<TraceDataSink> CreateStringSink(
|
||||
const base::Callback<void(scoped_ptr<const base::DictionaryValue>,
|
||||
const base::Callback<void(std::unique_ptr<const base::DictionaryValue>,
|
||||
base::RefCountedString*)>& callback);
|
||||
|
||||
CONTENT_EXPORT static scoped_refptr<TraceDataSink> CreateCompressedStringSink(
|
||||
@ -108,7 +109,7 @@ class TracingController {
|
||||
// Create an endpoint that may be supplied to any TraceDataSink to
|
||||
// dump the trace data to a callback.
|
||||
CONTENT_EXPORT static scoped_refptr<TraceDataEndpoint> CreateCallbackEndpoint(
|
||||
const base::Callback<void(scoped_ptr<const base::DictionaryValue>,
|
||||
const base::Callback<void(std::unique_ptr<const base::DictionaryValue>,
|
||||
base::RefCountedString*)>& callback);
|
||||
|
||||
// Create an endpoint that may be supplied to any TraceDataSink to
|
||||
|
@ -5,10 +5,10 @@
|
||||
#ifndef CONTENT_PUBLIC_BROWSER_TRACING_DELEGATE_H_
|
||||
#define CONTENT_PUBLIC_BROWSER_TRACING_DELEGATE_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
|
||||
namespace base {
|
||||
@ -34,7 +34,7 @@ class CONTENT_EXPORT TracingDelegate {
|
||||
virtual ~TracingDelegate() {}
|
||||
|
||||
// Provide trace uploading functionality; see trace_uploader.h.
|
||||
virtual scoped_ptr<TraceUploader> GetTraceUploader(
|
||||
virtual std::unique_ptr<TraceUploader> GetTraceUploader(
|
||||
net::URLRequestContextGetter* request_context) = 0;
|
||||
|
||||
// This can be used to veto a particular background tracing scenario.
|
||||
|
@ -67,7 +67,7 @@ struct RendererPreferences;
|
||||
// (usually HTML) in a rectangular area.
|
||||
//
|
||||
// Instantiating one is simple:
|
||||
// scoped_ptr<content::WebContents> web_contents(
|
||||
// std::unique_ptr<content::WebContents> web_contents(
|
||||
// content::WebContents::Create(
|
||||
// content::WebContents::CreateParams(browser_context)));
|
||||
// gfx::NativeView view = web_contents->GetNativeView();
|
||||
@ -76,7 +76,8 @@ struct RendererPreferences;
|
||||
//
|
||||
// That's it; go to your kitchen, grab a scone, and chill. WebContents will do
|
||||
// all the multi-process stuff behind the scenes. More details are at
|
||||
// http://www.chromium.org/developers/design-documents/multi-process-architecture .
|
||||
// http://www.chromium.org/developers/design-documents/multi-process-architecture
|
||||
// .
|
||||
//
|
||||
// Each WebContents has exactly one NavigationController; each
|
||||
// NavigationController belongs to one WebContents. The NavigationController can
|
||||
|
@ -153,7 +153,7 @@ JavaScriptDialogManager* WebContentsDelegate::GetJavaScriptDialogManager(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
scoped_ptr<BluetoothChooser> WebContentsDelegate::RunBluetoothChooser(
|
||||
std::unique_ptr<BluetoothChooser> WebContentsDelegate::RunBluetoothChooser(
|
||||
RenderFrameHost* frame,
|
||||
const BluetoothChooser::EventHandler& event_handler) {
|
||||
return nullptr;
|
||||
@ -186,9 +186,8 @@ void WebContentsDelegate::RequestMediaAccessPermission(
|
||||
const MediaResponseCallback& callback) {
|
||||
LOG(ERROR) << "WebContentsDelegate::RequestMediaAccessPermission: "
|
||||
<< "Not supported.";
|
||||
callback.Run(MediaStreamDevices(),
|
||||
MEDIA_DEVICE_NOT_SUPPORTED,
|
||||
scoped_ptr<MediaStreamUI>());
|
||||
callback.Run(MediaStreamDevices(), MEDIA_DEVICE_NOT_SUPPORTED,
|
||||
std::unique_ptr<MediaStreamUI>());
|
||||
}
|
||||
|
||||
bool WebContentsDelegate::CheckMediaAccessPermission(
|
||||
|
@ -357,7 +357,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
|
||||
// Shows a chooser for the user to select a nearby Bluetooth device. The
|
||||
// observer must live at least as long as the returned chooser object.
|
||||
virtual scoped_ptr<BluetoothChooser> RunBluetoothChooser(
|
||||
virtual std::unique_ptr<BluetoothChooser> RunBluetoothChooser(
|
||||
RenderFrameHost* frame,
|
||||
const BluetoothChooser::EventHandler& event_handler);
|
||||
|
||||
|
@ -7,9 +7,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
|
||||
class GURL;
|
||||
@ -82,7 +82,7 @@ class CONTENT_EXPORT RequestPeer {
|
||||
|
||||
// Called when a chunk of response data is available. This method may
|
||||
// be called multiple times or not at all if an error occurs.
|
||||
virtual void OnReceivedData(scoped_ptr<ReceivedData> data) = 0;
|
||||
virtual void OnReceivedData(std::unique_ptr<ReceivedData> data) = 0;
|
||||
|
||||
// Called when metadata generated by the renderer is retrieved from the
|
||||
// cache. This method may be called zero or one times.
|
||||
|
@ -24,13 +24,13 @@ class CONTENT_EXPORT ResourceDispatcherDelegate {
|
||||
public:
|
||||
virtual ~ResourceDispatcherDelegate() {}
|
||||
|
||||
virtual scoped_ptr<RequestPeer> OnRequestComplete(
|
||||
scoped_ptr<RequestPeer> current_peer,
|
||||
virtual std::unique_ptr<RequestPeer> OnRequestComplete(
|
||||
std::unique_ptr<RequestPeer> current_peer,
|
||||
ResourceType resource_type,
|
||||
int error_code) = 0;
|
||||
|
||||
virtual scoped_ptr<RequestPeer> OnReceivedResponse(
|
||||
scoped_ptr<RequestPeer> current_peer,
|
||||
virtual std::unique_ptr<RequestPeer> OnReceivedResponse(
|
||||
std::unique_ptr<RequestPeer> current_peer,
|
||||
const std::string& mime_type,
|
||||
const GURL& url) = 0;
|
||||
};
|
||||
|
@ -8,11 +8,11 @@
|
||||
#include <stddef.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback_forward.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "media/audio/audio_parameters.h"
|
||||
#include "ui/gfx/native_widget_types.h"
|
||||
@ -264,10 +264,10 @@ class MediaStreamUI {
|
||||
};
|
||||
|
||||
// Callback used return results of media access requests.
|
||||
typedef base::Callback<void(
|
||||
const MediaStreamDevices& devices,
|
||||
content::MediaStreamRequestResult result,
|
||||
scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback;
|
||||
typedef base::Callback<void(const MediaStreamDevices& devices,
|
||||
content::MediaStreamRequestResult result,
|
||||
std::unique_ptr<MediaStreamUI> ui)>
|
||||
MediaResponseCallback;
|
||||
|
||||
} // namespace content
|
||||
|
||||
|
@ -15,7 +15,7 @@ MessagePortMessage::MessagePortMessage(const base::string16& message)
|
||||
: message_as_string(message) {
|
||||
}
|
||||
|
||||
MessagePortMessage::MessagePortMessage(scoped_ptr<base::Value> message) {
|
||||
MessagePortMessage::MessagePortMessage(std::unique_ptr<base::Value> message) {
|
||||
message_as_value.Append(message.release());
|
||||
}
|
||||
|
||||
|
@ -5,9 +5,9 @@
|
||||
#ifndef CONTENT_PUBLIC_COMMON_MESSAGE_PORT_TYPES_H_
|
||||
#define CONTENT_PUBLIC_COMMON_MESSAGE_PORT_TYPES_H_
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "base/values.h"
|
||||
#include "content/common/content_export.h"
|
||||
@ -21,7 +21,7 @@ namespace content {
|
||||
struct CONTENT_EXPORT MessagePortMessage {
|
||||
MessagePortMessage();
|
||||
explicit MessagePortMessage(const base::string16& message);
|
||||
explicit MessagePortMessage(scoped_ptr<base::Value> message);
|
||||
explicit MessagePortMessage(std::unique_ptr<base::Value> message);
|
||||
MessagePortMessage(const MessagePortMessage& other);
|
||||
MessagePortMessage& operator=(const MessagePortMessage& other);
|
||||
~MessagePortMessage();
|
||||
|
@ -5,8 +5,9 @@
|
||||
#ifndef CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_
|
||||
#define CONTENT_PUBLIC_COMMON_SANDBOX_INIT_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/files/scoped_file.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/shared_memory.h"
|
||||
#include "base/process/launch.h"
|
||||
#include "base/process/process.h"
|
||||
@ -97,12 +98,12 @@ class SandboxInitializerDelegate;
|
||||
// /proc, |proc_fd| must be a valid file descriptor to /proc/.
|
||||
// Returns true if the sandbox has been properly engaged.
|
||||
CONTENT_EXPORT bool InitializeSandbox(
|
||||
scoped_ptr<sandbox::bpf_dsl::Policy> policy,
|
||||
std::unique_ptr<sandbox::bpf_dsl::Policy> policy,
|
||||
base::ScopedFD proc_fd);
|
||||
|
||||
// Return a "baseline" policy. This is used by a SandboxInitializerDelegate to
|
||||
// implement a policy that is derived from the baseline.
|
||||
CONTENT_EXPORT scoped_ptr<sandbox::bpf_dsl::Policy>
|
||||
CONTENT_EXPORT std::unique_ptr<sandbox::bpf_dsl::Policy>
|
||||
GetBPFSandboxBaselinePolicy();
|
||||
#endif // defined(OS_LINUX) || defined(OS_NACL_NONSFI)
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "content/public/gpu/gpu_video_decode_accelerator_factory.h"
|
||||
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h"
|
||||
#include "content/gpu/gpu_child_thread.h"
|
||||
|
||||
@ -12,7 +13,7 @@ namespace content {
|
||||
GpuVideoDecodeAcceleratorFactory::~GpuVideoDecodeAcceleratorFactory() {}
|
||||
|
||||
// static
|
||||
scoped_ptr<GpuVideoDecodeAcceleratorFactory>
|
||||
std::unique_ptr<GpuVideoDecodeAcceleratorFactory>
|
||||
GpuVideoDecodeAcceleratorFactory::Create(
|
||||
const GetGLContextCallback& get_gl_context_cb,
|
||||
const MakeGLContextCurrentCallback& make_context_current_cb,
|
||||
@ -22,12 +23,12 @@ GpuVideoDecodeAcceleratorFactory::Create(
|
||||
if (!gvdafactory_impl)
|
||||
return nullptr;
|
||||
|
||||
return make_scoped_ptr(
|
||||
return base::WrapUnique(
|
||||
new GpuVideoDecodeAcceleratorFactory(std::move(gvdafactory_impl)));
|
||||
}
|
||||
|
||||
// static
|
||||
scoped_ptr<GpuVideoDecodeAcceleratorFactory>
|
||||
std::unique_ptr<GpuVideoDecodeAcceleratorFactory>
|
||||
GpuVideoDecodeAcceleratorFactory::CreateWithGLES2Decoder(
|
||||
const GetGLContextCallback& get_gl_context_cb,
|
||||
const MakeGLContextCurrentCallback& make_context_current_cb,
|
||||
@ -40,7 +41,7 @@ GpuVideoDecodeAcceleratorFactory::CreateWithGLES2Decoder(
|
||||
if (!gvdafactory_impl)
|
||||
return nullptr;
|
||||
|
||||
return make_scoped_ptr(
|
||||
return base::WrapUnique(
|
||||
new GpuVideoDecodeAcceleratorFactory(std::move(gvdafactory_impl)));
|
||||
}
|
||||
|
||||
@ -53,7 +54,7 @@ GpuVideoDecodeAcceleratorFactory::GetDecoderCapabilities() {
|
||||
gpu_preferences);
|
||||
}
|
||||
|
||||
scoped_ptr<media::VideoDecodeAccelerator>
|
||||
std::unique_ptr<media::VideoDecodeAccelerator>
|
||||
GpuVideoDecodeAcceleratorFactory::CreateVDA(
|
||||
media::VideoDecodeAccelerator::Client* client,
|
||||
const media::VideoDecodeAccelerator::Config& config) {
|
||||
@ -66,7 +67,7 @@ GpuVideoDecodeAcceleratorFactory::CreateVDA(
|
||||
}
|
||||
|
||||
GpuVideoDecodeAcceleratorFactory::GpuVideoDecodeAcceleratorFactory(
|
||||
scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl)
|
||||
std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl)
|
||||
: gvdafactory_impl_(std::move(gvdafactory_impl)) {}
|
||||
|
||||
} // namespace content
|
||||
|
@ -58,12 +58,13 @@ class CONTENT_EXPORT GpuVideoDecodeAcceleratorFactory {
|
||||
base::Callback<base::WeakPtr<gpu::gles2::GLES2Decoder>(void)>;
|
||||
|
||||
// Create a factory capable of producing VDA instances for current platform.
|
||||
static scoped_ptr<GpuVideoDecodeAcceleratorFactory> Create(
|
||||
static std::unique_ptr<GpuVideoDecodeAcceleratorFactory> Create(
|
||||
const GetGLContextCallback& get_gl_context_cb,
|
||||
const MakeGLContextCurrentCallback& make_context_current_cb,
|
||||
const BindGLImageCallback& bind_image_cb);
|
||||
|
||||
static scoped_ptr<GpuVideoDecodeAcceleratorFactory> CreateWithGLES2Decoder(
|
||||
static std::unique_ptr<GpuVideoDecodeAcceleratorFactory>
|
||||
CreateWithGLES2Decoder(
|
||||
const GetGLContextCallback& get_gl_context_cb,
|
||||
const MakeGLContextCurrentCallback& make_context_current_cb,
|
||||
const BindGLImageCallback& bind_image_cb,
|
||||
@ -74,7 +75,7 @@ class CONTENT_EXPORT GpuVideoDecodeAcceleratorFactory {
|
||||
|
||||
// Create a VDA for the current platform for |client| with the given |config|
|
||||
// and for given |gpu_preferences|. Return nullptr on failure.
|
||||
virtual scoped_ptr<media::VideoDecodeAccelerator> CreateVDA(
|
||||
virtual std::unique_ptr<media::VideoDecodeAccelerator> CreateVDA(
|
||||
media::VideoDecodeAccelerator::Client* client,
|
||||
const media::VideoDecodeAccelerator::Config& config);
|
||||
|
||||
@ -83,9 +84,9 @@ class CONTENT_EXPORT GpuVideoDecodeAcceleratorFactory {
|
||||
// GpuVideoDecodeAcceleratorFactoryImpl implements
|
||||
// GpuVideoDecodeAcceleratorFactory, see crbug.com/597150 and related.
|
||||
GpuVideoDecodeAcceleratorFactory(
|
||||
scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl);
|
||||
std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl);
|
||||
|
||||
scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl_;
|
||||
std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl_;
|
||||
};
|
||||
|
||||
} // namespace content
|
||||
|
@ -167,7 +167,7 @@ void ContentRendererClient::AddKeySystems(
|
||||
std::vector<media::KeySystemInfo>* key_systems) {
|
||||
}
|
||||
|
||||
scoped_ptr<media::RendererFactory>
|
||||
std::unique_ptr<media::RendererFactory>
|
||||
ContentRendererClient::CreateMediaRendererFactory(
|
||||
RenderFrame* render_frame,
|
||||
media::GpuVideoAcceleratorFactories* gpu_factories,
|
||||
@ -175,7 +175,7 @@ ContentRendererClient::CreateMediaRendererFactory(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
scoped_ptr<MediaStreamRendererFactory>
|
||||
std::unique_ptr<MediaStreamRendererFactory>
|
||||
ContentRendererClient::CreateMediaStreamRendererFactory() {
|
||||
return nullptr;
|
||||
}
|
||||
@ -220,7 +220,7 @@ BrowserPluginDelegate* ContentRendererClient::CreateBrowserPluginDelegate(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
scoped_ptr<blink::WebAppBannerClient>
|
||||
std::unique_ptr<blink::WebAppBannerClient>
|
||||
ContentRendererClient::CreateAppBannerClient(RenderFrame* render_frame) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -8,12 +8,12 @@
|
||||
#include <stddef.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "build/build_config.h"
|
||||
#include "content/public/common/content_client.h"
|
||||
@ -257,13 +257,13 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
virtual bool AllowPepperMediaStreamAPI(const GURL& url);
|
||||
|
||||
// Allows an embedder to provide a media::RendererFactory.
|
||||
virtual scoped_ptr<media::RendererFactory> CreateMediaRendererFactory(
|
||||
virtual std::unique_ptr<media::RendererFactory> CreateMediaRendererFactory(
|
||||
RenderFrame* render_frame,
|
||||
media::GpuVideoAcceleratorFactories* gpu_factories,
|
||||
const scoped_refptr<media::MediaLog>& media_log);
|
||||
|
||||
// Allows an embedder to provide a MediaStreamRendererFactory.
|
||||
virtual scoped_ptr<MediaStreamRendererFactory>
|
||||
virtual std::unique_ptr<MediaStreamRendererFactory>
|
||||
CreateMediaStreamRendererFactory();
|
||||
|
||||
// Allows an embedder to provde a cc::ImageSerializationProcessor.
|
||||
@ -309,7 +309,7 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
virtual void RecordRapporURL(const std::string& metric, const GURL& url) {}
|
||||
|
||||
// Allows an embedder to provide a blink::WebAppBannerClient.
|
||||
virtual scoped_ptr<blink::WebAppBannerClient> CreateAppBannerClient(
|
||||
virtual std::unique_ptr<blink::WebAppBannerClient> CreateAppBannerClient(
|
||||
RenderFrame* render_frame);
|
||||
|
||||
// Gives the embedder a chance to add properties to the context menu.
|
||||
|
@ -5,10 +5,10 @@
|
||||
#ifndef CONTENT_PUBLIC_RENDERER_DOCUMENT_STATE_H_
|
||||
#define CONTENT_PUBLIC_RENDERER_DOCUMENT_STATE_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/supports_user_data.h"
|
||||
#include "base/time/time.h"
|
||||
#include "content/common/content_export.h"
|
||||
@ -239,7 +239,7 @@ class CONTENT_EXPORT DocumentState
|
||||
|
||||
LoadType load_type_;
|
||||
|
||||
scoped_ptr<NavigationState> navigation_state_;
|
||||
std::unique_ptr<NavigationState> navigation_state_;
|
||||
|
||||
bool can_load_local_resources_;
|
||||
};
|
||||
|
@ -4,11 +4,11 @@
|
||||
|
||||
#include "content/public/renderer/media_stream_utils.h"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/guid.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/rand_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "content/renderer/media/media_stream_audio_source.h"
|
||||
@ -25,7 +25,7 @@
|
||||
namespace content {
|
||||
|
||||
bool AddVideoTrackToMediaStream(
|
||||
scoped_ptr<media::VideoCapturerSource> video_source,
|
||||
std::unique_ptr<media::VideoCapturerSource> video_source,
|
||||
bool is_remote,
|
||||
bool is_readonly,
|
||||
blink::WebMediaStream* web_media_stream) {
|
||||
@ -94,7 +94,7 @@ bool AddAudioTrackToMediaStream(
|
||||
// TODO(miu): In an upcoming change, a source purposed for passing audio
|
||||
// directly (i.e., without modification) will replace this "hacky" use of
|
||||
// WebRtcAudioCapturer. http://crbug.com/577881
|
||||
scoped_ptr<WebRtcAudioCapturer> capturer(
|
||||
std::unique_ptr<WebRtcAudioCapturer> capturer(
|
||||
WebRtcAudioCapturer::CreateCapturer(-1, StreamDeviceInfo(), constraints,
|
||||
nullptr, media_stream_source));
|
||||
capturer->SetCapturerSource(std::move(audio_source), params);
|
||||
|
@ -5,8 +5,9 @@
|
||||
#ifndef CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_UTILS_H_
|
||||
#define CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_UTILS_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "media/base/channel_layout.h"
|
||||
#include "media/base/video_capture_types.h"
|
||||
@ -30,7 +31,7 @@ namespace content {
|
||||
// |is_readonly| should be true if the format of the data cannot be changed by
|
||||
// MediaTrackConstraints.
|
||||
CONTENT_EXPORT bool AddVideoTrackToMediaStream(
|
||||
scoped_ptr<media::VideoCapturerSource> video_source,
|
||||
std::unique_ptr<media::VideoCapturerSource> video_source,
|
||||
bool is_remote,
|
||||
bool is_readonly,
|
||||
blink::WebMediaStream* web_media_stream);
|
||||
|
@ -5,8 +5,9 @@
|
||||
#ifndef CONTENT_PUBLIC_RENDERER_PLUGIN_INSTANCE_THROTTLER_H_
|
||||
#define CONTENT_PUBLIC_RENDERER_PLUGIN_INSTANCE_THROTTLER_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/common/content_export.h"
|
||||
|
||||
namespace blink {
|
||||
@ -71,7 +72,7 @@ class CONTENT_EXPORT PluginInstanceThrottler {
|
||||
virtual void OnThrottlerDestroyed() {}
|
||||
};
|
||||
|
||||
static scoped_ptr<PluginInstanceThrottler> Create();
|
||||
static std::unique_ptr<PluginInstanceThrottler> Create();
|
||||
|
||||
static void RecordUnthrottleMethodMetric(PowerSaverUnthrottleMethod method);
|
||||
|
||||
|
@ -7,8 +7,9 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/callback_forward.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "content/public/common/console_message_level.h"
|
||||
@ -126,7 +127,7 @@ class CONTENT_EXPORT RenderFrame : public IPC::Listener,
|
||||
blink::WebFrame* frame,
|
||||
const WebPluginInfo& info,
|
||||
const blink::WebPluginParams& params,
|
||||
scoped_ptr<PluginInstanceThrottler> throttler) = 0;
|
||||
std::unique_ptr<PluginInstanceThrottler> throttler) = 0;
|
||||
|
||||
// The client should handle the navigation externally.
|
||||
virtual void LoadURLExternally(const blink::WebURLRequest& request,
|
||||
|
@ -77,7 +77,7 @@ class CONTENT_EXPORT RenderThread : virtual public ChildThread {
|
||||
|
||||
// Asks the host to create a block of shared memory for the renderer.
|
||||
// The shared memory allocated by the host is returned back.
|
||||
virtual scoped_ptr<base::SharedMemory> HostAllocateSharedMemoryBuffer(
|
||||
virtual std::unique_ptr<base::SharedMemory> HostAllocateSharedMemoryBuffer(
|
||||
size_t buffer_size) = 0;
|
||||
|
||||
virtual cc::SharedBitmapManager* GetSharedBitmapManager() = 0;
|
||||
|
@ -18,7 +18,7 @@ void CreateVideoEncodeAccelerator(
|
||||
media::GpuVideoAcceleratorFactories* gpu_factories =
|
||||
RenderThreadImpl::current()->GetGpuFactories();
|
||||
if (!gpu_factories || !gpu_factories->IsGpuVideoAcceleratorEnabled()) {
|
||||
callback.Run(NULL, scoped_ptr<media::VideoEncodeAccelerator>());
|
||||
callback.Run(NULL, std::unique_ptr<media::VideoEncodeAccelerator>());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -5,8 +5,9 @@
|
||||
#ifndef CONTENT_PUBLIC_RENDERER_VIDEO_ENCODE_ACCELERATOR_H_
|
||||
#define CONTENT_PUBLIC_RENDERER_VIDEO_ENCODE_ACCELERATOR_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "media/video/video_encode_accelerator.h"
|
||||
@ -16,9 +17,9 @@ namespace content {
|
||||
// Called when CreateVideoEncodeAccelerator request is complete.
|
||||
// The |vea| object must be accessed on the thread associated with the
|
||||
// |encode_task_runner|.
|
||||
typedef base::Callback<
|
||||
void (scoped_refptr<base::SingleThreadTaskRunner> encoder_task_runner,
|
||||
scoped_ptr<media::VideoEncodeAccelerator> vea)>
|
||||
typedef base::Callback<void(
|
||||
scoped_refptr<base::SingleThreadTaskRunner> encoder_task_runner,
|
||||
std::unique_ptr<media::VideoEncodeAccelerator> vea)>
|
||||
OnCreateVideoEncodeAcceleratorCallback;
|
||||
|
||||
// Generates an instance of media::VideoEncodeAccelerator.
|
||||
|
@ -132,10 +132,10 @@ class BrowserTestBase : public testing::Test {
|
||||
void ProxyRunTestOnMainThreadLoop();
|
||||
|
||||
// Testing server, started on demand.
|
||||
scoped_ptr<net::SpawnedTestServer> spawned_test_server_;
|
||||
std::unique_ptr<net::SpawnedTestServer> spawned_test_server_;
|
||||
|
||||
// Embedded test server, cheap to create, started on demand.
|
||||
scoped_ptr<net::EmbeddedTestServer> embedded_test_server_;
|
||||
std::unique_ptr<net::EmbeddedTestServer> embedded_test_server_;
|
||||
|
||||
// Host resolver used during tests.
|
||||
scoped_refptr<net::RuleBasedHostResolverProc> rule_based_resolver_;
|
||||
|
@ -137,17 +137,17 @@ class InterstitialObserver : public content::WebContentsObserver {
|
||||
};
|
||||
|
||||
// Specifying a prototype so that we can add the WARN_UNUSED_RESULT attribute.
|
||||
bool ExecuteScriptHelper(
|
||||
RenderFrameHost* render_frame_host,
|
||||
const std::string& original_script,
|
||||
scoped_ptr<base::Value>* result) WARN_UNUSED_RESULT;
|
||||
bool ExecuteScriptHelper(RenderFrameHost* render_frame_host,
|
||||
const std::string& original_script,
|
||||
std::unique_ptr<base::Value>* result)
|
||||
WARN_UNUSED_RESULT;
|
||||
|
||||
// Executes the passed |original_script| in the frame specified by
|
||||
// |render_frame_host|. If |result| is not NULL, stores the value that the
|
||||
// evaluation of the script in |result|. Returns true on success.
|
||||
bool ExecuteScriptHelper(RenderFrameHost* render_frame_host,
|
||||
const std::string& original_script,
|
||||
scoped_ptr<base::Value>* result) {
|
||||
std::unique_ptr<base::Value>* result) {
|
||||
// TODO(jcampan): we should make the domAutomationController not require an
|
||||
// automation id.
|
||||
std::string script =
|
||||
@ -179,13 +179,13 @@ bool ExecuteScriptHelper(RenderFrameHost* render_frame_host,
|
||||
bool ExecuteScriptInIsolatedWorldHelper(RenderFrameHost* render_frame_host,
|
||||
const int world_id,
|
||||
const std::string& original_script,
|
||||
scoped_ptr<base::Value>* result)
|
||||
std::unique_ptr<base::Value>* result)
|
||||
WARN_UNUSED_RESULT;
|
||||
|
||||
bool ExecuteScriptInIsolatedWorldHelper(RenderFrameHost* render_frame_host,
|
||||
const int world_id,
|
||||
const std::string& original_script,
|
||||
scoped_ptr<base::Value>* result) {
|
||||
std::unique_ptr<base::Value>* result) {
|
||||
std::string script =
|
||||
"window.domAutomationController.setAutomationId(0);" + original_script;
|
||||
DOMOperationObserver dom_op_observer(render_frame_host);
|
||||
@ -285,13 +285,13 @@ void SetCookieOnIOThread(const GURL& url,
|
||||
base::Bind(&SetCookieCallback, result, event));
|
||||
}
|
||||
|
||||
scoped_ptr<net::test_server::HttpResponse> CrossSiteRedirectResponseHandler(
|
||||
const GURL& server_base_url,
|
||||
const net::test_server::HttpRequest& request) {
|
||||
std::unique_ptr<net::test_server::HttpResponse>
|
||||
CrossSiteRedirectResponseHandler(const GURL& server_base_url,
|
||||
const net::test_server::HttpRequest& request) {
|
||||
std::string prefix("/cross-site/");
|
||||
if (!base::StartsWith(request.relative_url, prefix,
|
||||
base::CompareCase::SENSITIVE))
|
||||
return scoped_ptr<net::test_server::HttpResponse>();
|
||||
return std::unique_ptr<net::test_server::HttpResponse>();
|
||||
|
||||
std::string params = request.relative_url.substr(prefix.length());
|
||||
|
||||
@ -299,7 +299,7 @@ scoped_ptr<net::test_server::HttpResponse> CrossSiteRedirectResponseHandler(
|
||||
// one '/' character is expected.
|
||||
size_t slash = params.find('/');
|
||||
if (slash == std::string::npos)
|
||||
return scoped_ptr<net::test_server::HttpResponse>();
|
||||
return std::unique_ptr<net::test_server::HttpResponse>();
|
||||
|
||||
// Replace the host of the URL with the one passed in the URL.
|
||||
GURL::Replacements replace_host;
|
||||
@ -311,7 +311,7 @@ scoped_ptr<net::test_server::HttpResponse> CrossSiteRedirectResponseHandler(
|
||||
GURL redirect_target(redirect_server.Resolve(path));
|
||||
DCHECK(redirect_target.is_valid());
|
||||
|
||||
scoped_ptr<net::test_server::BasicHttpResponse> http_response(
|
||||
std::unique_ptr<net::test_server::BasicHttpResponse> http_response(
|
||||
new net::test_server::BasicHttpResponse);
|
||||
http_response->set_code(net::HTTP_MOVED_PERMANENTLY);
|
||||
http_response->AddCustomHeader("Location", redirect_target.spec());
|
||||
@ -663,7 +663,7 @@ bool ExecuteScript(const ToRenderFrameHost& adapter,
|
||||
bool ExecuteScriptAndExtractInt(const ToRenderFrameHost& adapter,
|
||||
const std::string& script, int* result) {
|
||||
DCHECK(result);
|
||||
scoped_ptr<base::Value> value;
|
||||
std::unique_ptr<base::Value> value;
|
||||
if (!ExecuteScriptHelper(adapter.render_frame_host(), script, &value) ||
|
||||
!value.get()) {
|
||||
return false;
|
||||
@ -675,7 +675,7 @@ bool ExecuteScriptAndExtractInt(const ToRenderFrameHost& adapter,
|
||||
bool ExecuteScriptAndExtractBool(const ToRenderFrameHost& adapter,
|
||||
const std::string& script, bool* result) {
|
||||
DCHECK(result);
|
||||
scoped_ptr<base::Value> value;
|
||||
std::unique_ptr<base::Value> value;
|
||||
if (!ExecuteScriptHelper(adapter.render_frame_host(), script, &value) ||
|
||||
!value.get()) {
|
||||
return false;
|
||||
@ -690,7 +690,7 @@ bool ExecuteScriptInIsolatedWorldAndExtractBool(
|
||||
const std::string& script,
|
||||
bool* result) {
|
||||
DCHECK(result);
|
||||
scoped_ptr<base::Value> value;
|
||||
std::unique_ptr<base::Value> value;
|
||||
if (!ExecuteScriptInIsolatedWorldHelper(adapter.render_frame_host(), world_id,
|
||||
script, &value) ||
|
||||
!value.get()) {
|
||||
@ -704,7 +704,7 @@ bool ExecuteScriptAndExtractString(const ToRenderFrameHost& adapter,
|
||||
const std::string& script,
|
||||
std::string* result) {
|
||||
DCHECK(result);
|
||||
scoped_ptr<base::Value> value;
|
||||
std::unique_ptr<base::Value> value;
|
||||
if (!ExecuteScriptHelper(adapter.render_frame_host(), script, &value) ||
|
||||
!value.get()) {
|
||||
return false;
|
||||
@ -1113,7 +1113,7 @@ bool FrameWatcher::OnMessageReceived(const IPC::Message& message) {
|
||||
ViewHostMsg_SwapCompositorFrame::Param param;
|
||||
if (!ViewHostMsg_SwapCompositorFrame::Read(&message, ¶m))
|
||||
return false;
|
||||
scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame);
|
||||
std::unique_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame);
|
||||
base::get<1>(param).AssignTo(frame.get());
|
||||
|
||||
BrowserThread::PostTask(
|
||||
|
@ -416,7 +416,7 @@ class WebContentsAddedObserver {
|
||||
base::Callback<void(WebContents*)> web_contents_created_callback_;
|
||||
|
||||
WebContents* web_contents_;
|
||||
scoped_ptr<RenderViewCreatedObserver> child_observer_;
|
||||
std::unique_ptr<RenderViewCreatedObserver> child_observer_;
|
||||
scoped_refptr<MessageLoopRunner> runner_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(WebContentsAddedObserver);
|
||||
@ -475,7 +475,7 @@ class MainThreadFrameObserver : public IPC::Listener {
|
||||
void Quit();
|
||||
|
||||
RenderWidgetHost* render_widget_host_;
|
||||
scoped_ptr<base::RunLoop> run_loop_;
|
||||
std::unique_ptr<base::RunLoop> run_loop_;
|
||||
int routing_id_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MainThreadFrameObserver);
|
||||
|
@ -5,7 +5,8 @@
|
||||
#ifndef CONTENT_PUBLIC_TEST_CONTENT_BROWSER_TEST_H_
|
||||
#define CONTENT_PUBLIC_TEST_CONTENT_BROWSER_TEST_H_
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include <memory>
|
||||
|
||||
#include "build/build_config.h"
|
||||
#include "content/public/test/browser_test.h"
|
||||
#include "content/public/test/browser_test_base.h"
|
||||
@ -43,7 +44,7 @@ class ContentBrowserTest : public BrowserTestBase {
|
||||
#if defined(OS_ANDROID)
|
||||
// For all other platforms, this is done automatically when calling into
|
||||
// ContentMain. For Android we set things up manually.
|
||||
scoped_ptr<ShellMainDelegate> shell_main_delegate_;
|
||||
std::unique_ptr<ShellMainDelegate> shell_main_delegate_;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -4,9 +4,10 @@
|
||||
|
||||
#include "content/public/test/content_test_suite_base.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/metrics/statistics_recorder.h"
|
||||
#include "base/test/test_suite.h"
|
||||
#include "base/threading/sequenced_worker_pool.h"
|
||||
|
@ -7,11 +7,11 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback_forward.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "cc/layers/texture_layer.h"
|
||||
#include "third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationType.h"
|
||||
|
||||
@ -75,7 +75,7 @@ void FetchManifest(blink::WebView* view, const GURL& url,
|
||||
const FetchManifestCallback&);
|
||||
|
||||
// Sets gamepad provider to be used for layout tests.
|
||||
void SetMockGamepadProvider(scoped_ptr<RendererGamepadProvider> provider);
|
||||
void SetMockGamepadProvider(std::unique_ptr<RendererGamepadProvider> provider);
|
||||
|
||||
// Sets a double that should be used when registering
|
||||
// a listener through BlinkPlatformImpl::setDeviceLightListener().
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "content/public/test/mock_blob_url_request_context.h"
|
||||
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/thread_task_runner_handle.h"
|
||||
#include "storage/browser/blob/blob_data_builder.h"
|
||||
#include "storage/browser/blob/blob_storage_context.h"
|
||||
@ -17,7 +18,7 @@ MockBlobURLRequestContext::MockBlobURLRequestContext(
|
||||
: blob_storage_context_(new storage::BlobStorageContext) {
|
||||
// Job factory owns the protocol handler.
|
||||
job_factory_.SetProtocolHandler(
|
||||
"blob", make_scoped_ptr(new storage::BlobProtocolHandler(
|
||||
"blob", base::WrapUnique(new storage::BlobProtocolHandler(
|
||||
blob_storage_context_.get(), file_system_context,
|
||||
base::ThreadTaskRunnerHandle::Get())));
|
||||
set_job_factory(&job_factory_);
|
||||
@ -43,7 +44,7 @@ ScopedTextBlob::ScopedTextBlob(
|
||||
ScopedTextBlob::~ScopedTextBlob() {
|
||||
}
|
||||
|
||||
scoped_ptr<storage::BlobDataHandle> ScopedTextBlob::GetBlobDataHandle() {
|
||||
std::unique_ptr<storage::BlobDataHandle> ScopedTextBlob::GetBlobDataHandle() {
|
||||
return context_->GetBlobDataFromUUID(blob_id_);
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ class MockBlobURLRequestContext : public net::URLRequestContext {
|
||||
|
||||
private:
|
||||
net::URLRequestJobFactoryImpl job_factory_;
|
||||
scoped_ptr<storage::BlobStorageContext> blob_storage_context_;
|
||||
std::unique_ptr<storage::BlobStorageContext> blob_storage_context_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MockBlobURLRequestContext);
|
||||
};
|
||||
@ -46,12 +46,12 @@ class ScopedTextBlob {
|
||||
~ScopedTextBlob();
|
||||
|
||||
// Returns a BlobDataHandle referring to the scoped blob.
|
||||
scoped_ptr<storage::BlobDataHandle> GetBlobDataHandle();
|
||||
std::unique_ptr<storage::BlobDataHandle> GetBlobDataHandle();
|
||||
|
||||
private:
|
||||
const std::string blob_id_;
|
||||
storage::BlobStorageContext* context_;
|
||||
scoped_ptr<storage::BlobDataHandle> handle_;
|
||||
std::unique_ptr<storage::BlobDataHandle> handle_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ScopedTextBlob);
|
||||
};
|
||||
|
@ -87,8 +87,8 @@ MockDownloadManager::MockDownloadManager() {}
|
||||
MockDownloadManager::~MockDownloadManager() {}
|
||||
|
||||
void MockDownloadManager::StartDownload(
|
||||
scoped_ptr<DownloadCreateInfo> info,
|
||||
scoped_ptr<ByteStreamReader> stream,
|
||||
std::unique_ptr<DownloadCreateInfo> info,
|
||||
std::unique_ptr<ByteStreamReader> stream,
|
||||
const DownloadUrlParameters::OnStartedCallback& callback) {
|
||||
MockStartDownload(info.get(), stream.get());
|
||||
}
|
||||
|
@ -88,8 +88,8 @@ class MockDownloadManager : public DownloadManager {
|
||||
|
||||
// Gasket for handling scoped_ptr arguments.
|
||||
void StartDownload(
|
||||
scoped_ptr<DownloadCreateInfo> info,
|
||||
scoped_ptr<ByteStreamReader> stream,
|
||||
std::unique_ptr<DownloadCreateInfo> info,
|
||||
std::unique_ptr<ByteStreamReader> stream,
|
||||
const DownloadUrlParameters::OnStartedCallback& callback) override;
|
||||
|
||||
MOCK_METHOD2(MockStartDownload,
|
||||
@ -100,7 +100,7 @@ class MockDownloadManager : public DownloadManager {
|
||||
base::Time remove_end));
|
||||
MOCK_METHOD0(RemoveAllDownloads, int());
|
||||
MOCK_METHOD1(DownloadUrlMock, void(DownloadUrlParameters*));
|
||||
void DownloadUrl(scoped_ptr<DownloadUrlParameters> params) override {
|
||||
void DownloadUrl(std::unique_ptr<DownloadUrlParameters> params) override {
|
||||
DownloadUrlMock(params.get());
|
||||
}
|
||||
MOCK_METHOD1(AddObserver, void(Observer* observer));
|
||||
|
@ -263,7 +263,7 @@ ServiceRegistry* MockRenderProcessHost::GetServiceRegistry() {
|
||||
return service_registry_.get();
|
||||
}
|
||||
|
||||
scoped_ptr<base::SharedPersistentMemoryAllocator>
|
||||
std::unique_ptr<base::SharedPersistentMemoryAllocator>
|
||||
MockRenderProcessHost::TakeMetricsAllocator() {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ class MockRenderProcessHost : public RenderProcessHost {
|
||||
void ResumeDeferredNavigation(const GlobalRequestID& request_id) override;
|
||||
void NotifyTimezoneChange(const std::string& zone_id) override;
|
||||
ServiceRegistry* GetServiceRegistry() override;
|
||||
scoped_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator()
|
||||
std::unique_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator()
|
||||
override;
|
||||
const base::TimeTicks& GetInitTimeForNavigationMetrics() const override;
|
||||
bool SubscribeUniformEnabled() const override;
|
||||
@ -131,7 +131,7 @@ class MockRenderProcessHost : public RenderProcessHost {
|
||||
is_process_backgrounded_ = is_process_backgrounded;
|
||||
}
|
||||
|
||||
void SetProcessHandle(scoped_ptr<base::ProcessHandle> new_handle) {
|
||||
void SetProcessHandle(std::unique_ptr<base::ProcessHandle> new_handle) {
|
||||
process_handle = std::move(new_handle);
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ class MockRenderProcessHost : public RenderProcessHost {
|
||||
|
||||
int worker_ref_count() const { return worker_ref_count_; }
|
||||
|
||||
void SetServiceRegistry(scoped_ptr<ServiceRegistry> service_registry) {
|
||||
void SetServiceRegistry(std::unique_ptr<ServiceRegistry> service_registry) {
|
||||
service_registry_ = std::move(service_registry);
|
||||
}
|
||||
|
||||
@ -161,9 +161,9 @@ class MockRenderProcessHost : public RenderProcessHost {
|
||||
bool deletion_callback_called_;
|
||||
bool is_for_guests_only_;
|
||||
bool is_process_backgrounded_;
|
||||
scoped_ptr<base::ProcessHandle> process_handle;
|
||||
std::unique_ptr<base::ProcessHandle> process_handle;
|
||||
int worker_ref_count_;
|
||||
scoped_ptr<ServiceRegistry> service_registry_;
|
||||
std::unique_ptr<ServiceRegistry> service_registry_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHost);
|
||||
};
|
||||
|
@ -129,16 +129,15 @@ void MockRenderThread::RecordAction(const base::UserMetricsAction& action) {
|
||||
void MockRenderThread::RecordComputedAction(const std::string& action) {
|
||||
}
|
||||
|
||||
scoped_ptr<base::SharedMemory>
|
||||
MockRenderThread::HostAllocateSharedMemoryBuffer(
|
||||
size_t buffer_size) {
|
||||
scoped_ptr<base::SharedMemory> shared_buf(new base::SharedMemory);
|
||||
std::unique_ptr<base::SharedMemory>
|
||||
MockRenderThread::HostAllocateSharedMemoryBuffer(size_t buffer_size) {
|
||||
std::unique_ptr<base::SharedMemory> shared_buf(new base::SharedMemory);
|
||||
if (!shared_buf->CreateAnonymous(buffer_size)) {
|
||||
NOTREACHED() << "Cannot map shared memory buffer";
|
||||
return scoped_ptr<base::SharedMemory>();
|
||||
return std::unique_ptr<base::SharedMemory>();
|
||||
}
|
||||
|
||||
return scoped_ptr<base::SharedMemory>(shared_buf.release());
|
||||
return std::unique_ptr<base::SharedMemory>(shared_buf.release());
|
||||
}
|
||||
|
||||
cc::SharedBitmapManager* MockRenderThread::GetSharedBitmapManager() {
|
||||
|
@ -65,7 +65,7 @@ class MockRenderThread : public RenderThread {
|
||||
ResourceDispatcherDelegate* delegate) override;
|
||||
void RecordAction(const base::UserMetricsAction& action) override;
|
||||
void RecordComputedAction(const std::string& action) override;
|
||||
scoped_ptr<base::SharedMemory> HostAllocateSharedMemoryBuffer(
|
||||
std::unique_ptr<base::SharedMemory> HostAllocateSharedMemoryBuffer(
|
||||
size_t buffer_size) override;
|
||||
cc::SharedBitmapManager* GetSharedBitmapManager() override;
|
||||
void RegisterExtension(v8::Extension* extension) override;
|
||||
@ -149,7 +149,7 @@ class MockRenderThread : public RenderThread {
|
||||
int32_t new_frame_routing_id_;
|
||||
|
||||
// The last known good deserializer for sync messages.
|
||||
scoped_ptr<IPC::MessageReplyDeserializer> reply_deserializer_;
|
||||
std::unique_ptr<IPC::MessageReplyDeserializer> reply_deserializer_;
|
||||
|
||||
// A list of message filters added to this thread.
|
||||
std::vector<scoped_refptr<IPC::MessageFilter> > filters_;
|
||||
@ -158,7 +158,7 @@ class MockRenderThread : public RenderThread {
|
||||
base::ObserverList<RenderProcessObserver> observers_;
|
||||
|
||||
cc::TestSharedBitmapManager shared_bitmap_manager_;
|
||||
scoped_ptr<ServiceRegistry> service_registry_;
|
||||
std::unique_ptr<ServiceRegistry> service_registry_;
|
||||
};
|
||||
|
||||
} // namespace content
|
||||
|
@ -5,9 +5,10 @@
|
||||
#ifndef CONTENT_PUBLIC_TEST_MOCK_RESOURCE_CONTEXT_H_
|
||||
#define CONTENT_PUBLIC_TEST_MOCK_RESOURCE_CONTEXT_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/public/browser/resource_context.h"
|
||||
|
||||
namespace net {
|
||||
|
@ -4,9 +4,10 @@
|
||||
|
||||
#include "content/public/test/mock_storage_client.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/location.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/singleton.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "base/stl_util.h"
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <cctype>
|
||||
|
||||
#include "base/location.h"
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "build/build_config.h"
|
||||
@ -387,8 +388,8 @@ void RenderViewTest::TearDown() {
|
||||
|
||||
render_thread_->SendCloseMessage();
|
||||
|
||||
scoped_ptr<blink::WebLeakDetector> leak_detector =
|
||||
make_scoped_ptr(blink::WebLeakDetector::create(this));
|
||||
std::unique_ptr<blink::WebLeakDetector> leak_detector =
|
||||
base::WrapUnique(blink::WebLeakDetector::create(this));
|
||||
|
||||
leak_detector->prepareForLeakDetection(view_->GetWebView()->mainFrame());
|
||||
|
||||
@ -604,7 +605,7 @@ void RenderViewTest::Resize(gfx::Size new_size,
|
||||
params.resizer_rect = resizer_rect;
|
||||
params.is_fullscreen_granted = is_fullscreen_granted;
|
||||
params.display_mode = blink::WebDisplayModeBrowser;
|
||||
scoped_ptr<IPC::Message> resize_message(new ViewMsg_Resize(0, params));
|
||||
std::unique_ptr<IPC::Message> resize_message(new ViewMsg_Resize(0, params));
|
||||
OnMessageReceived(*resize_message);
|
||||
}
|
||||
|
||||
@ -692,8 +693,8 @@ ContentRendererClient* RenderViewTest::CreateContentRendererClient() {
|
||||
return new ContentRendererClient;
|
||||
}
|
||||
|
||||
scoped_ptr<ResizeParams> RenderViewTest::InitialSizeParams() {
|
||||
return make_scoped_ptr(new ResizeParams());
|
||||
std::unique_ptr<ResizeParams> RenderViewTest::InitialSizeParams() {
|
||||
return base::WrapUnique(new ResizeParams());
|
||||
}
|
||||
|
||||
void RenderViewTest::GoToOffset(int offset,
|
||||
|
@ -7,10 +7,10 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "base/test/test_io_thread.h"
|
||||
@ -62,8 +62,9 @@ class RenderViewTest : public testing::Test, blink::WebLeakDetectorClient {
|
||||
void Shutdown();
|
||||
|
||||
private:
|
||||
scoped_ptr<scheduler::RendererScheduler> renderer_scheduler_;
|
||||
scoped_ptr<RendererBlinkPlatformImplTestOverrideImpl> blink_platform_impl_;
|
||||
std::unique_ptr<scheduler::RendererScheduler> renderer_scheduler_;
|
||||
std::unique_ptr<RendererBlinkPlatformImplTestOverrideImpl>
|
||||
blink_platform_impl_;
|
||||
};
|
||||
|
||||
RenderViewTest();
|
||||
@ -176,7 +177,7 @@ class RenderViewTest : public testing::Test, blink::WebLeakDetectorClient {
|
||||
virtual ContentRendererClient* CreateContentRendererClient();
|
||||
|
||||
// Allows a subclass to customize the initial size of the RenderView.
|
||||
virtual scoped_ptr<ResizeParams> InitialSizeParams();
|
||||
virtual std::unique_ptr<ResizeParams> InitialSizeParams();
|
||||
|
||||
// testing::Test
|
||||
void SetUp() override;
|
||||
@ -187,28 +188,28 @@ class RenderViewTest : public testing::Test, blink::WebLeakDetectorClient {
|
||||
void onLeakDetectionComplete(const Result& result) override;
|
||||
|
||||
base::MessageLoop msg_loop_;
|
||||
scoped_ptr<FakeCompositorDependencies> compositor_deps_;
|
||||
scoped_ptr<MockRenderProcess> mock_process_;
|
||||
std::unique_ptr<FakeCompositorDependencies> compositor_deps_;
|
||||
std::unique_ptr<MockRenderProcess> mock_process_;
|
||||
// We use a naked pointer because we don't want to expose RenderViewImpl in
|
||||
// the embedder's namespace.
|
||||
RenderView* view_;
|
||||
RendererBlinkPlatformImplTestOverride blink_platform_impl_;
|
||||
scoped_ptr<ContentClient> content_client_;
|
||||
scoped_ptr<ContentBrowserClient> content_browser_client_;
|
||||
scoped_ptr<ContentRendererClient> content_renderer_client_;
|
||||
scoped_ptr<MockRenderThread> render_thread_;
|
||||
std::unique_ptr<ContentClient> content_client_;
|
||||
std::unique_ptr<ContentBrowserClient> content_browser_client_;
|
||||
std::unique_ptr<ContentRendererClient> content_renderer_client_;
|
||||
std::unique_ptr<MockRenderThread> render_thread_;
|
||||
|
||||
// Used to setup the process so renderers can run.
|
||||
scoped_ptr<RendererMainPlatformDelegate> platform_;
|
||||
scoped_ptr<MainFunctionParams> params_;
|
||||
scoped_ptr<base::CommandLine> command_line_;
|
||||
std::unique_ptr<RendererMainPlatformDelegate> platform_;
|
||||
std::unique_ptr<MainFunctionParams> params_;
|
||||
std::unique_ptr<base::CommandLine> command_line_;
|
||||
|
||||
// For Mojo.
|
||||
scoped_ptr<base::TestIOThread> test_io_thread_;
|
||||
scoped_ptr<mojo::edk::test::ScopedIPCSupport> ipc_support_;
|
||||
std::unique_ptr<base::TestIOThread> test_io_thread_;
|
||||
std::unique_ptr<mojo::edk::test::ScopedIPCSupport> ipc_support_;
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
scoped_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_;
|
||||
std::unique_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user