Adapt to changes of Chrome 51 API changes (Part 2)
This commit is contained in:
parent
7ba391da7c
commit
a2bd55dd3c
48 changed files with 131 additions and 131 deletions
|
@ -31,7 +31,7 @@ class BrowserProcess {
|
|||
printing::PrintJobManager* print_job_manager();
|
||||
|
||||
private:
|
||||
scoped_ptr<printing::PrintJobManager> print_job_manager_;
|
||||
std::unique_ptr<printing::PrintJobManager> print_job_manager_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(BrowserProcess);
|
||||
};
|
||||
|
|
|
@ -138,7 +138,7 @@ void CertificateManagerModel::DidGetCertDBOnUIThread(
|
|||
const CreationCallback& callback) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
|
||||
scoped_ptr<CertificateManagerModel> model(new CertificateManagerModel(
|
||||
std::unique_ptr<CertificateManagerModel> model(new CertificateManagerModel(
|
||||
cert_db, is_user_db_available));
|
||||
callback.Run(std::move(model));
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ class ResourceContext;
|
|||
// manager dialog, and processes changes from the view.
|
||||
class CertificateManagerModel {
|
||||
public:
|
||||
typedef base::Callback<void(scoped_ptr<CertificateManagerModel>)>
|
||||
typedef base::Callback<void(std::unique_ptr<CertificateManagerModel>)>
|
||||
CreationCallback;
|
||||
|
||||
// Creates a CertificateManagerModel. The model will be passed to the callback
|
||||
|
|
|
@ -41,7 +41,7 @@ class GlobalShortcutListenerWin : public GlobalShortcutListener {
|
|||
typedef std::map<ui::Accelerator, int> HotkeyIdMap;
|
||||
HotkeyIdMap hotkey_ids_;
|
||||
|
||||
scoped_ptr<gfx::SingletonHwndObserver> singleton_hwnd_observer_;
|
||||
std::unique_ptr<gfx::SingletonHwndObserver> singleton_hwnd_observer_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(GlobalShortcutListenerWin);
|
||||
};
|
||||
|
|
|
@ -39,7 +39,7 @@ uint32_t GetFrameHash(webrtc::DesktopFrame* frame) {
|
|||
return base::SuperFastHash(reinterpret_cast<char*>(frame->data()), data_size);
|
||||
}
|
||||
|
||||
gfx::ImageSkia ScaleDesktopFrame(scoped_ptr<webrtc::DesktopFrame> frame,
|
||||
gfx::ImageSkia ScaleDesktopFrame(std::unique_ptr<webrtc::DesktopFrame> frame,
|
||||
gfx::Size size) {
|
||||
gfx::Rect scaled_rect = media::ComputeLetterboxRegion(
|
||||
gfx::Rect(0, 0, size.width(), size.height()),
|
||||
|
@ -86,8 +86,8 @@ class NativeDesktopMediaList::Worker
|
|||
: public webrtc::DesktopCapturer::Callback {
|
||||
public:
|
||||
Worker(base::WeakPtr<NativeDesktopMediaList> media_list,
|
||||
scoped_ptr<webrtc::ScreenCapturer> screen_capturer,
|
||||
scoped_ptr<webrtc::WindowCapturer> window_capturer);
|
||||
std::unique_ptr<webrtc::ScreenCapturer> screen_capturer,
|
||||
std::unique_ptr<webrtc::WindowCapturer> window_capturer);
|
||||
~Worker() override;
|
||||
|
||||
void Refresh(const gfx::Size& thumbnail_size,
|
||||
|
@ -102,10 +102,10 @@ class NativeDesktopMediaList::Worker
|
|||
|
||||
base::WeakPtr<NativeDesktopMediaList> media_list_;
|
||||
|
||||
scoped_ptr<webrtc::ScreenCapturer> screen_capturer_;
|
||||
scoped_ptr<webrtc::WindowCapturer> window_capturer_;
|
||||
std::unique_ptr<webrtc::ScreenCapturer> screen_capturer_;
|
||||
std::unique_ptr<webrtc::WindowCapturer> window_capturer_;
|
||||
|
||||
scoped_ptr<webrtc::DesktopFrame> current_frame_;
|
||||
std::unique_ptr<webrtc::DesktopFrame> current_frame_;
|
||||
|
||||
ImageHashesMap image_hashes_;
|
||||
|
||||
|
@ -114,8 +114,8 @@ class NativeDesktopMediaList::Worker
|
|||
|
||||
NativeDesktopMediaList::Worker::Worker(
|
||||
base::WeakPtr<NativeDesktopMediaList> media_list,
|
||||
scoped_ptr<webrtc::ScreenCapturer> screen_capturer,
|
||||
scoped_ptr<webrtc::WindowCapturer> window_capturer)
|
||||
std::unique_ptr<webrtc::ScreenCapturer> screen_capturer,
|
||||
std::unique_ptr<webrtc::WindowCapturer> window_capturer)
|
||||
: media_list_(media_list),
|
||||
screen_capturer_(std::move(screen_capturer)),
|
||||
window_capturer_(std::move(window_capturer)) {
|
||||
|
@ -229,8 +229,8 @@ void NativeDesktopMediaList::Worker::OnCaptureCompleted(
|
|||
}
|
||||
|
||||
NativeDesktopMediaList::NativeDesktopMediaList(
|
||||
scoped_ptr<webrtc::ScreenCapturer> screen_capturer,
|
||||
scoped_ptr<webrtc::WindowCapturer> window_capturer)
|
||||
std::unique_ptr<webrtc::ScreenCapturer> screen_capturer,
|
||||
std::unique_ptr<webrtc::WindowCapturer> window_capturer)
|
||||
: screen_capturer_(std::move(screen_capturer)),
|
||||
window_capturer_(std::move(window_capturer)),
|
||||
update_period_(base::TimeDelta::FromMilliseconds(kDefaultUpdatePeriod)),
|
||||
|
|
|
@ -25,8 +25,8 @@ class NativeDesktopMediaList : public DesktopMediaList {
|
|||
// types of sources the model should be populated with (e.g. it will only
|
||||
// contain windows, if |screen_capturer| is NULL).
|
||||
NativeDesktopMediaList(
|
||||
scoped_ptr<webrtc::ScreenCapturer> screen_capturer,
|
||||
scoped_ptr<webrtc::WindowCapturer> window_capturer);
|
||||
std::unique_ptr<webrtc::ScreenCapturer> screen_capturer,
|
||||
std::unique_ptr<webrtc::WindowCapturer> window_capturer);
|
||||
~NativeDesktopMediaList() override;
|
||||
|
||||
// DesktopMediaList interface.
|
||||
|
@ -66,8 +66,8 @@ class NativeDesktopMediaList : public DesktopMediaList {
|
|||
void OnRefreshFinished();
|
||||
|
||||
// Capturers specified in SetCapturers() and passed to the |worker_| later.
|
||||
scoped_ptr<webrtc::ScreenCapturer> screen_capturer_;
|
||||
scoped_ptr<webrtc::WindowCapturer> window_capturer_;
|
||||
std::unique_ptr<webrtc::ScreenCapturer> screen_capturer_;
|
||||
std::unique_ptr<webrtc::WindowCapturer> window_capturer_;
|
||||
|
||||
// Time interval between mode updates.
|
||||
base::TimeDelta update_period_;
|
||||
|
@ -87,7 +87,7 @@ class NativeDesktopMediaList : public DesktopMediaList {
|
|||
// An object that does all the work of getting list of sources on a background
|
||||
// thread (see |capture_task_runner_|). Destroyed on |capture_task_runner_|
|
||||
// after the model is destroyed.
|
||||
scoped_ptr<Worker> worker_;
|
||||
std::unique_ptr<Worker> worker_;
|
||||
|
||||
// Current list of sources.
|
||||
std::vector<Source> sources_;
|
||||
|
|
|
@ -48,7 +48,7 @@ class RefCountedTempDir
|
|||
DISALLOW_COPY_AND_ASSIGN(RefCountedTempDir);
|
||||
};
|
||||
|
||||
typedef scoped_ptr<base::File, BrowserThread::DeleteOnFileThread>
|
||||
typedef std::unique_ptr<base::File, BrowserThread::DeleteOnFileThread>
|
||||
ScopedTempFile;
|
||||
|
||||
// Wrapper for Emf to keep only file handle in memory, and load actual data only
|
||||
|
@ -389,7 +389,7 @@ void PdfToEmfUtilityProcessHostClient::OnPageDone(bool success,
|
|||
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
||||
if (get_page_callbacks_.empty())
|
||||
return OnFailed();
|
||||
scoped_ptr<MetafilePlayer> emf;
|
||||
std::unique_ptr<MetafilePlayer> emf;
|
||||
GetPageCallbackData& data = get_page_callbacks_.front();
|
||||
if (success)
|
||||
emf.reset(new LazyEmf(temp_dir_, data.emf().Pass()));
|
||||
|
@ -487,8 +487,8 @@ PdfToEmfConverter::~PdfToEmfConverter() {
|
|||
}
|
||||
|
||||
// static
|
||||
scoped_ptr<PdfToEmfConverter> PdfToEmfConverter::CreateDefault() {
|
||||
return scoped_ptr<PdfToEmfConverter>(new PdfToEmfConverterImpl());
|
||||
std::unique_ptr<PdfToEmfConverter> PdfToEmfConverter::CreateDefault() {
|
||||
return std::unique_ptr<PdfToEmfConverter>(new PdfToEmfConverterImpl());
|
||||
}
|
||||
|
||||
} // namespace printing
|
||||
|
|
|
@ -23,11 +23,11 @@ class PdfToEmfConverter {
|
|||
typedef base::Callback<void(int page_count)> StartCallback;
|
||||
typedef base::Callback<void(int page_number,
|
||||
float scale_factor,
|
||||
scoped_ptr<MetafilePlayer> emf)> GetPageCallback;
|
||||
std::unique_ptr<MetafilePlayer> emf)> GetPageCallback;
|
||||
|
||||
virtual ~PdfToEmfConverter();
|
||||
|
||||
static scoped_ptr<PdfToEmfConverter> CreateDefault();
|
||||
static std::unique_ptr<PdfToEmfConverter> CreateDefault();
|
||||
|
||||
// Starts conversion of PDF provided as |data|. Calls |start_callback|
|
||||
// with positive |page_count|. |page_count| is 0 if initialization failed.
|
||||
|
|
|
@ -133,7 +133,7 @@ void PrintJob::StartPrinting() {
|
|||
make_scoped_refptr(this),
|
||||
base::Bind(&PrintJobWorker::StartPrinting,
|
||||
base::Unretained(worker_.get()),
|
||||
document_)));
|
||||
base::RetainedRef(document_))));
|
||||
// Set the flag right now.
|
||||
is_job_pending_ = true;
|
||||
|
||||
|
@ -267,7 +267,7 @@ class PrintJob::PdfToEmfState {
|
|||
int pages_in_progress_;
|
||||
gfx::Size page_size_;
|
||||
gfx::Rect content_area_;
|
||||
scoped_ptr<PdfToEmfConverter> converter_;
|
||||
std::unique_ptr<PdfToEmfConverter> converter_;
|
||||
};
|
||||
|
||||
void PrintJob::StartPdfToEmfConversion(
|
||||
|
@ -296,7 +296,7 @@ void PrintJob::OnPdfToEmfStarted(int page_count) {
|
|||
|
||||
void PrintJob::OnPdfToEmfPageConverted(int page_number,
|
||||
float scale_factor,
|
||||
scoped_ptr<MetafilePlayer> emf) {
|
||||
std::unique_ptr<MetafilePlayer> emf) {
|
||||
DCHECK(ptd_to_emf_state_);
|
||||
if (!document_.get() || !emf) {
|
||||
ptd_to_emf_state_.reset();
|
||||
|
@ -335,7 +335,7 @@ void PrintJob::UpdatePrintedDocument(PrintedDocument* new_document) {
|
|||
make_scoped_refptr(this),
|
||||
base::Bind(&PrintJobWorker::OnDocumentChanged,
|
||||
base::Unretained(worker_.get()),
|
||||
document_)));
|
||||
base::RetainedRef(document_))));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ class PrintJob : public PrintJobWorkerOwner,
|
|||
void OnPdfToEmfStarted(int page_count);
|
||||
void OnPdfToEmfPageConverted(int page_number,
|
||||
float scale_factor,
|
||||
scoped_ptr<MetafilePlayer> emf);
|
||||
std::unique_ptr<MetafilePlayer> emf);
|
||||
|
||||
#endif // OS_WIN
|
||||
|
||||
|
@ -134,7 +134,7 @@ class PrintJob : public PrintJobWorkerOwner,
|
|||
// All the UI is done in a worker thread because many Win32 print functions
|
||||
// are blocking and enters a message loop without your consent. There is one
|
||||
// worker thread per print job.
|
||||
scoped_ptr<PrintJobWorker> worker_;
|
||||
std::unique_ptr<PrintJobWorker> worker_;
|
||||
|
||||
// Cache of the print context settings for access in the UI thread.
|
||||
PrintSettings settings_;
|
||||
|
@ -151,7 +151,7 @@ class PrintJob : public PrintJobWorkerOwner,
|
|||
|
||||
#if defined(OS_WIN)
|
||||
class PdfToEmfState;
|
||||
scoped_ptr<PdfToEmfState> ptd_to_emf_state_;
|
||||
std::unique_ptr<PdfToEmfState> ptd_to_emf_state_;
|
||||
#endif // OS_WIN
|
||||
|
||||
// Used at shutdown so that we can quit a nested message loop.
|
||||
|
|
|
@ -146,7 +146,7 @@ void PrintJobWorker::GetSettings(
|
|||
}
|
||||
|
||||
void PrintJobWorker::SetSettings(
|
||||
scoped_ptr<base::DictionaryValue> new_settings) {
|
||||
std::unique_ptr<base::DictionaryValue> new_settings) {
|
||||
DCHECK(task_runner_->RunsTasksOnCurrentThread());
|
||||
|
||||
BrowserThread::PostTask(
|
||||
|
@ -160,7 +160,7 @@ void PrintJobWorker::SetSettings(
|
|||
}
|
||||
|
||||
void PrintJobWorker::UpdatePrintSettings(
|
||||
scoped_ptr<base::DictionaryValue> new_settings) {
|
||||
std::unique_ptr<base::DictionaryValue> new_settings) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
PrintingContext::Result result =
|
||||
printing_context_->UpdatePrintSettings(*new_settings);
|
||||
|
@ -338,11 +338,9 @@ void PrintJobWorker::OnDocumentDone() {
|
|||
}
|
||||
|
||||
owner_->PostTask(FROM_HERE,
|
||||
base::Bind(&NotificationCallback,
|
||||
make_scoped_refptr(owner_),
|
||||
base::Bind(&NotificationCallback, base::RetainedRef(owner_),
|
||||
JobEventDetails::DOC_DONE,
|
||||
document_,
|
||||
scoped_refptr<PrintedPage>()));
|
||||
base::RetainedRef(document_), nullptr));
|
||||
|
||||
// Makes sure the variables are reinitialized.
|
||||
document_ = NULL;
|
||||
|
@ -354,11 +352,9 @@ void PrintJobWorker::SpoolPage(PrintedPage* page) {
|
|||
|
||||
// Signal everyone that the page is about to be printed.
|
||||
owner_->PostTask(FROM_HERE,
|
||||
base::Bind(&NotificationCallback,
|
||||
make_scoped_refptr(owner_),
|
||||
JobEventDetails::NEW_PAGE,
|
||||
document_,
|
||||
make_scoped_refptr(page)));
|
||||
base::Bind(&NotificationCallback, base::RetainedRef(owner_),
|
||||
JobEventDetails::NEW_PAGE, base::RetainedRef(document_),
|
||||
base::RetainedRef(page)));
|
||||
|
||||
// Preprocess.
|
||||
if (printing_context_->NewPage() != PrintingContext::OK) {
|
||||
|
@ -380,12 +376,11 @@ void PrintJobWorker::SpoolPage(PrintedPage* page) {
|
|||
}
|
||||
|
||||
// Signal everyone that the page is printed.
|
||||
owner_->PostTask(FROM_HERE,
|
||||
base::Bind(&NotificationCallback,
|
||||
make_scoped_refptr(owner_),
|
||||
JobEventDetails::PAGE_DONE,
|
||||
document_,
|
||||
make_scoped_refptr(page)));
|
||||
owner_->PostTask(
|
||||
FROM_HERE,
|
||||
base::Bind(&NotificationCallback, base::RetainedRef(owner_),
|
||||
JobEventDetails::PAGE_DONE, base::RetainedRef(document_),
|
||||
base::RetainedRef(page)));
|
||||
}
|
||||
|
||||
void PrintJobWorker::OnFailure() {
|
||||
|
@ -394,12 +389,11 @@ void PrintJobWorker::OnFailure() {
|
|||
// We may loose our last reference by broadcasting the FAILED event.
|
||||
scoped_refptr<PrintJobWorkerOwner> handle(owner_);
|
||||
|
||||
owner_->PostTask(FROM_HERE,
|
||||
base::Bind(&NotificationCallback,
|
||||
make_scoped_refptr(owner_),
|
||||
JobEventDetails::FAILED,
|
||||
document_,
|
||||
scoped_refptr<PrintedPage>()));
|
||||
owner_->PostTask(
|
||||
FROM_HERE,
|
||||
base::Bind(&NotificationCallback, base::RetainedRef(owner_),
|
||||
JobEventDetails::FAILED,
|
||||
base::RetainedRef(document_), nullptr));
|
||||
Cancel();
|
||||
|
||||
// Makes sure the variables are reinitialized.
|
||||
|
|
|
@ -48,7 +48,7 @@ class PrintJobWorker {
|
|||
MarginType margin_type);
|
||||
|
||||
// Set the new print settings.
|
||||
void SetSettings(scoped_ptr<base::DictionaryValue> new_settings);
|
||||
void SetSettings(std::unique_ptr<base::DictionaryValue> new_settings);
|
||||
|
||||
// Starts the printing loop. Every pages are printed as soon as the data is
|
||||
// available. Makes sure the new_document is the right one.
|
||||
|
@ -116,7 +116,7 @@ class PrintJobWorker {
|
|||
void GetSettingsWithUIDone(PrintingContext::Result result);
|
||||
|
||||
// Called on the UI thread to update the print settings.
|
||||
void UpdatePrintSettings(scoped_ptr<base::DictionaryValue> new_settings);
|
||||
void UpdatePrintSettings(std::unique_ptr<base::DictionaryValue> new_settings);
|
||||
|
||||
// Reports settings back to owner_.
|
||||
void GetSettingsDone(PrintingContext::Result result);
|
||||
|
@ -127,10 +127,10 @@ class PrintJobWorker {
|
|||
void UseDefaultSettings();
|
||||
|
||||
// Printing context delegate.
|
||||
scoped_ptr<PrintingContext::Delegate> printing_context_delegate_;
|
||||
std::unique_ptr<PrintingContext::Delegate> printing_context_delegate_;
|
||||
|
||||
// Information about the printer setting.
|
||||
scoped_ptr<PrintingContext> printing_context_;
|
||||
std::unique_ptr<PrintingContext> printing_context_;
|
||||
|
||||
// The printed document. Only has read-only access.
|
||||
scoped_refptr<PrintedDocument> document_;
|
||||
|
|
|
@ -43,7 +43,7 @@ void StopWorker(int document_cookie) {
|
|||
char* CopyPDFDataOnIOThread(
|
||||
const PrintHostMsg_DidPreviewDocument_Params& params) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
||||
scoped_ptr<base::SharedMemory> shared_buf(
|
||||
std::unique_ptr<base::SharedMemory> shared_buf(
|
||||
new base::SharedMemory(params.metafile_data_handle, true));
|
||||
if (!shared_buf->Map(params.data_size))
|
||||
return nullptr;
|
||||
|
|
|
@ -132,7 +132,7 @@ void PrintViewManagerBase::OnDidPrintPage(
|
|||
}
|
||||
}
|
||||
|
||||
scoped_ptr<PdfMetafileSkia> metafile(new PdfMetafileSkia);
|
||||
std::unique_ptr<PdfMetafileSkia> metafile(new PdfMetafileSkia);
|
||||
if (metafile_must_be_valid) {
|
||||
if (!metafile->InitFromData(shared_buf.memory(), params.data_size)) {
|
||||
NOTREACHED() << "Invalid metafile header";
|
||||
|
|
|
@ -85,7 +85,7 @@ void PrinterQuery::GetSettings(
|
|||
margin_type));
|
||||
}
|
||||
|
||||
void PrinterQuery::SetSettings(scoped_ptr<base::DictionaryValue> new_settings,
|
||||
void PrinterQuery::SetSettings(std::unique_ptr<base::DictionaryValue> new_settings,
|
||||
const base::Closure& callback) {
|
||||
StartWorker(callback);
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ class PrinterQuery : public PrintJobWorkerOwner {
|
|||
const base::Closure& callback);
|
||||
|
||||
// Updates the current settings with |new_settings| dictionary values.
|
||||
void SetSettings(scoped_ptr<base::DictionaryValue> new_settings,
|
||||
void SetSettings(std::unique_ptr<base::DictionaryValue> new_settings,
|
||||
const base::Closure& callback);
|
||||
|
||||
// Stops the worker thread since the client is done with this object.
|
||||
|
@ -73,7 +73,7 @@ class PrinterQuery : public PrintJobWorkerOwner {
|
|||
// All the UI is done in a worker thread because many Win32 print functions
|
||||
// are blocking and enters a message loop without your consent. There is one
|
||||
// worker thread per print job.
|
||||
scoped_ptr<PrintJobWorker> worker_;
|
||||
std::unique_ptr<PrintJobWorker> worker_;
|
||||
|
||||
// Cache of the print context settings for access in the UI thread.
|
||||
PrintSettings settings_;
|
||||
|
|
|
@ -373,7 +373,7 @@ void PrintingMessageFilter::UpdateFileDescriptor(int render_view_id, int fd) {
|
|||
void PrintingMessageFilter::OnUpdatePrintSettings(
|
||||
int document_cookie, const base::DictionaryValue& job_settings,
|
||||
IPC::Message* reply_msg) {
|
||||
scoped_ptr<base::DictionaryValue> new_settings(job_settings.DeepCopy());
|
||||
std::unique_ptr<base::DictionaryValue> new_settings(job_settings.DeepCopy());
|
||||
|
||||
scoped_refptr<PrinterQuery> printer_query;
|
||||
printer_query = queue_->PopPrinterQuery(document_cookie);
|
||||
|
|
|
@ -29,7 +29,7 @@ ChromeBrowserPepperHostFactory::ChromeBrowserPepperHostFactory(
|
|||
|
||||
ChromeBrowserPepperHostFactory::~ChromeBrowserPepperHostFactory() {}
|
||||
|
||||
scoped_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost(
|
||||
std::unique_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost(
|
||||
ppapi::host::PpapiHost* host,
|
||||
PP_Resource resource,
|
||||
PP_Instance instance,
|
||||
|
@ -38,7 +38,7 @@ scoped_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost(
|
|||
|
||||
// Make sure the plugin is giving us a valid instance for this resource.
|
||||
if (!host_->IsValidInstance(instance))
|
||||
return scoped_ptr<ResourceHost>();
|
||||
return std::unique_ptr<ResourceHost>();
|
||||
|
||||
// Private interfaces.
|
||||
if (host_->GetPpapiHost()->permissions().HasPermission(
|
||||
|
@ -47,7 +47,7 @@ scoped_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost(
|
|||
case PpapiHostMsg_Broker_Create::ID: {
|
||||
scoped_refptr<ResourceMessageFilter> broker_filter(
|
||||
new PepperBrokerMessageFilter(instance, host_));
|
||||
return scoped_ptr<ResourceHost>(new MessageFilterHost(
|
||||
return std::unique_ptr<ResourceHost>(new MessageFilterHost(
|
||||
host_->GetPpapiHost(), instance, resource, broker_filter));
|
||||
}
|
||||
}
|
||||
|
@ -58,16 +58,16 @@ scoped_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost(
|
|||
ppapi::PERMISSION_FLASH)) {
|
||||
switch (message.type()) {
|
||||
case PpapiHostMsg_Flash_Create::ID:
|
||||
return scoped_ptr<ResourceHost>(
|
||||
return std::unique_ptr<ResourceHost>(
|
||||
new PepperFlashBrowserHost(host_, instance, resource));
|
||||
case PpapiHostMsg_FlashClipboard_Create::ID: {
|
||||
scoped_refptr<ResourceMessageFilter> clipboard_filter(
|
||||
new PepperFlashClipboardMessageFilter);
|
||||
return scoped_ptr<ResourceHost>(new MessageFilterHost(
|
||||
return std::unique_ptr<ResourceHost>(new MessageFilterHost(
|
||||
host_->GetPpapiHost(), instance, resource, clipboard_filter));
|
||||
}
|
||||
case PpapiHostMsg_FlashDRM_Create::ID:
|
||||
return scoped_ptr<ResourceHost>(
|
||||
return std::unique_ptr<ResourceHost>(
|
||||
new chrome::PepperFlashDRMHost(host_, instance, resource));
|
||||
}
|
||||
}
|
||||
|
@ -82,12 +82,12 @@ scoped_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost(
|
|||
PepperIsolatedFileSystemMessageFilter* isolated_fs_filter =
|
||||
PepperIsolatedFileSystemMessageFilter::Create(instance, host_);
|
||||
if (!isolated_fs_filter)
|
||||
return scoped_ptr<ResourceHost>();
|
||||
return scoped_ptr<ResourceHost>(
|
||||
return std::unique_ptr<ResourceHost>();
|
||||
return std::unique_ptr<ResourceHost>(
|
||||
new MessageFilterHost(host, instance, resource, isolated_fs_filter));
|
||||
}
|
||||
|
||||
return scoped_ptr<ResourceHost>();
|
||||
return std::unique_ptr<ResourceHost>();
|
||||
}
|
||||
|
||||
} // namespace chrome
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef CHROME_BROWSER_RENDERER_HOST_PEPPER_CHROME_BROWSER_PEPPER_HOST_FACTORY_H_
|
||||
#define CHROME_BROWSER_RENDERER_HOST_PEPPER_CHROME_BROWSER_PEPPER_HOST_FACTORY_H_
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/macros.h"
|
||||
#include "ppapi/host/host_factory.h"
|
||||
|
||||
namespace content {
|
||||
|
@ -20,7 +20,7 @@ class ChromeBrowserPepperHostFactory : public ppapi::host::HostFactory {
|
|||
explicit ChromeBrowserPepperHostFactory(content::BrowserPpapiHost* host);
|
||||
~ChromeBrowserPepperHostFactory() override;
|
||||
|
||||
scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost(
|
||||
std::unique_ptr<ppapi::host::ResourceHost> CreateResourceHost(
|
||||
ppapi::host::PpapiHost* host,
|
||||
PP_Resource resource,
|
||||
PP_Instance instance,
|
||||
|
|
|
@ -240,7 +240,7 @@ class Utterance {
|
|||
|
||||
// The full options arg passed to tts.speak, which may include fields
|
||||
// other than the ones we explicitly parse, below.
|
||||
scoped_ptr<base::Value> options_;
|
||||
std::unique_ptr<base::Value> options_;
|
||||
|
||||
// The extension ID of the extension that called speak() and should
|
||||
// receive events.
|
||||
|
|
|
@ -81,7 +81,7 @@ class TtsPlatformImplLinux : public TtsPlatformImpl {
|
|||
|
||||
// Map a string composed of a voicename and module to the voicename. Used to
|
||||
// uniquely identify a voice across all available modules.
|
||||
scoped_ptr<std::map<std::string, SPDChromeVoice> > all_native_voices_;
|
||||
std::unique_ptr<std::map<std::string, SPDChromeVoice> > all_native_voices_;
|
||||
|
||||
friend struct base::DefaultSingletonTraits<TtsPlatformImplLinux>;
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ void TtsMessageFilter::OnInitializeVoiceList() {
|
|||
void TtsMessageFilter::OnSpeak(const TtsUtteranceRequest& request) {
|
||||
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
||||
|
||||
scoped_ptr<Utterance> utterance(new Utterance(browser_context_));
|
||||
std::unique_ptr<Utterance> utterance(new Utterance(browser_context_));
|
||||
utterance->set_src_id(request.id);
|
||||
utterance->set_text(request.text);
|
||||
utterance->set_lang(request.lang);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue