Fix compilation errors on OS X
This commit is contained in:
parent
4503aafe64
commit
5fae63a2f5
93 changed files with 242 additions and 317 deletions
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
|
||||
namespace printing {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <map>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/macros.h"
|
||||
#include "ui/events/keycodes/keyboard_codes.h"
|
||||
|
||||
namespace ui {
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#ifndef CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_H_
|
||||
#define CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "base/time/time.h"
|
||||
#include "content/public/browser/desktop_media_id.h"
|
||||
|
|
|
@ -34,7 +34,7 @@ const int kDefaultUpdatePeriod = 1000;
|
|||
|
||||
// Returns a hash of a DesktopFrame content to detect when image for a desktop
|
||||
// media source has changed.
|
||||
uint32 GetFrameHash(webrtc::DesktopFrame* frame) {
|
||||
uint32_t GetFrameHash(webrtc::DesktopFrame* frame) {
|
||||
int data_size = frame->stride() * frame->size().height();
|
||||
return base::SuperFastHash(reinterpret_cast<char*>(frame->data()), data_size);
|
||||
}
|
||||
|
@ -117,8 +117,8 @@ NativeDesktopMediaList::Worker::Worker(
|
|||
scoped_ptr<webrtc::ScreenCapturer> screen_capturer,
|
||||
scoped_ptr<webrtc::WindowCapturer> window_capturer)
|
||||
: media_list_(media_list),
|
||||
screen_capturer_(screen_capturer.Pass()),
|
||||
window_capturer_(window_capturer.Pass()) {
|
||||
screen_capturer_(std::move(screen_capturer)),
|
||||
window_capturer_(std::move(window_capturer)) {
|
||||
if (screen_capturer_)
|
||||
screen_capturer_->Start(this);
|
||||
if (window_capturer_)
|
||||
|
@ -195,14 +195,14 @@ void NativeDesktopMediaList::Worker::Refresh(
|
|||
// |current_frame_| may be NULL if capture failed (e.g. because window has
|
||||
// been closed).
|
||||
if (current_frame_) {
|
||||
uint32 frame_hash = GetFrameHash(current_frame_.get());
|
||||
uint32_t frame_hash = GetFrameHash(current_frame_.get());
|
||||
new_image_hashes[source.id] = frame_hash;
|
||||
|
||||
// Scale the image only if it has changed.
|
||||
ImageHashesMap::iterator it = image_hashes_.find(source.id);
|
||||
if (it == image_hashes_.end() || it->second != frame_hash) {
|
||||
gfx::ImageSkia thumbnail =
|
||||
ScaleDesktopFrame(current_frame_.Pass(), thumbnail_size);
|
||||
ScaleDesktopFrame(std::move(current_frame_), thumbnail_size);
|
||||
BrowserThread::PostTask(
|
||||
BrowserThread::UI, FROM_HERE,
|
||||
base::Bind(&NativeDesktopMediaList::OnSourceThumbnail,
|
||||
|
@ -231,8 +231,8 @@ void NativeDesktopMediaList::Worker::OnCaptureCompleted(
|
|||
NativeDesktopMediaList::NativeDesktopMediaList(
|
||||
scoped_ptr<webrtc::ScreenCapturer> screen_capturer,
|
||||
scoped_ptr<webrtc::WindowCapturer> window_capturer)
|
||||
: screen_capturer_(screen_capturer.Pass()),
|
||||
window_capturer_(window_capturer.Pass()),
|
||||
: screen_capturer_(std::move(screen_capturer)),
|
||||
window_capturer_(std::move(window_capturer)),
|
||||
update_period_(base::TimeDelta::FromMilliseconds(kDefaultUpdatePeriod)),
|
||||
thumbnail_size_(100, 100),
|
||||
view_dialog_id_(-1),
|
||||
|
@ -269,7 +269,8 @@ void NativeDesktopMediaList::StartUpdating(DesktopMediaListObserver* observer) {
|
|||
observer_ = observer;
|
||||
|
||||
worker_.reset(new Worker(weak_factory_.GetWeakPtr(),
|
||||
screen_capturer_.Pass(), window_capturer_.Pass()));
|
||||
std::move(screen_capturer_),
|
||||
std::move(window_capturer_)));
|
||||
Refresh();
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#ifndef CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_H_
|
||||
#define CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/sequenced_task_runner.h"
|
||||
|
|
|
@ -256,7 +256,7 @@ void LazyEmf::Close() const {
|
|||
|
||||
bool LazyEmf::LoadEmf(Emf* emf) const {
|
||||
file_->Seek(base::File::FROM_BEGIN, 0);
|
||||
int64 size = file_->GetLength();
|
||||
int64_t size = file_->GetLength();
|
||||
if (size <= 0)
|
||||
return false;
|
||||
std::vector<char> data(size);
|
||||
|
|
|
@ -441,7 +441,7 @@ void PrintJob::HoldUntilStopIsCalled() {
|
|||
}
|
||||
|
||||
void PrintJob::Quit() {
|
||||
base::MessageLoop::current()->Quit();
|
||||
base::MessageLoop::current()->QuitWhenIdle();
|
||||
}
|
||||
|
||||
// Takes settings_ ownership and will be deleted in the receiving thread.
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_H_
|
||||
#define CHROME_BROWSER_PRINTING_PRINT_JOB_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
|
|
|
@ -118,7 +118,7 @@ void PrintPreviewMessageHandler::PrintToPDF(
|
|||
}
|
||||
|
||||
void PrintPreviewMessageHandler::RunPrintToPDFCallback(
|
||||
int request_id, uint32 data_size, char* data) {
|
||||
int request_id, uint32_t data_size, char* data) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
|
||||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||
|
|
|
@ -47,7 +47,7 @@ class PrintPreviewMessageHandler
|
|||
const PrintHostMsg_DidPreviewDocument_Params& params);
|
||||
void OnPrintPreviewFailed(int document_cookie, int request_id);
|
||||
|
||||
void RunPrintToPDFCallback(int request_id, uint32 data_size, char* data);
|
||||
void RunPrintToPDFCallback(int request_id, uint32_t data_size, char* data);
|
||||
|
||||
PrintToPDFCallbackMap print_to_pdf_callback_map_;
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ void PrintViewManagerBase::OnDidPrintPage(
|
|||
#if !defined(OS_WIN)
|
||||
// Update the rendered document. It will send notifications to the listener.
|
||||
document->SetPage(params.page_number,
|
||||
metafile.Pass(),
|
||||
std::move(metafile),
|
||||
params.page_size,
|
||||
params.content_area);
|
||||
|
||||
|
@ -305,7 +305,7 @@ void PrintViewManagerBase::ShouldQuitFromInnerMessageLoop() {
|
|||
inside_inner_message_loop_) {
|
||||
// We are in a message loop created by RenderAllMissingPagesNow. Quit from
|
||||
// it.
|
||||
base::MessageLoop::current()->Quit();
|
||||
base::MessageLoop::current()->QuitWhenIdle();
|
||||
inside_inner_message_loop_ = false;
|
||||
}
|
||||
}
|
||||
|
@ -411,9 +411,9 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
|||
// memory-bound.
|
||||
static const int kPrinterSettingsTimeout = 60000;
|
||||
base::OneShotTimer quit_timer;
|
||||
quit_timer.Start(FROM_HERE,
|
||||
TimeDelta::FromMilliseconds(kPrinterSettingsTimeout),
|
||||
base::MessageLoop::current(), &base::MessageLoop::Quit);
|
||||
quit_timer.Start(
|
||||
FROM_HERE, TimeDelta::FromMilliseconds(kPrinterSettingsTimeout),
|
||||
base::MessageLoop::current(), &base::MessageLoop::QuitWhenIdle);
|
||||
|
||||
inside_inner_message_loop_ = true;
|
||||
|
||||
|
|
|
@ -394,7 +394,7 @@ void PrintingMessageFilter::OnUpdatePrintSettings(
|
|||
printer_query = queue_->CreatePrinterQuery(host_id, routing_id);
|
||||
}
|
||||
printer_query->SetSettings(
|
||||
new_settings.Pass(),
|
||||
std::move(new_settings),
|
||||
base::Bind(&PrintingMessageFilter::OnUpdatePrintSettingsReply, this,
|
||||
printer_query, reply_msg));
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ class PrintingMessageFilter : public content::BrowserMessageFilter {
|
|||
|
||||
#if defined(ENABLE_FULL_PRINTING)
|
||||
// Check to see if print preview has been cancelled.
|
||||
void OnCheckForCancel(int32 preview_ui_id,
|
||||
void OnCheckForCancel(int32_t preview_ui_id,
|
||||
int preview_request_id,
|
||||
bool* cancel);
|
||||
#endif
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#ifndef CHROME_BROWSER_PRINTING_PRINTING_UI_WEB_CONTENTS_OBSERVER_H_
|
||||
#define CHROME_BROWSER_PRINTING_PRINTING_UI_WEB_CONTENTS_OBSERVER_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "content/public/browser/web_contents_observer.h"
|
||||
#include "ui/gfx/native_widget_types.h"
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/callback.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/files/file_path.h"
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
|
||||
#include "atom/common/atom_command_line.h"
|
||||
#include "base/base_paths.h"
|
||||
#include "base/basictypes.h"
|
||||
#include "base/bind.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/files/file_path.h"
|
||||
|
@ -75,6 +74,7 @@
|
|||
#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/thread_task_runner_handle.h"
|
||||
#include "base/threading/platform_thread.h"
|
||||
#include "base/time/time.h"
|
||||
#include "base/timer/timer.h"
|
||||
|
@ -222,7 +222,7 @@ int SetupSocketOnly() {
|
|||
int sock = socket(PF_UNIX, SOCK_STREAM, 0);
|
||||
PCHECK(sock >= 0) << "socket() failed";
|
||||
|
||||
int rv = net::SetNonBlocking(sock);
|
||||
int rv = base::SetNonBlocking(sock);
|
||||
DCHECK_EQ(0, rv) << "Failed to make non-blocking socket.";
|
||||
rv = SetCloseOnExec(sock);
|
||||
DCHECK_EQ(0, rv) << "Failed to set CLOEXEC on socket.";
|
||||
|
@ -577,7 +577,7 @@ void ProcessSingleton::LinuxWatcher::OnFileCanReadWithoutBlocking(int fd) {
|
|||
PLOG(ERROR) << "accept() failed";
|
||||
return;
|
||||
}
|
||||
int rv = net::SetNonBlocking(connection_socket);
|
||||
int rv = base::SetNonBlocking(connection_socket);
|
||||
DCHECK_EQ(0, rv) << "Failed to make non-blocking socket.";
|
||||
SocketReader* reader = new SocketReader(this,
|
||||
ui_message_loop_,
|
||||
|
@ -990,8 +990,8 @@ bool ProcessSingleton::Create() {
|
|||
// In Electron the ProcessSingleton is created earlier than the IO
|
||||
// thread gets created, so we have to postpone the call until message
|
||||
// loop is up an running.
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner(
|
||||
base::ThreadTaskRunnerHandle::Get());
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner =
|
||||
base::ThreadTaskRunnerHandle::Get();
|
||||
task_runner->PostTask(
|
||||
FROM_HERE,
|
||||
base::Bind(&ProcessSingleton::StartListening,
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#ifndef CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_
|
||||
#define CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "ppapi/host/host_message_context.h"
|
||||
|
|
|
@ -240,8 +240,8 @@ int32_t PepperFlashClipboardMessageFilter::OnMsgReadData(
|
|||
|
||||
base::string16 html;
|
||||
std::string url;
|
||||
uint32 fragment_start;
|
||||
uint32 fragment_end;
|
||||
uint32_t fragment_start;
|
||||
uint32_t fragment_end;
|
||||
clipboard->ReadHTML(type, &html, &url, &fragment_start, &fragment_end);
|
||||
result = PP_OK;
|
||||
clipboard_string = base::UTF16ToUTF8(
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "ppapi/host/resource_message_filter.h"
|
||||
#include "ppapi/shared_impl/flash_clipboard_format_registry.h"
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ ColorChooserMac::ColorChooserMac(content::WebContents* web_contents,
|
|||
SkColor initial_color)
|
||||
: web_contents_(web_contents) {
|
||||
panel_.reset([[ColorPanelCocoa alloc] initWithChooser:this]);
|
||||
[panel_ setColor:gfx::SkColorToDeviceNSColor(initial_color)];
|
||||
[panel_ setColor:skia::SkColorToDeviceNSColor(initial_color)];
|
||||
[[NSColorPanel sharedColorPanel] makeKeyAndOrderFront:nil];
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ void ColorChooserMac::End() {
|
|||
}
|
||||
|
||||
void ColorChooserMac::SetSelectedColor(SkColor color) {
|
||||
[panel_ setColor:gfx::SkColorToDeviceNSColor(color)];
|
||||
[panel_ setColor:skia::SkColorToDeviceNSColor(color)];
|
||||
}
|
||||
|
||||
@implementation ColorPanelCocoa
|
||||
|
@ -139,7 +139,7 @@ void ColorChooserMac::SetSelectedColor(SkColor color) {
|
|||
nonUserChange_ = NO;
|
||||
return;
|
||||
}
|
||||
chooser_->DidChooseColorInColorPanel(gfx::NSDeviceColorToSkColor(
|
||||
chooser_->DidChooseColorInColorPanel(skia::NSDeviceColorToSkColor(
|
||||
[[panel color] colorUsingColorSpaceName:NSDeviceRGBColorSpace]));
|
||||
nonUserChange_ = NO;
|
||||
}
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#ifndef CHROME_BROWSER_UI_VIEWS_COLOR_CHOOSER_AURA_H_
|
||||
#define CHROME_BROWSER_UI_VIEWS_COLOR_CHOOSER_AURA_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "content/public/browser/color_chooser.h"
|
||||
#include "ui/views/color_chooser/color_chooser_listener.h"
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include <set>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/singleton.h"
|
||||
#include "ui/base/glib/glib_signal.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue