Fix building on Windows
This commit is contained in:
parent
af212a9f67
commit
6e0762a540
5 changed files with 22 additions and 9 deletions
|
@ -23,7 +23,7 @@ void AtomMenuModel::SetRole(int index, const base::string16& role) {
|
||||||
|
|
||||||
base::string16 AtomMenuModel::GetRoleAt(int index) {
|
base::string16 AtomMenuModel::GetRoleAt(int index) {
|
||||||
int command_id = GetCommandIdAt(index);
|
int command_id = GetCommandIdAt(index);
|
||||||
if (ContainsKey(roles_, command_id))
|
if (base::ContainsKey(roles_, command_id))
|
||||||
return roles_[command_id];
|
return roles_[command_id];
|
||||||
else
|
else
|
||||||
return base::string16();
|
return base::string16();
|
||||||
|
|
|
@ -87,7 +87,8 @@ NotifyIconHost::~NotifyIconHost() {
|
||||||
UnregisterClass(MAKEINTATOM(atom_), instance_);
|
UnregisterClass(MAKEINTATOM(atom_), instance_);
|
||||||
|
|
||||||
NotifyIcons copied_container(notify_icons_);
|
NotifyIcons copied_container(notify_icons_);
|
||||||
STLDeleteContainerPointers(copied_container.begin(), copied_container.end());
|
base::STLDeleteContainerPointers(
|
||||||
|
copied_container.begin(), copied_container.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
NotifyIcon* NotifyIconHost::CreateNotifyIcon() {
|
NotifyIcon* NotifyIconHost::CreateNotifyIcon() {
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "base/files/file_util.h"
|
#include "base/files/file_util.h"
|
||||||
#include "base/files/scoped_temp_dir.h"
|
#include "base/files/scoped_temp_dir.h"
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
|
#include "base/memory/ptr_util.h"
|
||||||
#include "chrome/common/chrome_utility_messages.h"
|
#include "chrome/common/chrome_utility_messages.h"
|
||||||
#include "chrome/common/print_messages.h"
|
#include "chrome/common/print_messages.h"
|
||||||
#include "content/public/browser/browser_thread.h"
|
#include "content/public/browser/browser_thread.h"
|
||||||
|
@ -59,10 +60,11 @@ class LazyEmf : public MetafilePlayer {
|
||||||
public:
|
public:
|
||||||
LazyEmf(const scoped_refptr<RefCountedTempDir>& temp_dir, ScopedTempFile file)
|
LazyEmf(const scoped_refptr<RefCountedTempDir>& temp_dir, ScopedTempFile file)
|
||||||
: temp_dir_(temp_dir), file_(std::move(file)) {}
|
: temp_dir_(temp_dir), file_(std::move(file)) {}
|
||||||
virtual ~LazyEmf() { Close(); }
|
~LazyEmf() override { Close(); }
|
||||||
|
|
||||||
virtual bool SafePlayback(HDC hdc) const override;
|
bool SafePlayback(HDC hdc) const override;
|
||||||
virtual bool SaveTo(base::File* file) const override;
|
bool GetDataAsVector(std::vector<char>* buffer) const override;
|
||||||
|
bool SaveTo(base::File* file) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Close() const;
|
void Close() const;
|
||||||
|
@ -242,6 +244,11 @@ bool LazyEmf::SafePlayback(HDC hdc) const {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LazyEmf::GetDataAsVector(std::vector<char>* buffer) const {
|
||||||
|
NOTREACHED();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool LazyEmf::SaveTo(base::File* file) const {
|
bool LazyEmf::SaveTo(base::File* file) const {
|
||||||
Emf emf;
|
Emf emf;
|
||||||
return LoadEmf(&emf) && emf.SaveTo(file);
|
return LoadEmf(&emf) && emf.SaveTo(file);
|
||||||
|
@ -392,7 +399,7 @@ void PdfToEmfUtilityProcessHostClient::OnPageDone(bool success,
|
||||||
ScopedTempFile temp_emf = data.TakeEmf();
|
ScopedTempFile temp_emf = data.TakeEmf();
|
||||||
if (!temp_emf) // Unexpected message from utility process.
|
if (!temp_emf) // Unexpected message from utility process.
|
||||||
return OnFailed();
|
return OnFailed();
|
||||||
emf.reset(new LazyEmf(temp_dir_, std::move(temp_emf)));
|
emf = base::MakeUnique<LazyEmf>(temp_dir_, std::move(temp_emf));
|
||||||
}
|
}
|
||||||
|
|
||||||
BrowserThread::PostTask(BrowserThread::UI,
|
BrowserThread::PostTask(BrowserThread::UI,
|
||||||
|
|
|
@ -147,8 +147,13 @@
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'<(DEPTH)/atom/node',
|
'<(DEPTH)/atom/node',
|
||||||
],
|
],
|
||||||
# Node is using networking API but linking with this itself.
|
'libraries': [
|
||||||
'libraries': [ '-lwinmm.lib' ],
|
# Node is using networking API but linking with this itself.
|
||||||
|
'-lwinmm.lib',
|
||||||
|
# Needed by V8.
|
||||||
|
'-ldbghelp.lib',
|
||||||
|
'-lshlwapi.lib',
|
||||||
|
],
|
||||||
# Fix the linking error with icu.
|
# Fix the linking error with icu.
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['libchromiumcontent_component==0', {
|
['libchromiumcontent_component==0', {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import sys
|
||||||
BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \
|
BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \
|
||||||
'https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent'
|
'https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent'
|
||||||
LIBCHROMIUMCONTENT_COMMIT = os.getenv('LIBCHROMIUMCONTENT_COMMIT') or \
|
LIBCHROMIUMCONTENT_COMMIT = os.getenv('LIBCHROMIUMCONTENT_COMMIT') or \
|
||||||
'76202a5422125cf6b46fef025db5f0aa91b0bb85'
|
'9e3432b3413a7a1d08678ac86b23b6ba2c252bdc'
|
||||||
|
|
||||||
PLATFORM = {
|
PLATFORM = {
|
||||||
'cygwin': 'win32',
|
'cygwin': 'win32',
|
||||||
|
|
Loading…
Reference in a new issue