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"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "chrome/common/print_messages.h"
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "ui/gfx/geometry/size.h"
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params)
|
|||
IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle)
|
||||
|
||||
// Size of the metafile data.
|
||||
IPC_STRUCT_MEMBER(uint32, data_size)
|
||||
IPC_STRUCT_MEMBER(uint32_t, data_size)
|
||||
|
||||
// Cookie for the document to ensure correctness.
|
||||
IPC_STRUCT_MEMBER(int, document_cookie)
|
||||
|
@ -193,7 +193,7 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewDocument_Params)
|
|||
IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle)
|
||||
|
||||
// Size of metafile data.
|
||||
IPC_STRUCT_MEMBER(uint32, data_size)
|
||||
IPC_STRUCT_MEMBER(uint32_t, data_size)
|
||||
|
||||
// Cookie for the document to ensure correctness.
|
||||
IPC_STRUCT_MEMBER(int, document_cookie)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/strings/string16.h"
|
||||
|
||||
struct TtsUtteranceRequest {
|
||||
|
@ -41,4 +41,4 @@ struct TtsUtteranceResponse {
|
|||
int id;
|
||||
};
|
||||
|
||||
#endif // CHROME_COMMON_TTS_UTTERANCE_REQUEST_H_
|
||||
#endif // CHROME_COMMON_TTS_UTTERANCE_REQUEST_H_
|
||||
|
|
|
@ -12,5 +12,5 @@ const base::FilePath::CharType kWidevineCdmBaseDirectory[] =
|
|||
|
||||
const char kWidevineCdmPluginExtension[] = "";
|
||||
|
||||
const int32 kWidevineCdmPluginPermissions = ppapi::PERMISSION_DEV |
|
||||
ppapi::PERMISSION_PRIVATE;
|
||||
const int32_t kWidevineCdmPluginPermissions = ppapi::PERMISSION_DEV |
|
||||
ppapi::PERMISSION_PRIVATE;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef CHROME_COMMON_WIDEVINE_CDM_CONSTANTS_H_
|
||||
#define CHROME_COMMON_WIDEVINE_CDM_CONSTANTS_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/files/file_path.h"
|
||||
|
||||
// The Widevine CDM adapter and Widevine CDM are in this directory.
|
||||
|
@ -14,6 +14,6 @@ extern const base::FilePath::CharType kWidevineCdmBaseDirectory[];
|
|||
extern const char kWidevineCdmPluginExtension[];
|
||||
|
||||
// Permission bits for Widevine CDM plugin.
|
||||
extern const int32 kWidevineCdmPluginPermissions;
|
||||
extern const int32_t kWidevineCdmPluginPermissions;
|
||||
|
||||
#endif // CHROME_COMMON_WIDEVINE_CDM_CONSTANTS_H_
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#ifndef CHROME_RENDERER_PEPPER_CHROME_RENDERER_PEPPER_HOST_FACTORY_H_
|
||||
#define CHROME_RENDERER_PEPPER_CHROME_RENDERER_PEPPER_HOST_FACTORY_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "ppapi/host/host_factory.h"
|
||||
|
||||
namespace content {
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#ifndef CHROME_RENDERER_PEPPER_PEPPER_FLASH_FONT_FILE_HOST_H_
|
||||
#define CHROME_RENDERER_PEPPER_PEPPER_FLASH_FONT_FILE_HOST_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "ppapi/c/private/pp_private_font_charset.h"
|
||||
#include "ppapi/host/resource_host.h"
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#ifndef CHROME_RENDERER_PEPPER_PEPPER_FLASH_FULLSCREEN_HOST_H_
|
||||
#define CHROME_RENDERER_PEPPER_PEPPER_FLASH_FULLSCREEN_HOST_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "ppapi/host/resource_host.h"
|
||||
|
||||
namespace content {
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "ppapi/host/host_message_context.h"
|
||||
#include "ppapi/host/resource_host.h"
|
||||
|
|
|
@ -43,9 +43,8 @@ void PepperSharedMemoryMessageFilter::OnHostMsgCreateSharedMemory(
|
|||
ppapi::proxy::SerializedHandle* plugin_handle) {
|
||||
plugin_handle->set_null_shmem();
|
||||
*host_handle_id = -1;
|
||||
scoped_ptr<base::SharedMemory> shm(content::RenderThread::Get()
|
||||
->HostAllocateSharedMemoryBuffer(size)
|
||||
.Pass());
|
||||
scoped_ptr<base::SharedMemory> shm(
|
||||
content::RenderThread::Get()->HostAllocateSharedMemoryBuffer(size));
|
||||
if (!shm.get())
|
||||
return;
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#ifndef CHROME_RENDERER_PEPPER_PEPPER_SHARED_MEMORY_MESSAGE_FILTER_H_
|
||||
#define CHROME_RENDERER_PEPPER_PEPPER_SHARED_MEMORY_MESSAGE_FILTER_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "ppapi/c/pp_instance.h"
|
||||
#include "ppapi/host/instance_message_filter.h"
|
||||
|
||||
|
|
|
@ -415,22 +415,19 @@ class PrepareFrameAndViewForPrint : public blink::WebViewClient,
|
|||
return owns_web_view_ && frame() && frame()->isLoading();
|
||||
}
|
||||
|
||||
// TODO(ojan): Remove this override and have this class use a non-null
|
||||
// layerTreeView.
|
||||
// blink::WebViewClient override:
|
||||
virtual bool allowsBrokenNullLayerTreeView() const;
|
||||
|
||||
protected:
|
||||
// blink::WebViewClient override:
|
||||
virtual void didStopLoading();
|
||||
void didStopLoading() override;
|
||||
bool allowsBrokenNullLayerTreeView() const override;
|
||||
|
||||
// blink::WebFrameClient override:
|
||||
virtual blink::WebFrame* createChildFrame(
|
||||
// blink::WebFrameClient:
|
||||
blink::WebFrame* createChildFrame(
|
||||
blink::WebLocalFrame* parent,
|
||||
blink::WebTreeScopeType scope,
|
||||
const blink::WebString& name,
|
||||
blink::WebSandboxFlags sandboxFlags);
|
||||
virtual void frameDetached(blink::WebFrame* frame, DetachType type);
|
||||
blink::WebSandboxFlags sandboxFlags,
|
||||
const blink::WebFrameOwnerProperties& frameOwnerProperties) override;
|
||||
void frameDetached(blink::WebFrame* frame, DetachType type) override;
|
||||
|
||||
private:
|
||||
void CallOnReady();
|
||||
|
@ -576,7 +573,8 @@ blink::WebFrame* PrepareFrameAndViewForPrint::createChildFrame(
|
|||
blink::WebLocalFrame* parent,
|
||||
blink::WebTreeScopeType scope,
|
||||
const blink::WebString& name,
|
||||
blink::WebSandboxFlags sandboxFlags) {
|
||||
blink::WebSandboxFlags sandboxFlags,
|
||||
const blink::WebFrameOwnerProperties& frameOwnerProperties) {
|
||||
blink::WebFrame* frame = blink::WebLocalFrame::create(scope, this);
|
||||
parent->appendChild(frame);
|
||||
return frame;
|
||||
|
@ -814,7 +812,7 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
|
|||
|
||||
// Get the size of the resulting metafile.
|
||||
PdfMetafileSkia* metafile = print_preview_context_.metafile();
|
||||
uint32 buf_size = metafile->GetDataSize();
|
||||
uint32_t buf_size = metafile->GetDataSize();
|
||||
DCHECK_GT(buf_size, 0u);
|
||||
|
||||
PrintHostMsg_DidPreviewDocument_Params preview_params;
|
||||
|
@ -1164,7 +1162,7 @@ bool PrintWebViewHelper::RenderPagesForPrint(blink::WebLocalFrame* frame,
|
|||
bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
|
||||
PdfMetafileSkia* metafile,
|
||||
base::SharedMemoryHandle* shared_mem_handle) {
|
||||
uint32 buf_size = metafile->GetDataSize();
|
||||
uint32_t buf_size = metafile->GetDataSize();
|
||||
scoped_ptr<base::SharedMemory> shared_buf(
|
||||
content::RenderThread::Get()->HostAllocateSharedMemoryBuffer(
|
||||
buf_size).release());
|
||||
|
|
|
@ -92,7 +92,7 @@ bool PrintWebViewHelper::PrintPagesNative(blink::WebFrame* frame,
|
|||
metafile.FinishDocument();
|
||||
|
||||
// Get the size of the resulting metafile.
|
||||
uint32 buf_size = metafile.GetDataSize();
|
||||
uint32_t buf_size = metafile.GetDataSize();
|
||||
DCHECK_GT(buf_size, 0u);
|
||||
|
||||
#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
|
||||
|
|
|
@ -116,15 +116,13 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
|
|||
gfx::Rect canvas_area = content_area;
|
||||
|
||||
{
|
||||
skia::PlatformCanvas* canvas = metafile->GetVectorCanvasForNewPage(
|
||||
SkCanvas* canvas = metafile->GetVectorCanvasForNewPage(
|
||||
*page_size, canvas_area, scale_factor);
|
||||
if (!canvas)
|
||||
return;
|
||||
|
||||
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
|
||||
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
|
||||
skia::SetIsPreviewMetafile(*canvas, is_preview);
|
||||
|
||||
RenderPageContent(frame, page_number, canvas_area, content_area,
|
||||
scale_factor, static_cast<blink::WebCanvas*>(canvas));
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ bool PrintWebViewHelper::PrintPagesNative(blink::WebFrame* frame,
|
|||
metafile.FinishDocument();
|
||||
|
||||
// Get the size of the resulting metafile.
|
||||
uint32 buf_size = metafile.GetDataSize();
|
||||
uint32_t buf_size = metafile.GetDataSize();
|
||||
DCHECK_GT(buf_size, 0u);
|
||||
|
||||
PrintHostMsg_DidPrintPage_Params printed_page_params;
|
||||
|
@ -218,7 +218,7 @@ void PrintWebViewHelper::PrintPageInternal(
|
|||
bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
|
||||
PdfMetafileSkia* metafile,
|
||||
base::SharedMemoryHandle* shared_mem_handle) {
|
||||
uint32 buf_size = metafile->GetDataSize();
|
||||
uint32_t buf_size = metafile->GetDataSize();
|
||||
base::SharedMemory shared_buf;
|
||||
// Allocate a shared memory buffer to hold the generated metafile data.
|
||||
if (!shared_buf.CreateAndMapAnonymous(buf_size)) {
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/i18n/break_iterator.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
|
@ -332,7 +331,7 @@ bool SpellcheckWordIterator::Initialize(
|
|||
NOTREACHED() << "failed to open iterator (broken rules)";
|
||||
return false;
|
||||
}
|
||||
iterator_ = iterator.Pass();
|
||||
iterator_ = std::move(iterator);
|
||||
|
||||
// Set the character attributes so we can normalize the words extracted by
|
||||
// this iterator.
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "third_party/icu/source/common/unicode/uscript.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "chrome/renderer/tts_dispatcher.h"
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chrome/common/tts_messages.h"
|
||||
#include "chrome/common/tts_utterance_request.h"
|
||||
|
@ -197,4 +196,4 @@ void TtsDispatcher::OnSpeakingErrorOccurred(int utterance_id,
|
|||
// The web speech API doesn't support an error message.
|
||||
synthesizer_client_->speakingErrorOccurred(utterance);
|
||||
utterance_id_map_.erase(utterance_id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/containers/hash_tables.h"
|
||||
#include "content/public/renderer/render_process_observer.h"
|
||||
#include "third_party/WebKit/public/platform/WebSpeechSynthesizer.h"
|
||||
|
@ -75,4 +73,4 @@ class TtsDispatcher
|
|||
DISALLOW_COPY_AND_ASSIGN(TtsDispatcher);
|
||||
};
|
||||
|
||||
#endif // CHROME_RENDERER_TTS_DISPATCHER_H_
|
||||
#endif // CHROME_RENDERER_TTS_DISPATCHER_H_
|
||||
|
|
|
@ -177,7 +177,7 @@ int PrintingHandlerWin::LoadPDF(base::File pdf_file) {
|
|||
if (!g_pdf_lib.Get().IsValid())
|
||||
return 0;
|
||||
|
||||
int64 length64 = pdf_file.GetLength();
|
||||
int64_t length64 = pdf_file.GetLength();
|
||||
if (length64 <= 0 || length64 > std::numeric_limits<int>::max())
|
||||
return 0;
|
||||
int length = static_cast<int>(length64);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue