Skip to content

Commit df85218

Browse files
committed
fix windows compilation for nwsnapshot
1 parent 4097cce commit df85218

File tree

5 files changed

+10
-1
lines changed

5 files changed

+10
-1
lines changed

nw.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@
579579
},
580580
},
581581
},
582-
'msvs_disabled_warnings': [ 4267, 4800, 4819, 4189 ],
582+
'msvs_disabled_warnings': [ 4267, 4800, 4819, 4189, 4245, 4324 ],
583583
}], # OS=="win"
584584
],
585585
},

src/api/dispatcher.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "content/public/renderer/render_view_observer.h"
2626
#include "third_party/WebKit/public/web/WebNavigationPolicy.h"
2727
#include <v8.h>
28+
#include <string>
2829

2930
namespace base {
3031
class ListValue;

src/api/window_bindings.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@ WindowBindings::CallObjectMethod(const v8::FunctionCallbackInfo<v8::Value>& args
159159
args.GetReturnValue().Set(result);
160160
return;
161161
} else if (method == "EvaluateNWBin") {
162+
#if defined(OS_WIN)
163+
base::FilePath path((WCHAR*)*v8::String::Value(args[3]));
164+
#else
162165
base::FilePath path(*v8::String::Utf8Value(args[3]));
166+
#endif
163167
base::File file(path, base::File::FLAG_OPEN | base::File::FLAG_READ);
164168
if (file.IsValid()) {
165169
int64 length = file.GetLength();

src/nw_notification_manager_win.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434

3535
#include "content/nw/src/nw_notification_manager_win.h"
3636

37+
#include <shellapi.h>
38+
3739
namespace nw {
3840
class TrayObserver : public StatusIconObserver {
3941
public:

src/renderer/nw_render_view_observer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
#include "content/public/renderer/render_view_observer.h"
2525

26+
#include <string>
27+
2628
class SkBitmap;
2729

2830
namespace content {

0 commit comments

Comments
 (0)