Make all the windows code compile for Chrome 31.
This commit is contained in:
parent
6e079d8bc4
commit
0215c2fbee
13 changed files with 47 additions and 46 deletions
|
@ -23,17 +23,20 @@ AtomMainDelegate::~AtomMainDelegate() {
|
|||
bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||
// Disable logging out to debug.log on Windows
|
||||
#if defined(OS_WIN)
|
||||
logging::InitLogging(
|
||||
L"debug.log",
|
||||
logging::LoggingSettings settings;
|
||||
#if defined(DEBUG)
|
||||
logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG ,
|
||||
settings.logging_dest = logging::LOG_TO_ALL;
|
||||
settings.log_file = L"debug.log";
|
||||
settings.lock_log = logging::LOCK_LOG_FILE;
|
||||
settings.delete_old = logging::DELETE_OLD_LOG_FILE;
|
||||
#else
|
||||
logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
|
||||
#endif // defined(NDEBUG)
|
||||
logging::LOCK_LOG_FILE,
|
||||
logging::DELETE_OLD_LOG_FILE,
|
||||
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
|
||||
logging::SetLogItems(true, false, true, false);
|
||||
settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
|
||||
#endif
|
||||
settings.dcheck_state =
|
||||
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
|
||||
logging::InitLogging(settings);
|
||||
// Logging with pid, tid and timestamp.
|
||||
logging::SetLogItems(true, true, true, false);
|
||||
#endif // defined(OS_WIN)
|
||||
|
||||
return brightray::MainDelegate::BasicStartupComplete(exit_code);
|
||||
|
|
|
@ -8,10 +8,7 @@
|
|||
#include "browser/auto_updater.h"
|
||||
#include "common/v8/native_type_conversions.h"
|
||||
|
||||
#undef CHECK
|
||||
#undef DISALLOW_COPY_AND_ASSIGN
|
||||
#include "vendor/node/src/node.h"
|
||||
#include "vendor/node/src/node_internals.h"
|
||||
#include "common/v8/node_common.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
#include "content/public/browser/render_process_host.h"
|
||||
#include "ui/gfx/point.h"
|
||||
#include "ui/gfx/size.h"
|
||||
#include "vendor/node/src/node_buffer.h"
|
||||
|
||||
#include "common/v8/node_common.h"
|
||||
#include "vendor/node/src/node_buffer.h"
|
||||
|
||||
using content::NavigationController;
|
||||
using node::ObjectWrap;
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
|
||||
#include "base/file_util.h"
|
||||
#include "base/i18n/case_conversion.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/win/registry.h"
|
||||
#include "browser/native_window.h"
|
||||
#include "third_party/wtl/include/atlapp.h"
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
#include "browser/ui/message_box.h"
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/message_loop.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "browser/native_window.h"
|
||||
#include "skia/ext/skia_utils_win.h"
|
||||
#include "ui/views/controls/button/label_button.h"
|
||||
|
|
|
@ -8,22 +8,22 @@
|
|||
|
||||
#include "base/bind.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/message_loop.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "base/stl_util.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/win/wrapped_window_proc.h"
|
||||
#include "browser/ui/win/menu_2.h"
|
||||
#include "ui/base/accelerators/accelerator.h"
|
||||
#include "ui/base/keycodes/keyboard_codes.h"
|
||||
#include "ui/events/keycodes/keyboard_codes.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/l10n/l10n_util_win.h"
|
||||
#include "ui/base/models/menu_model.h"
|
||||
#include "ui/base/win/hwnd_util.h"
|
||||
#include "ui/gfx/canvas.h"
|
||||
#include "ui/gfx/font.h"
|
||||
#include "ui/gfx/image/image.h"
|
||||
#include "ui/gfx/image/image_skia.h"
|
||||
#include "ui/gfx/rect.h"
|
||||
#include "ui/gfx/win/hwnd_util.h"
|
||||
#include "ui/native_theme/native_theme.h"
|
||||
#include "ui/native_theme/native_theme_win.h"
|
||||
#include "ui/views/controls/menu/menu_config.h"
|
||||
|
@ -84,8 +84,8 @@ class NativeMenuWin::MenuHostWindow {
|
|||
RegisterClass();
|
||||
hwnd_ = CreateWindowEx(l10n_util::GetExtendedStyles(), kWindowClassName,
|
||||
L"", 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL);
|
||||
ui::CheckWindowCreated(hwnd_);
|
||||
ui::SetWindowUserData(hwnd_, this);
|
||||
gfx::CheckWindowCreated(hwnd_);
|
||||
gfx::SetWindowUserData(hwnd_, this);
|
||||
}
|
||||
|
||||
~MenuHostWindow() {
|
||||
|
@ -353,7 +353,7 @@ class NativeMenuWin::MenuHostWindow {
|
|||
WPARAM w_param,
|
||||
LPARAM l_param) {
|
||||
MenuHostWindow* host =
|
||||
reinterpret_cast<MenuHostWindow*>(ui::GetWindowUserData(window));
|
||||
reinterpret_cast<MenuHostWindow*>(gfx::GetWindowUserData(window));
|
||||
// host is null during initial construction.
|
||||
LRESULT l_result = 0;
|
||||
if (!host || !host->ProcessWindowMessage(window, message, w_param, l_param,
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
4189, #
|
||||
4131, # uses old-style declarator
|
||||
4133, # incompatible types
|
||||
4146, # unary minus operator applied to unsigned type, result still unsigned
|
||||
4152, # function/data pointer conversion in expression
|
||||
4206, # translation unit is empty
|
||||
4204, # non-constant aggregate initializer
|
||||
|
@ -53,6 +54,7 @@
|
|||
4505, # unreferenced local function has been removed
|
||||
4701, # potentially uninitialized local variable 'sizew' used
|
||||
4706, # assignment within conditional expression
|
||||
4804, # unsafe use of type 'bool' in operation
|
||||
4996, #
|
||||
],
|
||||
'msvs_settings': {
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#include "base/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/singleton.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
|
||||
namespace crash_reporter {
|
||||
|
||||
|
|
|
@ -350,7 +350,7 @@ void CrashService::OnClientDumpRequest(void* context,
|
|||
file_util::CreateDirectoryW(alternate_dump_location);
|
||||
alternate_dump_location = alternate_dump_location.Append(
|
||||
dump_location.BaseName());
|
||||
file_util::Move(dump_location, alternate_dump_location);
|
||||
base::Move(dump_location, alternate_dump_location);
|
||||
dump_location = alternate_dump_location;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "base/command_line.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "common/crash_reporter/win/crash_service.h"
|
||||
|
||||
namespace crash_service {
|
||||
|
@ -26,7 +26,7 @@ bool GetCrashServiceDirectory(const std::wstring& application_name,
|
|||
if (!file_util::GetTempDir(&temp_dir))
|
||||
return false;
|
||||
temp_dir = temp_dir.Append(application_name + L" Crashes");
|
||||
if (!file_util::PathExists(temp_dir)) {
|
||||
if (!base::PathExists(temp_dir)) {
|
||||
if (!file_util::CreateDirectory(temp_dir))
|
||||
return false;
|
||||
}
|
||||
|
@ -56,14 +56,14 @@ int Main(const wchar_t* cmd) {
|
|||
GetCrashServiceDirectory(application_name, &operating_dir);
|
||||
base::FilePath log_file = operating_dir.Append(kStandardLogFile);
|
||||
|
||||
// Logging out to a file.
|
||||
logging::InitLogging(
|
||||
log_file.value().c_str(),
|
||||
logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG ,
|
||||
logging::LOCK_LOG_FILE,
|
||||
logging::DELETE_OLD_LOG_FILE,
|
||||
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
|
||||
logging::SetLogItems(true, false, true, false);
|
||||
// Logging to stderr (to help with debugging failures on the
|
||||
// buildbots) and to a file.
|
||||
logging::LoggingSettings settings;
|
||||
settings.logging_dest = logging::LOG_TO_ALL;
|
||||
settings.log_file = log_file.value().c_str();
|
||||
logging::InitLogging(settings);
|
||||
// Logging with pid, tid and timestamp.
|
||||
logging::SetLogItems(true, true, true, false);
|
||||
|
||||
VLOG(1) << "Session start. cmdline is [" << cmd << "]";
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ node::Environment* NodeBindings::CreateEnvironment(
|
|||
#endif
|
||||
|
||||
// Feed node the path to initialization script.
|
||||
base::FilePath exec_path(args[0]);
|
||||
base::FilePath exec_path(CommandLine::ForCurrentProcess()->argv()[0]);
|
||||
PathService::Get(base::FILE_EXE, &exec_path);
|
||||
base::FilePath resources_path =
|
||||
#if defined(OS_MACOSX)
|
||||
|
@ -118,7 +118,7 @@ node::Environment* NodeBindings::CreateEnvironment(
|
|||
exec_path.DirName().DirName().DirName().DirName().DirName()
|
||||
.Append("Resources");
|
||||
#else
|
||||
exec_path.DirName().Append("resources");
|
||||
exec_path.DirName().AppendASCII("resources");
|
||||
#endif
|
||||
base::FilePath script_path =
|
||||
resources_path.AppendASCII(is_browser_ ? "browser" : "renderer")
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "base/logging.h"
|
||||
|
||||
extern "C" {
|
||||
#include "vendor/node/deps/uv/include/uv-private/ngx-queue.h"
|
||||
#include "vendor/node/deps/uv/src/win/internal.h"
|
||||
}
|
||||
|
||||
|
@ -32,7 +31,7 @@ void NodeBindingsWin::PollEvents() {
|
|||
uv_loop_->endgame_handles == NULL &&
|
||||
!uv_loop_->stop_flag &&
|
||||
(uv_loop_->active_handles > 0 ||
|
||||
!ngx_queue_empty(&uv_loop_->active_reqs));
|
||||
!QUEUE_EMPTY(&uv_loop_->active_reqs));
|
||||
|
||||
// When there is no other types of events, we block on the IOCP.
|
||||
if (block) {
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
#include "base/bind_helpers.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/win/registry.h"
|
||||
#include "base/win/scoped_co_mem.h"
|
||||
#include "base/win/scoped_comptr.h"
|
||||
#include "base/win/windows_version.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "url/gurl.h"
|
||||
#include "ui/base/win/shell.h"
|
||||
|
||||
namespace {
|
||||
|
|
Loading…
Reference in a new issue