From 2c0a4c230b052b5bf97291f32856e19ff7b29972 Mon Sep 17 00:00:00 2001 From: Glenn Ruehle Date: Fri, 8 Jun 2012 15:03:34 -0700 Subject: [PATCH 1/7] Add appshell extensions files. --- appshell.xcodeproj/project.pbxproj | 61 ++++++++++++++++++++---------- appshell/appshell_extensions.cpp | 14 +++++++ appshell/appshell_extensions.h | 13 +++++++ appshell_paths.gypi | 4 ++ 4 files changed, 72 insertions(+), 20 deletions(-) create mode 100644 appshell/appshell_extensions.cpp create mode 100644 appshell/appshell_extensions.h diff --git a/appshell.xcodeproj/project.pbxproj b/appshell.xcodeproj/project.pbxproj index b1c16e130..89658bb0c 100644 --- a/appshell.xcodeproj/project.pbxproj +++ b/appshell.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 45; + objectVersion = 46; objects = { /* Begin PBXAggregateTarget section */ @@ -83,6 +83,7 @@ 98D7CA892DCE9560817D8DA3 /* client_app.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C262FF082FED71CE8963FDD5 /* client_app.cpp */; }; 990947BBC7343DE4AB4BAB0C /* write_handler_cpptoc.cc in Sources */ = {isa = PBXBuildFile; fileRef = 67053B18354E8CC9611FF337 /* write_handler_cpptoc.cc */; }; 99CA415A86381C3A1CD4786B /* cef_zip_archive.cc in Sources */ = {isa = PBXBuildFile; fileRef = EE7BB11CB542B7D63E79B9CA /* cef_zip_archive.cc */; }; + A53BD3DB0E080310E710A5CE /* appshell_extensions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F41FB3563A8DCA978ABCB8F0 /* appshell_extensions.cpp */; }; A73C3E303E6BB270392F0AE8 /* life_span_handler_cpptoc.cc in Sources */ = {isa = PBXBuildFile; fileRef = EAD92ED581FB452EFBCF7D44 /* life_span_handler_cpptoc.cc */; }; A7C00A73ED6CE468CB8A2DEF /* client_app.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C262FF082FED71CE8963FDD5 /* client_app.cpp */; }; AB081BE46ED66D36C42D7D60 /* post_data_ctocpp.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4DBB14594CDA494499E58C80 /* post_data_ctocpp.cc */; }; @@ -112,6 +113,7 @@ F1E056DC74DBC0A17CFBB9FF /* cookie_manager_ctocpp.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9F7B40527EE1F8F402382F97 /* cookie_manager_ctocpp.cc */; }; F287A235239E07C7511F19DE /* libcef.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B65894845851B9D3DEE6BD03 /* libcef.dylib */; }; F453746E3A07998455CA5CD2 /* libcef_dll_wrapper.cc in Sources */ = {isa = PBXBuildFile; fileRef = 2C959542749DCE6EF708F135 /* libcef_dll_wrapper.cc */; }; + F53B304C1BAF754B5D7CCEC2 /* appshell_extensions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F41FB3563A8DCA978ABCB8F0 /* appshell_extensions.cpp */; }; F558BB943DC32BAA0AB011AA /* v8context_ctocpp.cc in Sources */ = {isa = PBXBuildFile; fileRef = A95031741301CFE71BCF96C9 /* v8context_ctocpp.cc */; }; F7C604529546A7AC1B1AE933 /* stream_writer_ctocpp.cc in Sources */ = {isa = PBXBuildFile; fileRef = 3AC7F60052DF0CFDC362E6B8 /* stream_writer_ctocpp.cc */; }; FF803CCD1CE21AD82FC1FB51 /* cef_byte_read_handler.cc in Sources */ = {isa = PBXBuildFile; fileRef = 486533211D801204BD33CC8D /* cef_byte_read_handler.cc */; }; @@ -206,6 +208,7 @@ 0382437F6A331E9E0F702DF1 /* render_process_handler_cpptoc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = render_process_handler_cpptoc.h; sourceTree = ""; }; 03D9ED9154A95662B18AB7A2 /* jsdialog_callback_ctocpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jsdialog_callback_ctocpp.h; sourceTree = ""; }; 0494B885460ACEC9BFC8DB7A /* cef_request_handler_capi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_request_handler_capi.h; sourceTree = ""; }; + 04A8D19B8883382822B6CD59 /* release_impl.gypi */ = {isa = PBXFileReference; lastKnownFileType = text; name = release_impl.gypi; path = ../../cef3/chromium/src/build/internal/release_impl.gypi; sourceTree = ""; }; 08901C1BFEBD0E94BD8CA32C /* v8exception_ctocpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = v8exception_ctocpp.h; sourceTree = ""; }; 09F34D2B0C18BB22DB48FA1E /* cef_pack_resources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_pack_resources.h; sourceTree = ""; }; 0A791B4B90657D6A34CBE325 /* domdocument_ctocpp.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = domdocument_ctocpp.cc; sourceTree = ""; }; @@ -221,6 +224,7 @@ 1453959B7DE13A79B1623CF5 /* cef_request_handler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_request_handler.h; sourceTree = ""; }; 1667C2E7C54DCC310AEEE555 /* cef_dom_capi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_dom_capi.h; sourceTree = ""; }; 168BC6DF94034433AEBC9624 /* cef_process_message.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_process_message.h; sourceTree = ""; }; + 179C3C343EFAF544C72C2D8D /* filename_rules.gypi */ = {isa = PBXFileReference; lastKnownFileType = text; name = filename_rules.gypi; path = ../../cef3/chromium/src/build/filename_rules.gypi; sourceTree = ""; }; 18A0E2D89BE33F51D52B321E /* write_handler_cpptoc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = write_handler_cpptoc.h; sourceTree = ""; }; 1997CD04AB337EC638AB27BD /* cef_task.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_task.h; sourceTree = ""; }; 19CC604904E69CAEC8059933 /* request_ctocpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = request_ctocpp.h; sourceTree = ""; }; @@ -246,22 +250,24 @@ 26049B47F404C3F1C50C2D66 /* process_message_ctocpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = process_message_ctocpp.h; sourceTree = ""; }; 2AB635C6500A7B6F5FF96611 /* callback_ctocpp.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = callback_ctocpp.cc; sourceTree = ""; }; 2BA3A8374DBB04156F6EF07C /* proxy_handler_cpptoc.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = proxy_handler_cpptoc.cc; sourceTree = ""; }; + 2C6200DAA24D72696664A534 /* appshell_extensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = appshell_extensions.h; sourceTree = ""; }; 2C959542749DCE6EF708F135 /* libcef_dll_wrapper.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = libcef_dll_wrapper.cc; sourceTree = ""; }; 2D988111567F6C1E447D780A /* v8handler_cpptoc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = v8handler_cpptoc.h; sourceTree = ""; }; 2DB2A4E97F0B4F92A4DBA725 /* cef_menu_model_capi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_menu_model_capi.h; sourceTree = ""; }; 2E4614F2480508170636DB39 /* domnode_ctocpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = domnode_ctocpp.h; sourceTree = ""; }; 2EE10B443D547B4226D72C70 /* app_cpptoc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = app_cpptoc.h; sourceTree = ""; }; 301277E76434E105624B54CE /* cef_values.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_values.h; sourceTree = ""; }; + 325A9715083AFAAB255C660F /* common.gypi */ = {isa = PBXFileReference; lastKnownFileType = text; name = common.gypi; path = ../../cef3/chromium/src/build/common.gypi; sourceTree = ""; }; 32AC2CDB85725E3715C728CB /* client_cpptoc.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = client_cpptoc.cc; sourceTree = ""; }; 33499D33F1F9DC890F636536 /* life_span_handler_cpptoc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = life_span_handler_cpptoc.h; sourceTree = ""; }; 3458504ADE6A6AF8C60A2C67 /* domevent_ctocpp.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = domevent_ctocpp.cc; sourceTree = ""; }; + 35C4DBE8E4BAEC7160CD210E /* release_impl_official.gypi */ = {isa = PBXFileReference; lastKnownFileType = text; name = release_impl_official.gypi; path = ../../cef3/chromium/src/build/internal/release_impl_official.gypi; sourceTree = ""; }; 365EDD3D82156D2204917D12 /* cef_cookie.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_cookie.h; sourceTree = ""; }; 37158D1FB9718895411FDA83 /* cef_string_types.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_string_types.h; sourceTree = ""; }; 380F6E9056AE039AA8A492DD /* browser_ctocpp.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = browser_ctocpp.cc; sourceTree = ""; }; 39F138E3D0712D078959F53D /* load_handler_cpptoc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = load_handler_cpptoc.h; sourceTree = ""; }; 3AC7F60052DF0CFDC362E6B8 /* stream_writer_ctocpp.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = stream_writer_ctocpp.cc; sourceTree = ""; }; 3B73D06FB8C58B80762CDF5E /* domevent_listener_cpptoc.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = domevent_listener_cpptoc.cc; sourceTree = ""; }; - 3BA7F5E8341F4EC905D3C974 /* filename_rules.gypi */ = {isa = PBXFileReference; lastKnownFileType = text; name = filename_rules.gypi; path = ../../chromium/src/build/filename_rules.gypi; sourceTree = ""; }; 3BC68EEE8A0F628DE03D019D /* context_menu_handler_cpptoc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = context_menu_handler_cpptoc.h; sourceTree = ""; }; 3CC475F841AE4C383D823582 /* scheme_registrar_ctocpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = scheme_registrar_ctocpp.h; sourceTree = ""; }; 3D54FD7A210A996873EAAFC6 /* cef_response_capi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_response_capi.h; sourceTree = ""; }; @@ -271,7 +277,6 @@ 41BC159F756E6B95822D89F1 /* cef_proxy_handler_capi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_proxy_handler_capi.h; sourceTree = ""; }; 42AB6344D83E4ACE37B5AEA7 /* proxy_handler_cpptoc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = proxy_handler_cpptoc.h; sourceTree = ""; }; 43AAF91C2A60F3BE2BB7B094 /* auth_callback_ctocpp.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = auth_callback_ctocpp.cc; sourceTree = ""; }; - 4705769DF8921F67D49201D4 /* release_impl_official.gypi */ = {isa = PBXFileReference; lastKnownFileType = text; name = release_impl_official.gypi; path = ../../chromium/src/build/internal/release_impl_official.gypi; sourceTree = ""; }; 47CD23A78502047CF4AA9A6B /* cef_command_line_capi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_command_line_capi.h; sourceTree = ""; }; 486533211D801204BD33CC8D /* cef_byte_read_handler.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = cef_byte_read_handler.cc; sourceTree = ""; }; 4BCA377BC1360958F4A30EBB /* cef_client.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_client.h; sourceTree = ""; }; @@ -294,6 +299,7 @@ 5A30D7DB3E6147CCD132BF23 /* cef_jsdialog_handler_capi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_jsdialog_handler_capi.h; sourceTree = ""; }; 5C4BF2F9A653513AA5097263 /* cef_life_span_handler_capi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_life_span_handler_capi.h; sourceTree = ""; }; 5CFAB8D52C1E7271A2071B62 /* resource_handler_cpptoc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = resource_handler_cpptoc.h; sourceTree = ""; }; + 5DE1DCFCDF415DF3F679A830 /* release_defaults.gypi */ = {isa = PBXFileReference; lastKnownFileType = text; name = release_defaults.gypi; path = ../../cef3/chromium/src/build/internal/release_defaults.gypi; sourceTree = ""; }; 5E34FEFA93D3CDD186EB50E6 /* cef_web_plugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_web_plugin.h; sourceTree = ""; }; 5E363187DF9DE7D019FE69A2 /* ctocpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ctocpp.h; sourceTree = ""; }; 5EB154496C1FDAE39862F41E /* resource_bundle_handler_cpptoc.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = resource_bundle_handler_cpptoc.cc; sourceTree = ""; }; @@ -301,7 +307,6 @@ 60226CEE12BF2260A17F2328 /* domvisitor_cpptoc.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = domvisitor_cpptoc.cc; sourceTree = ""; }; 613023D3F967805E847AFC36 /* cef_runnable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_runnable.h; sourceTree = ""; }; 624941FB23CF3584A92CC166 /* cef_jsdialog_handler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_jsdialog_handler.h; sourceTree = ""; }; - 62A7CE470734F316B8B5AD11 /* release_impl.gypi */ = {isa = PBXFileReference; lastKnownFileType = text; name = release_impl.gypi; path = ../../chromium/src/build/internal/release_impl.gypi; sourceTree = ""; }; 62A902B142F614B82578BE7C /* cef_mac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_mac.h; sourceTree = ""; }; 67053B18354E8CC9611FF337 /* write_handler_cpptoc.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = write_handler_cpptoc.cc; sourceTree = ""; }; 681025ADA511D62F06D077CD /* appshell_paths.gypi */ = {isa = PBXFileReference; lastKnownFileType = text; path = appshell_paths.gypi; sourceTree = ""; }; @@ -345,11 +350,11 @@ 8DA13083F42E340272D0DB11 /* cef_logging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_logging.h; sourceTree = ""; }; 8E0F2EC382DB9701C15B6B4D /* base_ctocpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = base_ctocpp.h; sourceTree = ""; }; 8ED02D6DE78A19F90319F518 /* browser_host_ctocpp.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = browser_host_ctocpp.cc; sourceTree = ""; }; - 8EE475BB67C07B1E25A62B3B /* common.gypi */ = {isa = PBXFileReference; lastKnownFileType = text; name = common.gypi; path = ../../chromium/src/build/common.gypi; sourceTree = ""; }; 8F11150C50C71F0939C665D5 /* binary_value_ctocpp.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = binary_value_ctocpp.cc; sourceTree = ""; }; 8FA31F2E768EEDFF39F3FCAF /* domevent_ctocpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = domevent_ctocpp.h; sourceTree = ""; }; 902F6E988B8B976585C32A30 /* cef_string_visitor_capi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_string_visitor_capi.h; sourceTree = ""; }; 90874EBCA8FAA8E9E36FFD3F /* string_util.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = string_util.h; sourceTree = ""; }; + 91100386D8474E004601AE44 /* release.gypi */ = {isa = PBXFileReference; lastKnownFileType = text; name = release.gypi; path = ../../cef3/chromium/src/build/release.gypi; sourceTree = ""; }; 92C96D3DB86D67B3238B1361 /* cef_callback.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_callback.h; sourceTree = ""; }; 932B910099817CB226487AF4 /* cef_ptr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_ptr.h; sourceTree = ""; }; 93B4F36427B200909D58F8F9 /* cef_base.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_base.h; sourceTree = ""; }; @@ -383,10 +388,9 @@ B4B09C1A48BFF86A37409501 /* cef_load_handler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_load_handler.h; sourceTree = ""; }; B5F6DEF7A5E722606EFDD579 /* request_handler_cpptoc.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = request_handler_cpptoc.cc; sourceTree = ""; }; B617EB0714F29F881C46BCC3 /* frame_ctocpp.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = frame_ctocpp.cc; sourceTree = ""; }; - B65894845851B9D3DEE6BD03 /* libcef.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcef.dylib; path = libcef.dylib; sourceTree = CONFIGURATION; }; + B65894845851B9D3DEE6BD03 /* libcef.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libcef.dylib; sourceTree = CONFIGURATION; }; B6A77EE456259DB56C750847 /* cookie_visitor_cpptoc.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = cookie_visitor_cpptoc.cc; sourceTree = ""; }; B9211C221356E0B082C4816A /* transfer_util.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = transfer_util.cpp; sourceTree = ""; }; - B9468E6BE26D616E1D5B00AC /* release_defaults.gypi */ = {isa = PBXFileReference; lastKnownFileType = text; name = release_defaults.gypi; path = ../../chromium/src/build/internal/release_defaults.gypi; sourceTree = ""; }; B9EF704C714952FC84A12099 /* list_value_ctocpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = list_value_ctocpp.h; sourceTree = ""; }; BB1ECEF8D8325E6D39B9CB86 /* v8context_ctocpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = v8context_ctocpp.h; sourceTree = ""; }; BD8E873CE33AB866D81F7634 /* resource_handler_cpptoc.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = resource_handler_cpptoc.cc; sourceTree = ""; }; @@ -436,7 +440,6 @@ E91EA24B8A72EBFD9BB6C1A2 /* cef_callback_capi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_callback_capi.h; sourceTree = ""; }; E93F80CFC491C3C09AFDD87B /* client_handler_mac.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = client_handler_mac.mm; sourceTree = ""; }; EAD92ED581FB452EFBCF7D44 /* life_span_handler_cpptoc.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = life_span_handler_cpptoc.cc; sourceTree = ""; }; - EB2B27551AF6DC0BE64FDA4D /* release.gypi */ = {isa = PBXFileReference; lastKnownFileType = text; name = release.gypi; path = ../../chromium/src/build/release.gypi; sourceTree = ""; }; EB3CE077A76125344AF31275 /* Brackets.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Brackets.app; sourceTree = BUILT_PRODUCTS_DIR; }; EB60AE270B721E13CF1126AD /* command_line_ctocpp.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = command_line_ctocpp.cc; sourceTree = ""; }; EC32618A1323B894948367CF /* client_app_delegates.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = client_app_delegates.cpp; sourceTree = ""; }; @@ -448,6 +451,7 @@ F12B1A4A09CF4E1F813847E0 /* browser_ctocpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = browser_ctocpp.h; sourceTree = ""; }; F1989B67661244ED4B756EE5 /* libcef.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libcef.dylib; sourceTree = ""; }; F31B254B0DC7D754A1D4D56C /* cef_resource_handler_capi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_resource_handler_capi.h; sourceTree = ""; }; + F41FB3563A8DCA978ABCB8F0 /* appshell_extensions.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = appshell_extensions.cpp; sourceTree = ""; }; F7D894242D95F2E165D0ECF6 /* cef_request_capi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_request_capi.h; sourceTree = ""; }; F8650F6813183C119C198C0F /* stream_writer_ctocpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = stream_writer_ctocpp.h; sourceTree = ""; }; F920274FE06506D9C02842CB /* command_line_ctocpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = command_line_ctocpp.h; sourceTree = ""; }; @@ -556,6 +560,8 @@ isa = PBXGroup; children = ( 2CF60921DE182D498BFC8418 /* mac */, + F41FB3563A8DCA978ABCB8F0 /* appshell_extensions.cpp */, + 2C6200DAA24D72696664A534 /* appshell_extensions.h */, 522C920B68963035E6CE38FE /* cefclient.cpp */, 217F2C98268E9035AD8D9C14 /* cefclient.h */, 79A2E45EB29CAA66453661C6 /* cefclient_mac.mm */, @@ -637,12 +643,12 @@ 4DB4E8FB15970721FCDF697D /* appshell.gyp */, 681025ADA511D62F06D077CD /* appshell_paths.gypi */, 1B82AEB5DA032CD1CE1D4282 /* cef_paths.gypi */, - 8EE475BB67C07B1E25A62B3B /* common.gypi */, - 3BA7F5E8341F4EC905D3C974 /* filename_rules.gypi */, - EB2B27551AF6DC0BE64FDA4D /* release.gypi */, - B9468E6BE26D616E1D5B00AC /* release_defaults.gypi */, - 62A7CE470734F316B8B5AD11 /* release_impl.gypi */, - 4705769DF8921F67D49201D4 /* release_impl_official.gypi */, + 325A9715083AFAAB255C660F /* common.gypi */, + 179C3C343EFAF544C72C2D8D /* filename_rules.gypi */, + 91100386D8474E004601AE44 /* release.gypi */, + 5DE1DCFCDF415DF3F679A830 /* release_defaults.gypi */, + 04A8D19B8883382822B6CD59 /* release_impl.gypi */, + 35C4DBE8E4BAEC7160CD210E /* release_impl_official.gypi */, ); name = Build; sourceTree = ""; @@ -956,7 +962,14 @@ }; buildConfigurationList = 38D0AF58DF00CF65E3AAE9DC /* Build configuration list for PBXProject "appshell" */; compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); mainGroup = F47C63E7FD8ABDAE3E69A708; projectDirPath = ""; projectRoot = ""; @@ -996,7 +1009,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "exec ../../chromium/src/build/mac/strip_from_xcode\nexit 1\n"; + shellScript = "exec ../../cef3/chromium/src/build/mac/strip_from_xcode\nexit 1\n"; showEnvVarsInLog = 0; }; 3B16BF13B8896C93428E0A35 /* Postbuild "Change Mach-O Flags" */ = { @@ -1012,7 +1025,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "exec ../../chromium/src/build/mac/change_mach_o_flags_from_xcode.sh\nexit 1\n"; + shellScript = "exec ../../cef3/chromium/src/build/mac/change_mach_o_flags_from_xcode.sh\nexit 1\n"; showEnvVarsInLog = 0; }; 5FFA01E4430BFD752A7D9747 /* Postbuild "Change Mach-O Flags" */ = { @@ -1028,7 +1041,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "exec ../../chromium/src/build/mac/change_mach_o_flags_from_xcode.sh\nexit 1\n"; + shellScript = "exec ../../cef3/chromium/src/build/mac/change_mach_o_flags_from_xcode.sh\nexit 1\n"; showEnvVarsInLog = 0; }; 910380272B9E47B3102A393B /* Postbuild "Fix Framework Link" */ = { @@ -1060,7 +1073,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "exec ../../chromium/src/build/mac/strip_from_xcode\nexit 1\n"; + shellScript = "exec ../../cef3/chromium/src/build/mac/strip_from_xcode\nexit 1\n"; showEnvVarsInLog = 0; }; E0B5A15D59AE1A8E7AF929D3 /* Postbuild "Fix Framework Link" */ = { @@ -1102,6 +1115,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + F53B304C1BAF754B5D7CCEC2 /* appshell_extensions.cpp in Sources */, 2CC364D7509BFD402CACB9ED /* cefclient.cpp in Sources */, 98D7CA892DCE9560817D8DA3 /* client_app.cpp in Sources */, 44E07FA909A2EC86622D67D8 /* client_app_delegates.cpp in Sources */, @@ -1118,6 +1132,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + A53BD3DB0E080310E710A5CE /* appshell_extensions.cpp in Sources */, A7C00A73ED6CE468CB8A2DEF /* client_app.cpp in Sources */, 37732F00B07028873199D832 /* client_app_delegates.cpp in Sources */, 3140F36769DD91AE0E8CCF33 /* client_handler.cpp in Sources */, @@ -1270,6 +1285,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "\"CHROMIUM_BUILD\"", + "\"ENABLE_ONE_CLICK_SIGNIN\"", "\"ENABLE_REMOTING=1\"", "\"ENABLE_WEBRTC=1\"", "\"ENABLE_P2P_APIS=1\"", @@ -1336,7 +1352,7 @@ INTERMEDIATE_DIR = "$(PROJECT_DERIVED_FILE_DIR)/$(CONFIGURATION)"; SDKROOT = macosx10.6; SHARED_INTERMEDIATE_DIR = "$(SYMROOT)/DerivedSources/$(CONFIGURATION)"; - SYMROOT = ../../chromium/src/xcodebuild; + SYMROOT = ../../cef3/chromium/src/xcodebuild; }; name = Release; }; @@ -1358,6 +1374,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "\"CHROMIUM_BUILD\"", + "\"ENABLE_ONE_CLICK_SIGNIN\"", "\"ENABLE_REMOTING=1\"", "\"ENABLE_WEBRTC=1\"", "\"ENABLE_P2P_APIS=1\"", @@ -1430,6 +1447,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "\"CHROMIUM_BUILD\"", + "\"ENABLE_ONE_CLICK_SIGNIN\"", "\"ENABLE_REMOTING=1\"", "\"ENABLE_WEBRTC=1\"", "\"ENABLE_P2P_APIS=1\"", @@ -1507,6 +1525,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "\"CHROMIUM_BUILD\"", + "\"ENABLE_ONE_CLICK_SIGNIN\"", "\"ENABLE_REMOTING=1\"", "\"ENABLE_WEBRTC=1\"", "\"ENABLE_P2P_APIS=1\"", @@ -1575,7 +1594,7 @@ INTERMEDIATE_DIR = "$(PROJECT_DERIVED_FILE_DIR)/$(CONFIGURATION)"; SDKROOT = macosx10.6; SHARED_INTERMEDIATE_DIR = "$(SYMROOT)/DerivedSources/$(CONFIGURATION)"; - SYMROOT = ../../chromium/src/xcodebuild; + SYMROOT = ../../cef3/chromium/src/xcodebuild; }; name = Debug; }; @@ -1596,6 +1615,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "\"CHROMIUM_BUILD\"", + "\"ENABLE_ONE_CLICK_SIGNIN\"", "\"ENABLE_REMOTING=1\"", "\"ENABLE_WEBRTC=1\"", "\"ENABLE_P2P_APIS=1\"", @@ -1683,6 +1703,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "\"CHROMIUM_BUILD\"", + "\"ENABLE_ONE_CLICK_SIGNIN\"", "\"ENABLE_REMOTING=1\"", "\"ENABLE_WEBRTC=1\"", "\"ENABLE_P2P_APIS=1\"", diff --git a/appshell/appshell_extensions.cpp b/appshell/appshell_extensions.cpp new file mode 100644 index 000000000..ba8b59b83 --- /dev/null +++ b/appshell/appshell_extensions.cpp @@ -0,0 +1,14 @@ +#include "appshell/appshell_extensions.h" + +namespace appshell_extensions { + +void CreateProcessMessageDelegates( + ClientHandler::ProcessMessageDelegateSet& delegates) { +// delegates.insert(new ProcessMessageDelegate); +} + +void CreateRequestDelegates(ClientHandler::RequestDelegateSet& delegates) { +// delegates.insert(new RequestDelegate); +} + +} // namespace appshell_extensions diff --git a/appshell/appshell_extensions.h b/appshell/appshell_extensions.h new file mode 100644 index 000000000..a2c78c057 --- /dev/null +++ b/appshell/appshell_extensions.h @@ -0,0 +1,13 @@ + +#pragma once + +#include "cefclient/client_app.h" +#include "cefclient/client_handler.h" + +namespace appshell_extensions { + +// Delegate creation. Called from ClientApp and ClientHandler. +void CreateProcessMessageDelegates( + ClientHandler::ProcessMessageDelegateSet& delegates); +void CreateRequestDelegates(ClientHandler::RequestDelegateSet& delegates); +} // namespace appshell_extensions diff --git a/appshell_paths.gypi b/appshell_paths.gypi index a176cd099..fdbabd9fe 100755 --- a/appshell_paths.gypi +++ b/appshell_paths.gypi @@ -80,6 +80,8 @@ '<@(autogen_client_side)', ], 'appshell_sources_common': [ + 'appshell/appshell_extensions.cpp', + 'appshell/appshell_extensions.h', 'appshell/config.h', 'appshell/cefclient.cpp', 'appshell/cefclient.h', @@ -111,6 +113,8 @@ 'appshell/resource_util_mac.mm', ], 'appshell_sources_mac_helper': [ + 'appshell/appshell_extensions.cpp', + 'appshell/appshell_extensions.h', 'appshell/client_app.cpp', 'appshell/client_app.h', 'appshell/client_app_delegates.cpp', From 69cf2327f4d379afee180502ba13a4badaf6c18a Mon Sep 17 00:00:00 2001 From: Glenn Ruehle Date: Fri, 8 Jun 2012 15:38:29 -0700 Subject: [PATCH 2/7] Fix includes on Windows. Get extensions loading on windows. --- Brackets.vcxproj | 2 +- appshell/cefclient.rc | 2 ++ appshell/cefclient_win.cpp | 8 ++++---- appshell/client_app_win.cpp | 30 ++++++++++++++++++++++++++++++ appshell/client_handler_win.cpp | 4 ++-- appshell/resource.h | 1 + appshell/resource_util_win.cpp | 4 ++-- appshell_paths.gypi | 1 + 8 files changed, 43 insertions(+), 9 deletions(-) create mode 100644 appshell/client_app_win.cpp diff --git a/Brackets.vcxproj b/Brackets.vcxproj index 3ae162067..9e81e947c 100644 --- a/Brackets.vcxproj +++ b/Brackets.vcxproj @@ -1 +1 @@ -DebugWin32Debugx64ReleaseWin32Releasex64{6617FED9-C5D4-4907-BF55-A90062A6683F}Win32ProjBracketsUnicodeApplication$(ExecutablePath);$(MSBuildProjectDirectory)\..\src\third_party\cygwin\bin\;$(MSBuildProjectDirectory)\..\src\third_party\python_26\$(Configuration)\$(OutDir)obj\$(ProjectName)\falsefalsetruetrue$(ProjectName)$(OutDir)\$(ProjectName).exe..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)/MP /we4389 %(AdditionalOptions)EnableFastCheckstrueProgramDatabase4351;4396;4503;4819;4100;4121;4125;4127;4130;4131;4189;4201;4238;4244;4245;4310;4355;4428;4481;4505;4510;4512;4530;4610;4611;4701;4702;4706;%(DisableSpecificWarnings)falsetruefalseDisabled_DEBUG;_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)MultiThreadedDebugfalsetrueLevel4../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib;%(AdditionalLibraryDirectories)/ignore:4221 %(AdditionalOptions)wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;atlthunk.lib;comctl32.lib;shlwapi.lib;rpcrt4.lib;opengl32.lib;glu32.lib;lib\$(Configuration)\libcef.lib;%(AdditionalDependencies)../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib;%(AdditionalLibraryDirectories)/ignore:4254 /ignore:4078 /safeseh /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)wWinMainCRTStartupfalsetrue$(OutDir)lib\$(TargetName).lib$(OutDir)$(TargetName).map$(OutDir)$(ProjectName).exefalseWindowsMachineX86%(Filename).dlldata.ctrue%(Filename).h%(Filename)_i.c$(IntDir)%(Filename)_p.c%(Filename).tlb../src;$(OutDir)obj/global_intermediate;..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)0x0409_DEBUG;_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)/MP /we4389 %(AdditionalOptions)EnableFastCheckstrueProgramDatabase4351;4396;4503;4819;4100;4121;4125;4127;4130;4131;4189;4201;4238;4244;4245;4310;4355;4428;4481;4505;4510;4512;4530;4610;4611;4701;4702;4706;%(DisableSpecificWarnings)falsetruefalseDisabled_DEBUG;_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NO_TCMALLOC;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)MultiThreadedDebugfalsetrueLevel4../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib/x64;%(AdditionalLibraryDirectories)/ignore:4221 %(AdditionalOptions)wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;atlthunk.lib;comctl32.lib;shlwapi.lib;rpcrt4.lib;opengl32.lib;glu32.lib;lib\$(Configuration)\libcef.lib;%(AdditionalDependencies)../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib/x64;%(AdditionalLibraryDirectories)/ignore:4254 /ignore:4078 /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)wWinMainCRTStartupfalsetrue$(OutDir)lib\$(TargetName).lib$(OutDir)$(TargetName).map$(OutDir)$(ProjectName).exefalseWindowsMachineX64%(Filename).dlldata.ctrue%(Filename).h%(Filename)_i.c$(IntDir)%(Filename)_p.c%(Filename).tlb../src;$(OutDir)obj/global_intermediate;..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)0x0409_DEBUG;_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NO_TCMALLOC;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)/MP /we4389 /Oy- %(AdditionalOptions)trueProgramDatabase4351;4396;4503;4819;4100;4121;4125;4127;4130;4131;4189;4201;4238;4244;4245;4310;4355;4428;4481;4505;4510;4512;4530;4610;4611;4701;4702;4706;%(DisableSpecificWarnings)falsetrueAnySuitablefalsefalseMaxSpeed_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions)MultiThreadedfalsetruetrueLevel4../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib;%(AdditionalLibraryDirectories)/ignore:4221 %(AdditionalOptions)wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;atlthunk.lib;comctl32.lib;shlwapi.lib;rpcrt4.lib;opengl32.lib;glu32.lib;lib\$(Configuration)\libcef.lib;%(AdditionalDependencies)../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib;%(AdditionalLibraryDirectories)/ignore:4254 /ignore:4078 /safeseh /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)truewWinMainCRTStartupfalsetrue$(OutDir)lib\$(TargetName).lib$(OutDir)$(TargetName).maptrue$(OutDir)$(ProjectName).exetrueWindowsMachineX86%(Filename).dlldata.ctrue%(Filename).h%(Filename)_i.c$(IntDir)%(Filename)_p.c%(Filename).tlb../src;$(OutDir)obj/global_intermediate;..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)0x0409_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions);%(PreprocessorDefinitions)..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)/MP /we4389 /Oy- %(AdditionalOptions)trueProgramDatabase4351;4396;4503;4819;4100;4121;4125;4127;4130;4131;4189;4201;4238;4244;4245;4310;4355;4428;4481;4505;4510;4512;4530;4610;4611;4701;4702;4706;%(DisableSpecificWarnings)falsetrueAnySuitablefalsefalseMaxSpeed_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NO_TCMALLOC;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions)MultiThreadedfalsetruetrueLevel4../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib/x64;%(AdditionalLibraryDirectories)/ignore:4221 %(AdditionalOptions)wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;atlthunk.lib;comctl32.lib;shlwapi.lib;rpcrt4.lib;opengl32.lib;glu32.lib;lib\$(Configuration)\libcef.lib;%(AdditionalDependencies)../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib/x64;%(AdditionalLibraryDirectories)/ignore:4254 /ignore:4078 /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)truewWinMainCRTStartupfalsetrue$(OutDir)lib\$(TargetName).lib$(OutDir)$(TargetName).maptrue$(OutDir)$(ProjectName).exetrueWindowsMachineX64%(Filename).dlldata.ctrue%(Filename).h%(Filename)_i.c$(IntDir)%(Filename)_p.c%(Filename).tlb../src;$(OutDir)obj/global_intermediate;..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)0x0409_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NO_TCMALLOC;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions);%(PreprocessorDefinitions){A9D6DC71-C0DC-4549-AEA0-3B15B44E86A9}false \ No newline at end of file +DebugWin32Debugx64ReleaseWin32Releasex64{6617FED9-C5D4-4907-BF55-A90062A6683F}Win32ProjBracketsUnicodeApplication$(ExecutablePath);$(MSBuildProjectDirectory)\..\src\third_party\cygwin\bin\;$(MSBuildProjectDirectory)\..\src\third_party\python_26\$(Configuration)\$(OutDir)obj\$(ProjectName)\falsefalsetruetrue$(ProjectName)$(OutDir)\$(ProjectName).exe..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)/MP /we4389 %(AdditionalOptions)EnableFastCheckstrueProgramDatabase4351;4396;4503;4819;4100;4121;4125;4127;4130;4131;4189;4201;4238;4244;4245;4310;4355;4428;4481;4505;4510;4512;4530;4610;4611;4701;4702;4706;%(DisableSpecificWarnings)falsetruefalseDisabled_DEBUG;_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)MultiThreadedDebugfalsetrueLevel4../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib;%(AdditionalLibraryDirectories)/ignore:4221 %(AdditionalOptions)wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;atlthunk.lib;comctl32.lib;shlwapi.lib;rpcrt4.lib;opengl32.lib;glu32.lib;lib\$(Configuration)\libcef.lib;%(AdditionalDependencies)../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib;%(AdditionalLibraryDirectories)/ignore:4254 /ignore:4078 /safeseh /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)wWinMainCRTStartupfalsetrue$(OutDir)lib\$(TargetName).lib$(OutDir)$(TargetName).map$(OutDir)$(ProjectName).exefalseWindowsMachineX86%(Filename).dlldata.ctrue%(Filename).h%(Filename)_i.c$(IntDir)%(Filename)_p.c%(Filename).tlb../src;$(OutDir)obj/global_intermediate;..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)0x0409_DEBUG;_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)/MP /we4389 %(AdditionalOptions)EnableFastCheckstrueProgramDatabase4351;4396;4503;4819;4100;4121;4125;4127;4130;4131;4189;4201;4238;4244;4245;4310;4355;4428;4481;4505;4510;4512;4530;4610;4611;4701;4702;4706;%(DisableSpecificWarnings)falsetruefalseDisabled_DEBUG;_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NO_TCMALLOC;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)MultiThreadedDebugfalsetrueLevel4../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib/x64;%(AdditionalLibraryDirectories)/ignore:4221 %(AdditionalOptions)wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;atlthunk.lib;comctl32.lib;shlwapi.lib;rpcrt4.lib;opengl32.lib;glu32.lib;lib\$(Configuration)\libcef.lib;%(AdditionalDependencies)../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib/x64;%(AdditionalLibraryDirectories)/ignore:4254 /ignore:4078 /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)wWinMainCRTStartupfalsetrue$(OutDir)lib\$(TargetName).lib$(OutDir)$(TargetName).map$(OutDir)$(ProjectName).exefalseWindowsMachineX64%(Filename).dlldata.ctrue%(Filename).h%(Filename)_i.c$(IntDir)%(Filename)_p.c%(Filename).tlb../src;$(OutDir)obj/global_intermediate;..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)0x0409_DEBUG;_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NO_TCMALLOC;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)/MP /we4389 /Oy- %(AdditionalOptions)trueProgramDatabase4351;4396;4503;4819;4100;4121;4125;4127;4130;4131;4189;4201;4238;4244;4245;4310;4355;4428;4481;4505;4510;4512;4530;4610;4611;4701;4702;4706;%(DisableSpecificWarnings)falsetrueAnySuitablefalsefalseMaxSpeed_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions)MultiThreadedfalsetruetrueLevel4../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib;%(AdditionalLibraryDirectories)/ignore:4221 %(AdditionalOptions)wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;atlthunk.lib;comctl32.lib;shlwapi.lib;rpcrt4.lib;opengl32.lib;glu32.lib;lib\$(Configuration)\libcef.lib;%(AdditionalDependencies)../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib;%(AdditionalLibraryDirectories)/ignore:4254 /ignore:4078 /safeseh /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)truewWinMainCRTStartupfalsetrue$(OutDir)lib\$(TargetName).lib$(OutDir)$(TargetName).maptrue$(OutDir)$(ProjectName).exetrueWindowsMachineX86%(Filename).dlldata.ctrue%(Filename).h%(Filename)_i.c$(IntDir)%(Filename)_p.c%(Filename).tlb../src;$(OutDir)obj/global_intermediate;..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)0x0409_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions);%(PreprocessorDefinitions)..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)/MP /we4389 /Oy- %(AdditionalOptions)trueProgramDatabase4351;4396;4503;4819;4100;4121;4125;4127;4130;4131;4189;4201;4238;4244;4245;4310;4355;4428;4481;4505;4510;4512;4530;4610;4611;4701;4702;4706;%(DisableSpecificWarnings)falsetrueAnySuitablefalsefalseMaxSpeed_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NO_TCMALLOC;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions)MultiThreadedfalsetruetrueLevel4../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib/x64;%(AdditionalLibraryDirectories)/ignore:4221 %(AdditionalOptions)wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;atlthunk.lib;comctl32.lib;shlwapi.lib;rpcrt4.lib;opengl32.lib;glu32.lib;lib\$(Configuration)\libcef.lib;%(AdditionalDependencies)../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib/x64;%(AdditionalLibraryDirectories)/ignore:4254 /ignore:4078 /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)truewWinMainCRTStartupfalsetrue$(OutDir)lib\$(TargetName).lib$(OutDir)$(TargetName).maptrue$(OutDir)$(ProjectName).exetrueWindowsMachineX64%(Filename).dlldata.ctrue%(Filename).h%(Filename)_i.c$(IntDir)%(Filename)_p.c%(Filename).tlb../src;$(OutDir)obj/global_intermediate;..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)0x0409_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NO_TCMALLOC;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions);%(PreprocessorDefinitions){A9D6DC71-C0DC-4549-AEA0-3B15B44E86A9}false \ No newline at end of file diff --git a/appshell/cefclient.rc b/appshell/cefclient.rc index 29ea626ae..b42a700d3 100644 --- a/appshell/cefclient.rc +++ b/appshell/cefclient.rc @@ -28,6 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // Binary // +IDS_BRACKETS_EXTENSIONS BINARY "brackets_extensions.js" + ///////////////////////////////////////////////////////////////////////////// // // Icon diff --git a/appshell/cefclient_win.cpp b/appshell/cefclient_win.cpp index 196be71ac..2a625a52c 100644 --- a/appshell/cefclient_win.cpp +++ b/appshell/cefclient_win.cpp @@ -3,7 +3,7 @@ // can be found in the LICENSE file. #include "config.h" -#include "cefclient/cefclient.h" +#include "cefclient.h" #include #include #include @@ -14,9 +14,9 @@ #include "include/cef_browser.h" #include "include/cef_frame.h" #include "include/cef_runnable.h" -#include "cefclient/client_handler.h" -#include "cefclient/resource.h" -#include "cefclient/string_util.h" +#include "client_handler.h" +#include "resource.h" +#include "string_util.h" #define MAX_LOADSTRING 100 diff --git a/appshell/client_app_win.cpp b/appshell/client_app_win.cpp new file mode 100644 index 000000000..eefc8abd5 --- /dev/null +++ b/appshell/client_app_win.cpp @@ -0,0 +1,30 @@ +#include "client_app.h" +#include "resource.h" + +#include + +std::string ClientApp::GetExtensionJSSource() +{ + extern HINSTANCE hInst; + + HRSRC hRes = FindResource(hInst, MAKEINTRESOURCE(IDS_BRACKETS_EXTENSIONS), MAKEINTRESOURCE(256)); + DWORD dwSize; + LPBYTE pBytes = NULL; + + if(hRes) + { + HGLOBAL hGlob = LoadResource(hInst, hRes); + if(hGlob) + { + dwSize = SizeofResource(hInst, hRes); + pBytes = (LPBYTE)LockResource(hGlob); + } + } + + if (pBytes) { + std::string result((const char *)pBytes, dwSize); + return result; + } + + return ""; +} diff --git a/appshell/client_handler_win.cpp b/appshell/client_handler_win.cpp index 34b33c589..ecb3b564c 100644 --- a/appshell/client_handler_win.cpp +++ b/appshell/client_handler_win.cpp @@ -3,11 +3,11 @@ // can be found in the LICENSE file. #include "config.h" -#include "cefclient/client_handler.h" +#include "client_handler.h" #include #include "include/cef_browser.h" #include "include/cef_frame.h" -#include "cefclient/resource.h" +#include "resource.h" bool ClientHandler::OnBeforePopup(CefRefPtr parentBrowser, const CefPopupFeatures& popupFeatures, diff --git a/appshell/resource.h b/appshell/resource.h index 74c35fae8..71982f333 100644 --- a/appshell/resource.h +++ b/appshell/resource.h @@ -49,6 +49,7 @@ #define IDS_LOCALSTORAGE 1004 #define IDS_XMLHTTPREQUEST 1005 #define IDS_DOMACCESS 1006 +#define IDS_BRACKETS_EXTENSIONS 1007 // Avoid files associated with MacOS #define _X86_ diff --git a/appshell/resource_util_win.cpp b/appshell/resource_util_win.cpp index 8482ac954..bf72e1868 100644 --- a/appshell/resource_util_win.cpp +++ b/appshell/resource_util_win.cpp @@ -2,10 +2,10 @@ // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. -#include "cefclient/resource_util.h" +#include "resource_util.h" #include "include/cef_stream.h" #include "include/wrapper/cef_byte_read_handler.h" -#include "cefclient/util.h" +#include "util.h" #if defined(OS_WIN) diff --git a/appshell_paths.gypi b/appshell_paths.gypi index 022b74bf5..5675fbaf7 100755 --- a/appshell_paths.gypi +++ b/appshell_paths.gypi @@ -101,6 +101,7 @@ 'appshell_sources_win': [ 'appshell/cefclient.rc', 'appshell/cefclient_win.cpp', + 'appshell/client_app_win.cpp', 'appshell/client_handler_win.cpp', 'appshell/resource.h', 'appshell/res/cefclient.ico', From b79bbc6528e4ebeeb9aafd10fa654fcf098cc998 Mon Sep 17 00:00:00 2001 From: Glenn Ruehle Date: Fri, 8 Jun 2012 15:45:19 -0700 Subject: [PATCH 3/7] Add copyright headers. Convert tabs to spaces. --- appshell/appshell_extensions.cpp | 63 ++++++++++++++++++++++---------- appshell/appshell_extensions.h | 26 ++++++++++++- appshell/client_app_mac.mm | 35 +++++++++++++++--- appshell/client_app_win.cpp | 23 ++++++++++++ 4 files changed, 119 insertions(+), 28 deletions(-) diff --git a/appshell/appshell_extensions.cpp b/appshell/appshell_extensions.cpp index f1315fe55..c4433e0ca 100644 --- a/appshell/appshell_extensions.cpp +++ b/appshell/appshell_extensions.cpp @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + #include "appshell/appshell_extensions.h" namespace appshell_extensions { @@ -5,33 +28,33 @@ namespace appshell_extensions { namespace { class ProcessMessageDelegate : public ClientHandler::ProcessMessageDelegate { public: - ProcessMessageDelegate() - { - } + ProcessMessageDelegate() + { + } - // From ClientHandler::ProcessMessageDelegate. - virtual bool OnProcessMessageRecieved( - CefRefPtr handler, - CefRefPtr browser, - CefProcessId source_process, - CefRefPtr message) OVERRIDE { - std::string message_name = message->GetName(); - - return false; - } - - IMPLEMENT_REFCOUNTING(ProcessMessageDelegate); + // From ClientHandler::ProcessMessageDelegate. + virtual bool OnProcessMessageRecieved( + CefRefPtr handler, + CefRefPtr browser, + CefProcessId source_process, + CefRefPtr message) OVERRIDE { + std::string message_name = message->GetName(); + + return false; + } + + IMPLEMENT_REFCOUNTING(ProcessMessageDelegate); }; - + } // namespace - + void CreateProcessMessageDelegates( - ClientHandler::ProcessMessageDelegateSet& delegates) { - delegates.insert(new ProcessMessageDelegate); + ClientHandler::ProcessMessageDelegateSet& delegates) { + delegates.insert(new ProcessMessageDelegate); } void CreateRequestDelegates(ClientHandler::RequestDelegateSet& delegates) { // delegates.insert(new RequestDelegate); } - + } // namespace appshell_extensions diff --git a/appshell/appshell_extensions.h b/appshell/appshell_extensions.h index 70d3eb64d..fb998fdbf 100644 --- a/appshell/appshell_extensions.h +++ b/appshell/appshell_extensions.h @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ #pragma once @@ -5,9 +27,9 @@ #include "client_handler.h" namespace appshell_extensions { - + // Delegate creation. Called from ClientApp and ClientHandler. void CreateProcessMessageDelegates( - ClientHandler::ProcessMessageDelegateSet& delegates); + ClientHandler::ProcessMessageDelegateSet& delegates); void CreateRequestDelegates(ClientHandler::RequestDelegateSet& delegates); } // namespace appshell_extensions diff --git a/appshell/client_app_mac.mm b/appshell/client_app_mac.mm index ad7e7a3b1..2a42f3aae 100644 --- a/appshell/client_app_mac.mm +++ b/appshell/client_app_mac.mm @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + #include "client_app.h" #include @@ -6,8 +29,8 @@ std::string ClientApp::GetExtensionJSSource() { - std::string result; - + std::string result; + // This is a hack to grab the extension file from the main app resource bundle. // This code may be run in a sub process in an app that is bundled inside the main app. #if 1 @@ -26,8 +49,8 @@ #endif NSString* jsSource = [[NSString alloc] initWithContentsOfFile:sourcePath encoding:NSUTF8StringEncoding error:nil]; - result = [jsSource UTF8String]; - [jsSource release]; - - return result; + result = [jsSource UTF8String]; + [jsSource release]; + + return result; } diff --git a/appshell/client_app_win.cpp b/appshell/client_app_win.cpp index eefc8abd5..8de3a72fd 100644 --- a/appshell/client_app_win.cpp +++ b/appshell/client_app_win.cpp @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + #include "client_app.h" #include "resource.h" From 2078ddf79486325e3dabab4fe81e9c8659057d84 Mon Sep 17 00:00:00 2001 From: Glenn Ruehle Date: Mon, 11 Jun 2012 07:09:23 -0700 Subject: [PATCH 4/7] FileIO implementation on mac. --- appshell.xcodeproj/project.pbxproj | 6 + appshell/appshell_extensions.cpp | 199 ++++++++++++++++++++- appshell/appshell_extensions.h | 41 +++++ appshell/appshell_extensions_mac.mm | 250 +++++++++++++++++++++++++++ appshell/appshell_extensions_win.cpp | 24 +++ appshell/brackets_extensions.js | 110 +++--------- appshell/cefclient_mac.mm | 9 + appshell/client_app.cpp | 129 +++++++++++--- appshell/client_app.h | 18 +- appshell/client_app_mac.mm | 9 + appshell/config.h | 2 +- appshell/process_helper_mac.cpp | 10 +- appshell_paths.gypi | 3 + 13 files changed, 685 insertions(+), 125 deletions(-) create mode 100644 appshell/appshell_extensions_mac.mm create mode 100644 appshell/appshell_extensions_win.cpp diff --git a/appshell.xcodeproj/project.pbxproj b/appshell.xcodeproj/project.pbxproj index 8a9ad9729..f83f45d21 100644 --- a/appshell.xcodeproj/project.pbxproj +++ b/appshell.xcodeproj/project.pbxproj @@ -59,7 +59,9 @@ 5164086404B14363CC7BCBE0 /* libcef_dll_wrapper2.cc in Sources */ = {isa = PBXBuildFile; fileRef = C36233CB23734A273D2D0F79 /* libcef_dll_wrapper2.cc */; }; 5241E88E7E6435DE2C0FE500 /* transfer_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B9211C221356E0B082C4816A /* transfer_util.cpp */; }; 5B03FFBE66C7EE2CDF6B714E /* client_app_mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = FC33590C4ECC150F9CD14493 /* client_app_mac.mm */; }; + 5B112E85C066A8D1E8EF68A4 /* appshell_extensions_mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 95AC844F2FA9D42891B3B718 /* appshell_extensions_mac.mm */; }; 61A09DAC3E367C528215AB8B /* libcef_dll_wrapper.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A90B310A1CB19C285E2E13FE /* libcef_dll_wrapper.a */; }; + 6479369F5007A233EABEB8A0 /* appshell_extensions_mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 95AC844F2FA9D42891B3B718 /* appshell_extensions_mac.mm */; }; 651022340D1643D1DE957102 /* post_data_element_ctocpp.cc in Sources */ = {isa = PBXBuildFile; fileRef = 235412E5669505A9DD7C2303 /* post_data_element_ctocpp.cc */; }; 655F9692081BDAAB642B28DC /* render_process_handler_cpptoc.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8ABFDFF093F6B71602851374 /* render_process_handler_cpptoc.cc */; }; 6B295097B29E8FB628815A1B /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = EDDE848ADF50901E338C0DE5 /* MainMenu.xib */; }; @@ -362,6 +364,7 @@ 932B910099817CB226487AF4 /* cef_ptr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_ptr.h; sourceTree = ""; }; 93B4F36427B200909D58F8F9 /* cef_base.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_base.h; sourceTree = ""; }; 94288A47CD51C8E44C1D9A7D /* cef_proxy_handler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_proxy_handler.h; sourceTree = ""; }; + 95AC844F2FA9D42891B3B718 /* appshell_extensions_mac.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = appshell_extensions_mac.mm; sourceTree = ""; }; 960AF2FA67AD34478B16E1FE /* ffmpegsumo.so */ = {isa = PBXFileReference; lastKnownFileType = text; path = ffmpegsumo.so; sourceTree = ""; }; 9B6B1C35B41FBDC6DDEFF52E /* read_handler_cpptoc.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = read_handler_cpptoc.cc; sourceTree = ""; }; 9C2240AAB28AC105AD67ACFD /* cef_frame.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cef_frame.h; sourceTree = ""; }; @@ -567,6 +570,7 @@ 2CF60921DE182D498BFC8418 /* mac */, F41FB3563A8DCA978ABCB8F0 /* appshell_extensions.cpp */, 2C6200DAA24D72696664A534 /* appshell_extensions.h */, + 95AC844F2FA9D42891B3B718 /* appshell_extensions_mac.mm */, F55C44F44BBA964EFE0B704F /* brackets_extensions.js */, 522C920B68963035E6CE38FE /* cefclient.cpp */, 217F2C98268E9035AD8D9C14 /* cefclient.h */, @@ -1123,6 +1127,7 @@ 486D6CF9DA73142E734968DC /* client_handler.cpp in Sources */, ABA1F3972217F5082F33E0A4 /* client_switches.cpp in Sources */, 404420811CFE6F0A01D86D6E /* string_util.cpp in Sources */, + 5B112E85C066A8D1E8EF68A4 /* appshell_extensions_mac.mm in Sources */, 8094DACA8E9D03B15276A209 /* client_app_mac.mm in Sources */, C5EBE4A85C81F593EDF064F5 /* cefclient_mac.mm in Sources */, 7418E8ADE705BE89705C7438 /* client_handler_mac.mm in Sources */, @@ -1135,6 +1140,7 @@ buildActionMask = 2147483647; files = ( A53BD3DB0E080310E710A5CE /* appshell_extensions.cpp in Sources */, + 6479369F5007A233EABEB8A0 /* appshell_extensions_mac.mm in Sources */, A7C00A73ED6CE468CB8A2DEF /* client_app.cpp in Sources */, 5B03FFBE66C7EE2CDF6B714E /* client_app_mac.mm in Sources */, 37732F00B07028873199D832 /* client_app_delegates.cpp in Sources */, diff --git a/appshell/appshell_extensions.cpp b/appshell/appshell_extensions.cpp index c4433e0ca..759aa8308 100644 --- a/appshell/appshell_extensions.cpp +++ b/appshell/appshell_extensions.cpp @@ -26,6 +26,7 @@ namespace appshell_extensions { namespace { + class ProcessMessageDelegate : public ClientHandler::ProcessMessageDelegate { public: ProcessMessageDelegate() @@ -34,13 +35,201 @@ class ProcessMessageDelegate : public ClientHandler::ProcessMessageDelegate { // From ClientHandler::ProcessMessageDelegate. virtual bool OnProcessMessageRecieved( - CefRefPtr handler, - CefRefPtr browser, - CefProcessId source_process, - CefRefPtr message) OVERRIDE { + CefRefPtr handler, + CefRefPtr browser, + CefProcessId source_process, + CefRefPtr message) OVERRIDE { std::string message_name = message->GetName(); + CefRefPtr argList = message->GetArgumentList(); + int32 callbackId; + int32 error = NO_ERROR; + CefRefPtr response = + CefProcessMessage::Create("invokeCallback"); + CefRefPtr responseArgs = response->GetArgumentList(); + + // V8 extension messages are handled here. These messages come from the + // render process thread (in client_app.cpp), and have the following format: + // name - the name of the native function to call + // argument0 - the id of this message. This id is passed back to the + // render process in order to execute callbacks + // argument1 - argumentN - the arguments for the function + + if (argList->GetSize() < 1) { + fprintf(stderr, "No callback id specified for function %s\n", message_name.c_str()); + return false; + } + callbackId = argList->GetInt(0); + + if (message_name == "ShowOpenDialog") { + // Parameters: + // 0: int32 - callback id + // 1: bool - allowMultipleSelection + // 2: bool - chooseDirectory + // 3: string - title + // 4: string - initialPath + // 5: string - fileTypes (space-delimited string) + if (argList->GetSize() != 6 || + argList->GetType(1) != VTYPE_BOOL || + argList->GetType(2) != VTYPE_BOOL || + argList->GetType(3) != VTYPE_STRING || + argList->GetType(4) != VTYPE_STRING || + argList->GetType(5) != VTYPE_STRING) { + error = ERR_INVALID_PARAMS; + } + + CefRefPtr selectedFiles = CefListValue::Create(); + + if (error == NO_ERROR) { + bool allowMultipleSelection = argList->GetBool(1); + bool chooseDirectory = argList->GetBool(2); + ExtensionString title = argList->GetString(3); + ExtensionString initialPath = argList->GetString(4); + ExtensionString fileTypes = argList->GetString(5); + + error = ShowOpenDialog(allowMultipleSelection, + chooseDirectory, + title, + initialPath, + fileTypes, + selectedFiles); + } + + // Set response args for this function + responseArgs->SetList(2, selectedFiles); + } else if (message_name == "ReadDir") { + // Parameters: + // 0: int32 - callback id + // 1: string - directory path + if (argList->GetSize() != 2 || + argList->GetType(1) != VTYPE_STRING) { + error = ERR_INVALID_PARAMS; + } + + CefRefPtr directoryContents = CefListValue::Create(); + + if (error == NO_ERROR) { + ExtensionString path = argList->GetString(1); + + error = ReadDir(path, directoryContents); + } + + // Set response args for this function + responseArgs->SetList(2, directoryContents); + } else if (message_name == "GetFileModificationTime") { + // Parameters: + // 0: int32 - callback id + // 1: string - filename + if (argList->GetSize() != 2 || + argList->GetType(1) != VTYPE_STRING) { + error = ERR_INVALID_PARAMS; + } + + if (error == NO_ERROR) { + ExtensionString filename = argList->GetString(1); + uint32 modtime; + bool isDir; + + error = GetFileModificationTime(filename, modtime, isDir); + + // Set response args for this function + responseArgs->SetInt(2, modtime); + responseArgs->SetBool(3, isDir); + } + } else if (message_name == "ReadFile") { + // Parameters: + // 0: int32 - callback id + // 1: string - filename + // 2: string - encoding + if (argList->GetSize() != 3 || + argList->GetType(1) != VTYPE_STRING || + argList->GetType(2) != VTYPE_STRING) { + error = ERR_INVALID_PARAMS; + } + + if (error == NO_ERROR) { + ExtensionString filename = argList->GetString(1); + ExtensionString encoding = argList->GetString(2); + std::string contents = ""; + + // We only support utf8 for now + if (encoding != "utf8") { + error = ERR_UNSUPPORTED_ENCODING; + } else { + error = ReadFile(filename, encoding, contents); + } + + // Set response args for this function + responseArgs->SetString(2, contents); + } + } else if (message_name == "WriteFile") { + // Parameters: + // 0: int32 - callback id + // 1: string - filename + // 2: string - data + // 3: string - encoding + if (argList->GetSize() != 4 || + argList->GetType(1) != VTYPE_STRING || + argList->GetType(2) != VTYPE_STRING || + argList->GetType(3) != VTYPE_STRING) { + error = ERR_INVALID_PARAMS; + } + + if (error == NO_ERROR) { + ExtensionString filename = argList->GetString(1); + std::string contents = argList->GetString(2); + ExtensionString encoding = argList->GetString(3); + + error = WriteFile(filename, contents, encoding); + // No additional response args for this function + } + } else if (message_name == "SetPosixPermissions") { + // Parameters: + // 0: int32 - callback id + // 1: string - filename + // 2: int - mode + if (argList->GetSize() != 3 || + argList->GetType(1) != VTYPE_STRING || + argList->GetType(2) != VTYPE_INT) { + error = ERR_INVALID_PARAMS; + } + + if (error == NO_ERROR) { + ExtensionString filename = argList->GetString(1); + int32 mode = argList->GetInt(2); + + error = SetPosixPermissions(filename, mode); + + // No additional response args for this function + } + } else if (message_name == "DeleteFileOrDirectory") { + // Parameters: + // 0: int32 - callback id + // 1: string - filename + if (argList->GetSize() != 2 || + argList->GetType(1) != VTYPE_STRING) { + error = ERR_INVALID_PARAMS; + } + + if (error == NO_ERROR) { + ExtensionString filename = argList->GetString(1); + + error = DeleteFileOrDirectory(filename); + + // No additional response args for this function + } + } else { + fprintf(stderr, "Native function not implemented yet: %s\n", message_name.c_str()); + return false; + } + + // Set common response args (callbackId and error) + responseArgs->SetInt(0, callbackId); + responseArgs->SetInt(1, error); + + // Send response + browser->SendProcessMessage(PID_RENDERER, response); - return false; + return true; } IMPLEMENT_REFCOUNTING(ProcessMessageDelegate); diff --git a/appshell/appshell_extensions.h b/appshell/appshell_extensions.h index fb998fdbf..8b5964e52 100644 --- a/appshell/appshell_extensions.h +++ b/appshell/appshell_extensions.h @@ -33,3 +33,44 @@ void CreateProcessMessageDelegates( ClientHandler::ProcessMessageDelegateSet& delegates); void CreateRequestDelegates(ClientHandler::RequestDelegateSet& delegates); } // namespace appshell_extensions + +// Extension error codes. These MUST be in sync with the error +// codes in brackets_extensions.js +static const int NO_ERROR = 0; +static const int ERR_UNKNOWN = 1; +static const int ERR_INVALID_PARAMS = 2; +static const int ERR_NOT_FOUND = 3; +static const int ERR_CANT_READ = 4; +static const int ERR_UNSUPPORTED_ENCODING = 5; +static const int ERR_CANT_WRITE = 6; +static const int ERR_OUT_OF_SPACE = 7; +static const int ERR_NOT_FILE = 8; +static const int ERR_NOT_DIRECTORY = 9; + +#if defined(OS_WIN) +typedef std::wstring ExtensionString; +#else +typedef std::string ExtensionString; +#endif + +// Native extension code. These are implemented in brackets_extensions_mac.mm +// and brackets_extensions_win.cpp +int32 ShowOpenDialog(bool allowMulitpleSelection, + bool chooseDirectory, + ExtensionString title, + ExtensionString initialDirectory, + ExtensionString fileTypes, + CefRefPtr& selectedFiles); + +int32 ReadDir(ExtensionString path, CefRefPtr& directoryContents); + +int32 GetFileModificationTime(ExtensionString filename, uint32& modtime, bool& isDir); + +int32 ReadFile(ExtensionString filename, ExtensionString encoding, std::string& contents); + +int32 WriteFile(ExtensionString filename, std::string contents, ExtensionString encoding); + +int32 SetPosixPermissions(ExtensionString filename, int32 mode); + +int32 DeleteFileOrDirectory(ExtensionString filename); + diff --git a/appshell/appshell_extensions_mac.mm b/appshell/appshell_extensions_mac.mm new file mode 100644 index 000000000..6c3fa35a0 --- /dev/null +++ b/appshell/appshell_extensions_mac.mm @@ -0,0 +1,250 @@ +/* + * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + +#include "appshell_extensions.h" + +#include + +// Forward declarations for functions defined later in this file +void NSArrayToCefList(NSArray* array, CefRefPtr& list); +int32 ConvertNSErrorCode(NSError* error, bool isReading); + +int32 ShowOpenDialog(bool allowMulitpleSelection, + bool chooseDirectory, + ExtensionString title, + ExtensionString initialDirectory, + ExtensionString fileTypes, + CefRefPtr& selectedFiles) +{ + NSArray* allowedFileTypes = nil; + BOOL canChooseDirectories = chooseDirectory; + BOOL canChooseFiles = !canChooseDirectories; + + if (fileTypes != "") + { + // fileTypes is a Space-delimited string + allowedFileTypes = + [[NSString stringWithUTF8String:fileTypes.c_str()] + componentsSeparatedByString:@" "]; + } + + // Initialize the dialog + NSOpenPanel* openPanel = [NSOpenPanel openPanel]; + [openPanel setCanChooseFiles:canChooseFiles]; + [openPanel setCanChooseDirectories:canChooseDirectories]; + [openPanel setCanCreateDirectories:canChooseDirectories]; + [openPanel setAllowsMultipleSelection:allowMulitpleSelection]; + [openPanel setTitle: [NSString stringWithUTF8String:title.c_str()]]; + + if (initialDirectory != "") + [openPanel setDirectoryURL:[NSURL URLWithString:[NSString stringWithUTF8String:initialDirectory.c_str()]]]; + + [openPanel setAllowedFileTypes:allowedFileTypes]; + + if ([openPanel runModal] == NSOKButton) + { + NSArray* files = [openPanel filenames]; + NSArrayToCefList(files, selectedFiles); + } + + return NO_ERROR; +} + +int32 ReadDir(ExtensionString path, CefRefPtr& directoryContents) +{ + NSString* pathStr = [NSString stringWithUTF8String:path.c_str()]; + NSError* error = nil; + + NSArray* contents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:pathStr error:&error]; + + if (contents != nil) + { + NSArrayToCefList(contents, directoryContents); + return NO_ERROR; + } + + return ConvertNSErrorCode(error, true); +} + +int32 GetFileModificationTime(ExtensionString filename, uint32& modtime, bool& isDir) +{ + NSString* path = [NSString stringWithUTF8String:filename.c_str()]; + BOOL isDirectory; + + if ([[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:&isDirectory]) { + isDir = isDirectory; + } else { + return ERR_NOT_FOUND; + } + + NSError* error = nil; + NSDictionary* fileAttribs = [[NSFileManager defaultManager] attributesOfItemAtPath:path error:&error]; + NSDate *modDate = [fileAttribs valueForKey:NSFileModificationDate]; + modtime = [modDate timeIntervalSince1970]; + + return ConvertNSErrorCode(error, true); +} + +int32 ReadFile(ExtensionString filename, ExtensionString encoding, std::string& contents) +{ + NSString* path = [NSString stringWithUTF8String:filename.c_str()]; + + NSStringEncoding enc; + NSError* error = nil; + + if (encoding == "utf8") + enc = NSUTF8StringEncoding; + else + return ERR_UNSUPPORTED_ENCODING; + + NSString* fileContents = [NSString stringWithContentsOfFile:path encoding:enc error:&error]; + + if (fileContents) + { + contents = [fileContents UTF8String]; + return NO_ERROR; + } + + return ConvertNSErrorCode(error, true); +} + +int32 WriteFile(ExtensionString filename, std::string contents, ExtensionString encoding) +{ + NSString* path = [NSString stringWithUTF8String:filename.c_str()]; + NSString* contentsStr = [NSString stringWithUTF8String:contents.c_str()]; + NSStringEncoding enc; + NSError* error = nil; + + if (encoding == "utf8") + enc = NSUTF8StringEncoding; + else + return ERR_UNSUPPORTED_ENCODING; + + const NSData* encodedContents = [contentsStr dataUsingEncoding:enc]; + NSUInteger len = [encodedContents length]; + NSOutputStream* oStream = [NSOutputStream outputStreamToFileAtPath:path append:NO]; + + [oStream open]; + NSInteger res = [oStream write:(const uint8_t*)[encodedContents bytes] maxLength:len]; + [oStream close]; + + if (res == -1) { + error = [oStream streamError]; + } + + return ConvertNSErrorCode(error, false); +} + +int32 SetPosixPermissions(ExtensionString filename, int32 mode) +{ + NSError* error = nil; + + NSString* path = [NSString stringWithUTF8String:filename.c_str()]; + NSDictionary* attrs = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:mode] forKey:NSFilePosixPermissions]; + + if ([[NSFileManager defaultManager] setAttributes:attrs ofItemAtPath:path error:&error]) + return NO_ERROR; + + return ConvertNSErrorCode(error, false); +} + +int32 DeleteFileOrDirectory(ExtensionString filename) +{ + NSError* error = nil; + + NSString* path = [NSString stringWithUTF8String:filename.c_str()]; + BOOL isDirectory; + + // Contrary to the name of this function, we don't actually delete directories + if ([[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:&isDirectory]) { + if (isDirectory) { + return ERR_NOT_FILE; + } + } else { + return ERR_NOT_FOUND; + } + + if ([[NSFileManager defaultManager] removeItemAtPath:path error:&error]) + return NO_ERROR; + + return ConvertNSErrorCode(error, false); +} + +void NSArrayToCefList(NSArray* array, CefRefPtr& list) +{ + for (NSUInteger i = 0; i < [array count]; i++) { + list->SetString(i, [[array objectAtIndex:i] UTF8String]); + } +} + +int32 ConvertNSErrorCode(NSError* error, bool isReading) +{ + if (!error) + return NO_ERROR; + + if( [[error domain] isEqualToString: NSPOSIXErrorDomain] ) + { + switch ([error code]) + { + case ENOENT: + return ERR_NOT_FOUND; + break; + case EPERM: + case EACCES: + return (isReading ? ERR_CANT_READ : ERR_CANT_WRITE); + break; + case EROFS: + return ERR_CANT_WRITE; + break; + case ENOSPC: + return ERR_OUT_OF_SPACE; + break; + } + + } + + + switch ([error code]) + { + case NSFileNoSuchFileError: + case NSFileReadNoSuchFileError: + return ERR_NOT_FOUND; + break; + case NSFileReadNoPermissionError: + return ERR_CANT_READ; + break; + case NSFileReadInapplicableStringEncodingError: + return ERR_UNSUPPORTED_ENCODING; + break; + case NSFileWriteNoPermissionError: + return ERR_CANT_WRITE; + break; + case NSFileWriteOutOfSpaceError: + return ERR_OUT_OF_SPACE; + break; + } + + // Unknown error + return ERR_UNKNOWN; +} + diff --git a/appshell/appshell_extensions_win.cpp b/appshell/appshell_extensions_win.cpp new file mode 100644 index 000000000..150a07e90 --- /dev/null +++ b/appshell/appshell_extensions_win.cpp @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + +#include "appshell_extensions.h" \ No newline at end of file diff --git a/appshell/brackets_extensions.js b/appshell/brackets_extensions.js index e8f145389..d9e3b4f9e 100644 --- a/appshell/brackets_extensions.js +++ b/appshell/brackets_extensions.js @@ -40,20 +40,9 @@ if (!brackets.fs) { if (!brackets.app) { brackets.app = {}; } -(function () { - // Internal function to get the last error code. - native function GetLastError(); - function getLastError() { - return GetLastError(); - } - - // For debug purposes. When true, a 10 millisecond timeout is - // run before the callback is called. See invokeCallback() below - // for details. - brackets.forceAsyncCallbacks = false; - +(function () { // Error values. These MUST be in sync with the error values - // at the top of brackets_extensions.mm. + // at the top of brackets_extensions.h. /** * @constant No error. @@ -104,28 +93,7 @@ if (!brackets.app) { * @constant Specified path does not point to a directory. */ brackets.fs.ERR_NOT_DIRECTORY = 9; - - /** - * Invoke a callback function. - * - * If the variable "brackets.forceAsyncCallbacks" is true, the callback is called after a 10 - * ms timer is run. If brackets.forceAsyncCallbacks is false, the callback is called - * immediately. - */ - function invokeCallback(callback) { - var args = [].splice.call(arguments, 1); - - function doCallback() { - callback.apply(this, args); - } - - if (brackets.forceAsyncCallbacks) { - setTimeout(doCallback, 10); - } else { - doCallback(); - } - } - + /** * Display the OS File Open dialog, allowing the user to select * files or directories. @@ -150,11 +118,9 @@ if (!brackets.app) { native function ShowOpenDialog(); brackets.fs.showOpenDialog = function (allowMultipleSelection, chooseDirectory, title, initialPath, fileTypes, callback) { setTimeout(function () { - var resultString = ShowOpenDialog(allowMultipleSelection, chooseDirectory, - title || 'Open', initialPath || '', - fileTypes ? fileTypes.join(' ') : ''); - var result = JSON.parse(resultString || '[]'); - invokeCallback(callback, getLastError(), result); + ShowOpenDialog(callback, allowMultipleSelection, chooseDirectory, + title || 'Open', initialPath || '', + fileTypes ? fileTypes.join(' ') : ''); }, 0); }; @@ -176,9 +142,7 @@ if (!brackets.app) { */ native function ReadDir(); brackets.fs.readdir = function (path, callback) { - var resultString = ReadDir(path); - var result = JSON.parse(resultString || '[]'); - invokeCallback(callback, getLastError(), result); + var resultString = ReadDir(callback, path); }; /** @@ -195,20 +159,19 @@ if (!brackets.app) { * * @return None. This is an asynchronous call that sends all return information to the callback. */ - native function IsDirectory(); native function GetFileModificationTime(); brackets.fs.stat = function (path, callback) { - var isDir = IsDirectory(path); - var modtime = GetFileModificationTime(path); - invokeCallback(callback, getLastError(), { - isFile: function () { - return !isDir; - }, - isDirectory: function () { - return isDir; - }, - mtime: modtime - }); + GetFileModificationTime(function (err, modtime, isDir) { + callback(err, { + isFile: function () { + return !isDir; + }, + isDirectory: function () { + return isDir; + }, + mtime: new Date(modtime * 1000) // modtime is seconds since 1970, convert to ms + }); + }, path); }; /** @@ -246,8 +209,7 @@ if (!brackets.app) { */ native function ReadFile(); brackets.fs.readFile = function (path, encoding, callback) { - var contents = ReadFile(path, encoding); - invokeCallback(callback, getLastError(), contents); + ReadFile(callback, path, encoding); }; /** @@ -269,10 +231,7 @@ if (!brackets.app) { */ native function WriteFile(); brackets.fs.writeFile = function (path, data, encoding, callback) { - WriteFile(path, data, encoding); - if (callback) { - invokeCallback(callback, getLastError()); - } + WriteFile(callback, path, data, encoding); }; /** @@ -291,8 +250,7 @@ if (!brackets.app) { */ native function SetPosixPermissions(); brackets.fs.chmod = function (path, mode, callback) { - SetPosixPermissions(path, mode); - invokeCallback(callback, getLastError()); + SetPosixPermissions(callback, path, mode); }; /** @@ -310,15 +268,8 @@ if (!brackets.app) { * @return None. This is an asynchronous call that sends all return information to the callback. */ native function DeleteFileOrDirectory(); - native function IsDirectory(); brackets.fs.unlink = function (path, callback) { - // Unlink can only delete files - if (IsDirectory(path)) { - invokeCallback(callback, brackets.fs.ERR_NOT_FILE); - return; - } - DeleteFileOrDirectory(path); - invokeCallback(callback, getLastError()); + DeleteFileOrDirectory(callback, path); }; /** @@ -346,11 +297,13 @@ if (!brackets.app) { */ native function OpenLiveBrowser(); brackets.app.openLiveBrowser = function (url, enableRemoteDebugging, callback) { + /* // enableRemoteDebugging flag is ignored on mac setTimeout(function() { OpenLiveBrowser(url); callback(getLastError()); }, 0); + */ }; /** @@ -368,19 +321,8 @@ if (!brackets.app) { */ native function CloseLiveBrowser(); brackets.app.closeLiveBrowser = function (callback) { + /* CloseLiveBrowser(callback); + */ }; - - /** - * Workaround for CEF bug #501. On Mac, focus (and blur) events are not sent to the - * window object. In order for our "sync files on app activate" feature to work, fake - * a focus event here. - * TODO (issue 69) - Remove this function once CEF bug #501 is fixed. - * http://code.google.com/p/chromiumembedded/issues/detail?id=501 - */ - brackets.sendFakeFocusEvent = function() { - var evt = document.createEvent("HTMLEvents"); - evt.initEvent("focus", false); - window.dispatchEvent(evt); - } })(); diff --git a/appshell/cefclient_mac.mm b/appshell/cefclient_mac.mm index ab28f58d0..2eec4acb2 100644 --- a/appshell/cefclient_mac.mm +++ b/appshell/cefclient_mac.mm @@ -16,6 +16,9 @@ #include "resource_util.h" #include "string_util.h" +// Application startup time +CFTimeInterval g_appStartupTime; + // The global ClientHandler reference. extern CefRefPtr g_handler; @@ -292,6 +295,9 @@ - (void)createApp:(id)object { // Populate the settings based on command line arguments. AppGetBrowserSettings(settings); + settings.file_access_from_file_urls_allowed = true; + settings.universal_access_from_file_urls_allowed = true; + window_info.SetAsChild(contentView, 0, 0, kWindowWidth, kWindowHeight); CefBrowserHost::CreateBrowser(window_info, g_handler.get(), "http://www.google.com", settings); @@ -329,6 +335,9 @@ - (void)applicationWillTerminate:(NSNotification *)aNotification { int main(int argc, char* argv[]) { CefMainArgs main_args(argc, argv); + + g_appStartupTime = CFAbsoluteTimeGetCurrent(); + CefRefPtr app(new ClientApp); // Execute the secondary process, if any. diff --git a/appshell/client_app.cpp b/appshell/client_app.cpp index 885d768d8..57578d6fe 100644 --- a/appshell/client_app.cpp +++ b/appshell/client_app.cpp @@ -52,6 +52,37 @@ void SetList(CefRefPtr source, CefRefPtr target) { SetListValue(target, i, source->GetValue(i)); } +CefRefPtr ListValueToV8Value(CefRefPtr value, int index) +{ + CefRefPtr new_value; + + CefValueType type = value->GetType(index); + switch (type) { + case VTYPE_LIST: { + CefRefPtr list = value->GetList(index); + new_value = CefV8Value::CreateArray(list->GetSize()); + SetList(list, new_value); + } break; + case VTYPE_BOOL: + new_value = CefV8Value::CreateBool(value->GetBool(index)); + break; + case VTYPE_DOUBLE: + new_value = CefV8Value::CreateDouble(value->GetDouble(index)); + break; + case VTYPE_INT: + new_value = CefV8Value::CreateInt(value->GetInt(index)); + break; + case VTYPE_STRING: + new_value = CefV8Value::CreateString(value->GetString(index)); + break; + default: + new_value = CefV8Value::CreateNull(); + break; + } + + return new_value; +} + // Transfer a List value to a V8 array index. void SetListValue(CefRefPtr list, int index, CefRefPtr value) { @@ -104,7 +135,8 @@ void SetList(CefRefPtr source, CefRefPtr target) { class AppShellExtensionHandler : public CefV8Handler { public: explicit AppShellExtensionHandler(CefRefPtr client_app) - { + : client_app_(client_app) + , messageId(0) { } virtual bool Execute(const CefString& name, @@ -113,23 +145,46 @@ class AppShellExtensionHandler : public CefV8Handler { CefRefPtr& retval, CefString& exception) { - // Pass all messages to the browser process. Look in appshell_extensions.cpp for implementation. - CefRefPtr browser = - CefV8Context::GetCurrentContext()->GetBrowser(); - ASSERT(browser.get()); - CefRefPtr message = - CefProcessMessage::Create(name); - CefRefPtr messageArgs = message->GetArgumentList(); - for (unsigned int i = 0; i < arguments.size(); i++) - SetListValue(messageArgs, i, arguments[i]); - browser->SendProcessMessage(PID_BROWSER, message); + // The only message that is handled here is getElapsedMilliseconds(). All other + // messages are passed to the browser process. + if (name == "GetElapsedMilliseconds") { + retval = CefV8Value::CreateDouble(client_app_->GetElapsedMilliseconds()); + } else { + // Pass all messages to the browser process. Look in appshell_extensions.cpp for implementation. + CefRefPtr browser = + CefV8Context::GetCurrentContext()->GetBrowser(); + ASSERT(browser.get()); + CefRefPtr message = + CefProcessMessage::Create(name); + CefRefPtr messageArgs = message->GetArgumentList(); + + // The first argument must be a callback function + if (arguments.size() < 1 || !arguments[0]->IsFunction()) { + std::string functionName = name; + fprintf(stderr, "Function called without callback param: %s\n", functionName.c_str()); + return false; + } + + // The first argument is the message id + client_app_->AddCallback(messageId, CefV8Context::GetCurrentContext(), arguments[0]); + SetListValue(messageArgs, 0, CefV8Value::CreateInt(messageId)); + + // Pass the rest of the arguments + for (unsigned int i = 1; i < arguments.size(); i++) + SetListValue(messageArgs, i, arguments[i]); + browser->SendProcessMessage(PID_BROWSER, message); + + messageId++; + } return true; } private: + CefRefPtr client_app_; + int32 messageId; - IMPLEMENT_REFCOUNTING(AppShellExtensionHandler); + IMPLEMENT_REFCOUNTING(AppShellExtensionHandler); }; } // namespace @@ -179,19 +234,39 @@ void ClientApp::OnContextReleased(CefRefPtr browser, } bool ClientApp::OnProcessMessageRecieved( - CefRefPtr browser, - CefProcessId source_process, - CefRefPtr message) { - ASSERT(source_process == PID_BROWSER); - - bool handled = false; - - // Execute delegate callbacks. - RenderDelegateSet::iterator it = render_delegates_.begin(); - for (; it != render_delegates_.end() && !handled; ++it) { - handled = (*it)->OnProcessMessageRecieved(this, browser, source_process, - message); - } - - return handled; + CefRefPtr browser, + CefProcessId source_process, + CefRefPtr message) { + ASSERT(source_process == PID_BROWSER); + + bool handled = false; + + // Execute delegate callbacks. + RenderDelegateSet::iterator it = render_delegates_.begin(); + for (; it != render_delegates_.end() && !handled; ++it) { + handled = (*it)->OnProcessMessageRecieved(this, browser, source_process, message); + } + + if (!handled) { + if (message->GetName() == "invokeCallback") { + CefRefPtr messageArgs = message->GetArgumentList(); + int32 callbackId = messageArgs->GetInt(0); + + CefRefPtr context = callback_map_[callbackId].first; + CefRefPtr callbackFunction = callback_map_[callbackId].second; + CefV8ValueList arguments; + context->Enter(); + + for (size_t i = 1; i < messageArgs->GetSize(); i++) { + arguments.push_back(ListValueToV8Value(messageArgs, i)); + } + + callbackFunction->ExecuteFunction(NULL, arguments); + context->Exit(); + + callback_map_.erase(callbackId); + } + } + + return handled; } diff --git a/appshell/client_app.h b/appshell/client_app.h index dc3e7184d..0a775224a 100644 --- a/appshell/client_app.h +++ b/appshell/client_app.h @@ -57,6 +57,7 @@ class ClientApp : public CefApp, }; typedef std::set > RenderDelegateSet; + typedef std::map, CefRefPtr > > CallbackMap; ClientApp(); @@ -66,10 +67,16 @@ class ClientApp : public CefApp, proxy_type_ = proxy_type; proxy_config_ = proxy_config; } + + void AddCallback(int32 id, CefRefPtr context, CefRefPtr callbackFunction) { + callback_map_[id] = std::make_pair(context, callbackFunction); + } - private: + // Platform-specific methods implemented in client_app_mac/client_app_win + double GetElapsedMilliseconds(); std::string GetExtensionJSSource(); +private: // Creates all of the RenderDelegate objects. Implemented in // client_app_delegates. static void CreateRenderDelegates(RenderDelegateSet& delegates); @@ -107,14 +114,11 @@ class ClientApp : public CefApp, cef_proxy_type_t proxy_type_; CefString proxy_config_; - // Map of message callbacks. - typedef std::map, - std::pair, CefRefPtr > > - CallbackMap; - CallbackMap callback_map_; - // Set of supported RenderDelegates. RenderDelegateSet render_delegates_; + + // Set of callbacks + CallbackMap callback_map_; IMPLEMENT_REFCOUNTING(ClientApp); }; diff --git a/appshell/client_app_mac.mm b/appshell/client_app_mac.mm index 2a42f3aae..3372f1c6c 100644 --- a/appshell/client_app_mac.mm +++ b/appshell/client_app_mac.mm @@ -27,6 +27,15 @@ #include +extern CFTimeInterval g_appStartupTime; + +double ClientApp::GetElapsedMilliseconds() +{ + CFAbsoluteTime elapsed = CFAbsoluteTimeGetCurrent() - g_appStartupTime; + + return round(elapsed * 1000); +} + std::string ClientApp::GetExtensionJSSource() { std::string result; diff --git a/appshell/config.h b/appshell/config.h index 7d5250cc3..c73a72af0 100644 --- a/appshell/config.h +++ b/appshell/config.h @@ -1,2 +1,2 @@ -// #define SHOW_TOOLBAR_UI +#define SHOW_TOOLBAR_UI diff --git a/appshell/process_helper_mac.cpp b/appshell/process_helper_mac.cpp index 7354b036a..03fb18ee2 100644 --- a/appshell/process_helper_mac.cpp +++ b/appshell/process_helper_mac.cpp @@ -4,10 +4,15 @@ #include "include/cef_app.h" +#include + // This file is shared by cefclient and cef_unittests so don't include using // a qualified path. #include "client_app.h" // NOLINT(build/include) +// Application startup time +CFTimeInterval g_appStartupTime; + // Stub implementations. std::string AppGetWorkingDirectory() { return std::string(); @@ -16,10 +21,13 @@ CefWindowHandle AppGetMainHwnd() { return NULL; } + // Process entry point. int main(int argc, char* argv[]) { CefMainArgs main_args(argc, argv); - + + g_appStartupTime = CFAbsoluteTimeGetCurrent(); + CefRefPtr app(new ClientApp); // Execute the secondary process. diff --git a/appshell_paths.gypi b/appshell_paths.gypi index 5675fbaf7..9eca5ec90 100755 --- a/appshell_paths.gypi +++ b/appshell_paths.gypi @@ -99,6 +99,7 @@ 'appshell/util.h', ], 'appshell_sources_win': [ + 'appshell/appshell_extensions_win.cpp', 'appshell/cefclient.rc', 'appshell/cefclient_win.cpp', 'appshell/client_app_win.cpp', @@ -110,6 +111,7 @@ 'appshell/resource_util_win.cpp', ], 'appshell_sources_mac': [ + 'appshell/appshell_extensions_mac.mm', 'appshell/client_app_mac.mm', 'appshell/cefclient_mac.mm', 'appshell/client_handler_mac.mm', @@ -118,6 +120,7 @@ 'appshell_sources_mac_helper': [ 'appshell/appshell_extensions.cpp', 'appshell/appshell_extensions.h', + 'appshell/appshell_extensions_mac.mm', 'appshell/client_app.cpp', 'appshell/client_app.h', 'appshell/client_app_mac.mm', From 6cb1393389b2eb11c17598daca82de2815dcb4ca Mon Sep 17 00:00:00 2001 From: Glenn Ruehle Date: Mon, 11 Jun 2012 07:15:40 -0700 Subject: [PATCH 5/7] Longer timeout before calling ShowOpenDialog to make sure the menu is closed first. --- appshell/brackets_extensions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appshell/brackets_extensions.js b/appshell/brackets_extensions.js index d9e3b4f9e..f35263e83 100644 --- a/appshell/brackets_extensions.js +++ b/appshell/brackets_extensions.js @@ -121,7 +121,7 @@ if (!brackets.app) { ShowOpenDialog(callback, allowMultipleSelection, chooseDirectory, title || 'Open', initialPath || '', fileTypes ? fileTypes.join(' ') : ''); - }, 0); + }, 10); }; /** From 7a0d090023b9d47c2a488905f2d790573a1d98a9 Mon Sep 17 00:00:00 2001 From: Glenn Ruehle Date: Mon, 11 Jun 2012 11:45:47 -0700 Subject: [PATCH 6/7] Initial windows implementation of file io --- Brackets.vcxproj | 2 +- appshell/appshell_extensions.cpp | 7 +- appshell/appshell_extensions.h | 2 + appshell/appshell_extensions_win.cpp | 322 ++++++++++++++++++++++++++- appshell/cefclient_win.cpp | 3 + appshell/client_app_win.cpp | 6 + 6 files changed, 334 insertions(+), 8 deletions(-) diff --git a/Brackets.vcxproj b/Brackets.vcxproj index 9e81e947c..ba39d9a8d 100644 --- a/Brackets.vcxproj +++ b/Brackets.vcxproj @@ -1 +1 @@ -DebugWin32Debugx64ReleaseWin32Releasex64{6617FED9-C5D4-4907-BF55-A90062A6683F}Win32ProjBracketsUnicodeApplication$(ExecutablePath);$(MSBuildProjectDirectory)\..\src\third_party\cygwin\bin\;$(MSBuildProjectDirectory)\..\src\third_party\python_26\$(Configuration)\$(OutDir)obj\$(ProjectName)\falsefalsetruetrue$(ProjectName)$(OutDir)\$(ProjectName).exe..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)/MP /we4389 %(AdditionalOptions)EnableFastCheckstrueProgramDatabase4351;4396;4503;4819;4100;4121;4125;4127;4130;4131;4189;4201;4238;4244;4245;4310;4355;4428;4481;4505;4510;4512;4530;4610;4611;4701;4702;4706;%(DisableSpecificWarnings)falsetruefalseDisabled_DEBUG;_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)MultiThreadedDebugfalsetrueLevel4../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib;%(AdditionalLibraryDirectories)/ignore:4221 %(AdditionalOptions)wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;atlthunk.lib;comctl32.lib;shlwapi.lib;rpcrt4.lib;opengl32.lib;glu32.lib;lib\$(Configuration)\libcef.lib;%(AdditionalDependencies)../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib;%(AdditionalLibraryDirectories)/ignore:4254 /ignore:4078 /safeseh /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)wWinMainCRTStartupfalsetrue$(OutDir)lib\$(TargetName).lib$(OutDir)$(TargetName).map$(OutDir)$(ProjectName).exefalseWindowsMachineX86%(Filename).dlldata.ctrue%(Filename).h%(Filename)_i.c$(IntDir)%(Filename)_p.c%(Filename).tlb../src;$(OutDir)obj/global_intermediate;..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)0x0409_DEBUG;_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)/MP /we4389 %(AdditionalOptions)EnableFastCheckstrueProgramDatabase4351;4396;4503;4819;4100;4121;4125;4127;4130;4131;4189;4201;4238;4244;4245;4310;4355;4428;4481;4505;4510;4512;4530;4610;4611;4701;4702;4706;%(DisableSpecificWarnings)falsetruefalseDisabled_DEBUG;_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NO_TCMALLOC;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)MultiThreadedDebugfalsetrueLevel4../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib/x64;%(AdditionalLibraryDirectories)/ignore:4221 %(AdditionalOptions)wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;atlthunk.lib;comctl32.lib;shlwapi.lib;rpcrt4.lib;opengl32.lib;glu32.lib;lib\$(Configuration)\libcef.lib;%(AdditionalDependencies)../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib/x64;%(AdditionalLibraryDirectories)/ignore:4254 /ignore:4078 /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)wWinMainCRTStartupfalsetrue$(OutDir)lib\$(TargetName).lib$(OutDir)$(TargetName).map$(OutDir)$(ProjectName).exefalseWindowsMachineX64%(Filename).dlldata.ctrue%(Filename).h%(Filename)_i.c$(IntDir)%(Filename)_p.c%(Filename).tlb../src;$(OutDir)obj/global_intermediate;..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)0x0409_DEBUG;_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NO_TCMALLOC;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)/MP /we4389 /Oy- %(AdditionalOptions)trueProgramDatabase4351;4396;4503;4819;4100;4121;4125;4127;4130;4131;4189;4201;4238;4244;4245;4310;4355;4428;4481;4505;4510;4512;4530;4610;4611;4701;4702;4706;%(DisableSpecificWarnings)falsetrueAnySuitablefalsefalseMaxSpeed_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions)MultiThreadedfalsetruetrueLevel4../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib;%(AdditionalLibraryDirectories)/ignore:4221 %(AdditionalOptions)wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;atlthunk.lib;comctl32.lib;shlwapi.lib;rpcrt4.lib;opengl32.lib;glu32.lib;lib\$(Configuration)\libcef.lib;%(AdditionalDependencies)../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib;%(AdditionalLibraryDirectories)/ignore:4254 /ignore:4078 /safeseh /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)truewWinMainCRTStartupfalsetrue$(OutDir)lib\$(TargetName).lib$(OutDir)$(TargetName).maptrue$(OutDir)$(ProjectName).exetrueWindowsMachineX86%(Filename).dlldata.ctrue%(Filename).h%(Filename)_i.c$(IntDir)%(Filename)_p.c%(Filename).tlb../src;$(OutDir)obj/global_intermediate;..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)0x0409_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions);%(PreprocessorDefinitions)..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)/MP /we4389 /Oy- %(AdditionalOptions)trueProgramDatabase4351;4396;4503;4819;4100;4121;4125;4127;4130;4131;4189;4201;4238;4244;4245;4310;4355;4428;4481;4505;4510;4512;4530;4610;4611;4701;4702;4706;%(DisableSpecificWarnings)falsetrueAnySuitablefalsefalseMaxSpeed_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NO_TCMALLOC;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions)MultiThreadedfalsetruetrueLevel4../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib/x64;%(AdditionalLibraryDirectories)/ignore:4221 %(AdditionalOptions)wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;atlthunk.lib;comctl32.lib;shlwapi.lib;rpcrt4.lib;opengl32.lib;glu32.lib;lib\$(Configuration)\libcef.lib;%(AdditionalDependencies)../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib/x64;%(AdditionalLibraryDirectories)/ignore:4254 /ignore:4078 /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)truewWinMainCRTStartupfalsetrue$(OutDir)lib\$(TargetName).lib$(OutDir)$(TargetName).maptrue$(OutDir)$(ProjectName).exetrueWindowsMachineX64%(Filename).dlldata.ctrue%(Filename).h%(Filename)_i.c$(IntDir)%(Filename)_p.c%(Filename).tlb../src;$(OutDir)obj/global_intermediate;..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)0x0409_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NO_TCMALLOC;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions);%(PreprocessorDefinitions){A9D6DC71-C0DC-4549-AEA0-3B15B44E86A9}false \ No newline at end of file +DebugWin32Debugx64ReleaseWin32Releasex64{6617FED9-C5D4-4907-BF55-A90062A6683F}Win32ProjBracketsUnicodeApplication$(ExecutablePath);$(MSBuildProjectDirectory)\..\src\third_party\cygwin\bin\;$(MSBuildProjectDirectory)\..\src\third_party\python_26\$(Configuration)\$(OutDir)obj\$(ProjectName)\falsefalsetruetrue$(ProjectName)$(OutDir)\$(ProjectName).exe..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)/MP /we4389 %(AdditionalOptions)EnableFastCheckstrueProgramDatabase4351;4396;4503;4819;4100;4121;4125;4127;4130;4131;4189;4201;4238;4244;4245;4310;4355;4428;4481;4505;4510;4512;4530;4610;4611;4701;4702;4706;%(DisableSpecificWarnings)falsetruefalseDisabled_DEBUG;_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)MultiThreadedDebugfalsetrueLevel4../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib;%(AdditionalLibraryDirectories)/ignore:4221 %(AdditionalOptions)wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;atlthunk.lib;comctl32.lib;shlwapi.lib;rpcrt4.lib;opengl32.lib;glu32.lib;lib\$(Configuration)\libcef.lib;%(AdditionalDependencies)../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib;%(AdditionalLibraryDirectories)/ignore:4254 /ignore:4078 /safeseh /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)wWinMainCRTStartupfalsetrue$(OutDir)lib\$(TargetName).lib$(OutDir)$(TargetName).map$(OutDir)$(ProjectName).exefalseWindowsMachineX86%(Filename).dlldata.ctrue%(Filename).h%(Filename)_i.c$(IntDir)%(Filename)_p.c%(Filename).tlb../src;$(OutDir)obj/global_intermediate;..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)0x0409_DEBUG;_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)/MP /we4389 %(AdditionalOptions)EnableFastCheckstrueProgramDatabase4351;4396;4503;4819;4100;4121;4125;4127;4130;4131;4189;4201;4238;4244;4245;4310;4355;4428;4481;4505;4510;4512;4530;4610;4611;4701;4702;4706;%(DisableSpecificWarnings)falsetruefalseDisabled_DEBUG;_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NO_TCMALLOC;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)MultiThreadedDebugfalsetrueLevel4../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib/x64;%(AdditionalLibraryDirectories)/ignore:4221 %(AdditionalOptions)wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;atlthunk.lib;comctl32.lib;shlwapi.lib;rpcrt4.lib;opengl32.lib;glu32.lib;lib\$(Configuration)\libcef.lib;%(AdditionalDependencies)../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib/x64;%(AdditionalLibraryDirectories)/ignore:4254 /ignore:4078 /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)wWinMainCRTStartupfalsetrue$(OutDir)lib\$(TargetName).lib$(OutDir)$(TargetName).map$(OutDir)$(ProjectName).exefalseWindowsMachineX64%(Filename).dlldata.ctrue%(Filename).h%(Filename)_i.c$(IntDir)%(Filename)_p.c%(Filename).tlb../src;$(OutDir)obj/global_intermediate;..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)0x0409_DEBUG;_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NO_TCMALLOC;DYNAMIC_ANNOTATIONS_ENABLED=1;WTF_USE_DYNAMIC_ANNOTATIONS=1;%(PreprocessorDefinitions)..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)/MP /we4389 /Oy- %(AdditionalOptions)trueProgramDatabase4351;4396;4503;4819;4100;4121;4125;4127;4130;4131;4189;4201;4238;4244;4245;4310;4355;4428;4481;4505;4510;4512;4530;4610;4611;4701;4702;4706;%(DisableSpecificWarnings)falsetrueAnySuitablefalsefalseMaxSpeed_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions)MultiThreadedfalsetruetrueLevel4../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib;%(AdditionalLibraryDirectories)/ignore:4221 %(AdditionalOptions)wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;atlthunk.lib;comctl32.lib;shlwapi.lib;rpcrt4.lib;opengl32.lib;glu32.lib;lib\$(Configuration)\libcef.lib;%(AdditionalDependencies)../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib;%(AdditionalLibraryDirectories)/ignore:4254 /ignore:4078 /safeseh /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)truewWinMainCRTStartupfalsetrue$(OutDir)lib\$(TargetName).lib$(OutDir)$(TargetName).maptrue$(OutDir)$(ProjectName).exetrueWindowsMachineX86%(Filename).dlldata.ctrue%(Filename).h%(Filename)_i.c$(IntDir)%(Filename)_p.c%(Filename).tlb../src;$(OutDir)obj/global_intermediate;..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)0x0409_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions);%(PreprocessorDefinitions)..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)/MP /we4389 /Oy- %(AdditionalOptions)trueProgramDatabase4351;4396;4503;4819;4100;4121;4125;4127;4130;4131;4189;4201;4238;4244;4245;4310;4355;4428;4481;4505;4510;4512;4530;4610;4611;4701;4702;4706;%(DisableSpecificWarnings)falsetrueAnySuitablefalsefalseMaxSpeed_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NO_TCMALLOC;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions)MultiThreadedfalsetruetrueLevel4../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib/x64;%(AdditionalLibraryDirectories)/ignore:4221 %(AdditionalOptions)wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;atlthunk.lib;comctl32.lib;shlwapi.lib;rpcrt4.lib;opengl32.lib;glu32.lib;lib\$(Configuration)\libcef.lib;%(AdditionalDependencies)../src/third_party/directxsdk/files/Lib/x86;../src/third_party/platformsdk_win7/files/Lib/x64;%(AdditionalLibraryDirectories)/ignore:4254 /ignore:4078 /dynamicbase /ignore:4199 /ignore:4221 /nxcompat %(AdditionalOptions)dbghelp.dll;dwmapi.dll;shell32.dll;uxtheme.dll;%(DelayLoadDLLs)truewWinMainCRTStartupfalsetrue$(OutDir)lib\$(TargetName).lib$(OutDir)$(TargetName).maptrue$(OutDir)$(ProjectName).exetrueWindowsMachineX64%(Filename).dlldata.ctrue%(Filename).h%(Filename)_i.c$(IntDir)%(Filename)_p.c%(Filename).tlb../src;$(OutDir)obj/global_intermediate;..\src\third_party\wtl\include;.;..\src\third_party\directxsdk\files\Include;..\src\third_party\platformsdk_win7\files\Include;$(VSInstallDir)\VC\atlmfc\include;%(AdditionalIncludeDirectories)0x0409_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;NOMINMAX;PSAPI_VERSION=1;_CRT_RAND_S;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;WIN32_LEAN_AND_MEAN;_ATL_NO_OPENGL;_HAS_EXCEPTIONS=0;CHROMIUM_BUILD;TOOLKIT_VIEWS=1;ENABLE_ONE_CLICK_SIGNIN;ENABLE_REMOTING=1;ENABLE_WEBRTC=1;ENABLE_CONFIGURATION_POLICY;ENABLE_INPUT_SPEECH;ENABLE_NOTIFICATIONS;ENABLE_GPU=1;ENABLE_EGLIMAGE=1;USE_SKIA=1;__STD_C;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;ENABLE_TASK_MANAGER=1;ENABLE_WEB_INTENTS=1;ENABLE_EXTENSIONS=1;ENABLE_PLUGIN_INSTALLATION=1;ENABLE_PROTECTOR_SERVICE=1;ENABLE_SESSION_SERVICE=1;ENABLE_THEMES=1;ENABLE_BACKGROUND=1;ENABLE_PROMO_RESOURCE_SERVICE=1;ENABLE_AUTOMATION=1;USING_CEF_SHARED;__STDC_FORMAT_MACROS;NO_TCMALLOC;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;%(PreprocessorDefinitions);%(PreprocessorDefinitions){A9D6DC71-C0DC-4549-AEA0-3B15B44E86A9}false \ No newline at end of file diff --git a/appshell/appshell_extensions.cpp b/appshell/appshell_extensions.cpp index 759aa8308..5b1aff08b 100644 --- a/appshell/appshell_extensions.cpp +++ b/appshell/appshell_extensions.cpp @@ -151,12 +151,7 @@ class ProcessMessageDelegate : public ClientHandler::ProcessMessageDelegate { ExtensionString encoding = argList->GetString(2); std::string contents = ""; - // We only support utf8 for now - if (encoding != "utf8") { - error = ERR_UNSUPPORTED_ENCODING; - } else { - error = ReadFile(filename, encoding, contents); - } + error = ReadFile(filename, encoding, contents); // Set response args for this function responseArgs->SetString(2, contents); diff --git a/appshell/appshell_extensions.h b/appshell/appshell_extensions.h index 8b5964e52..a94ae2cf7 100644 --- a/appshell/appshell_extensions.h +++ b/appshell/appshell_extensions.h @@ -36,7 +36,9 @@ void CreateRequestDelegates(ClientHandler::RequestDelegateSet& delegates); // Extension error codes. These MUST be in sync with the error // codes in brackets_extensions.js +#if !defined(OS_WIN) // NO_ERROR is defined on windows static const int NO_ERROR = 0; +#endif static const int ERR_UNKNOWN = 1; static const int ERR_INVALID_PARAMS = 2; static const int ERR_NOT_FOUND = 3; diff --git a/appshell/appshell_extensions_win.cpp b/appshell/appshell_extensions_win.cpp index 150a07e90..2a4626faa 100644 --- a/appshell/appshell_extensions_win.cpp +++ b/appshell/appshell_extensions_win.cpp @@ -21,4 +21,324 @@ * */ -#include "appshell_extensions.h" \ No newline at end of file +#include "appshell_extensions.h" + +#include +#include + +// Forward declarations for functions at the bottom of this file +int ConvertErrnoCode(int errorCode, bool isReading = true); +int ConvertWinErrorCode(int errorCode, bool isReading = true); + +static int CALLBACK SetInitialPathCallback(HWND hWnd, UINT uMsg, LPARAM lParam, LPARAM lpData) +{ + if (BFFM_INITIALIZED == uMsg && NULL != lpData) + { + SendMessage(hWnd, BFFM_SETSELECTION, TRUE, lpData); + } + + return 0; +} + +int32 ShowOpenDialog(bool allowMulitpleSelection, + bool chooseDirectory, + ExtensionString title, + ExtensionString initialDirectory, + ExtensionString fileTypes, + CefRefPtr& selectedFiles) +{ + wchar_t szFile[MAX_PATH]; + szFile[0] = 0; + + // TODO (issue #64) - This method should be using IFileDialog instead of the + /* outdated SHGetPathFromIDList and GetOpenFileName. + + Useful function to parse fileTypesStr: + template + int inline findAndReplaceString(T& source, const T& find, const T& replace) + { + int num=0; + int fLen = find.size(); + int rLen = replace.size(); + for (int pos=0; (pos=source.find(find, pos))!=T::npos; pos+=rLen) + { + num++; + source.replace(pos, fLen, replace); + } + return num; + } + */ + + if (chooseDirectory) { + BROWSEINFO bi = {0}; + bi.hwndOwner = GetActiveWindow(); + bi.lpszTitle = title.c_str(); + bi.ulFlags = BIF_NEWDIALOGSTYLE; + bi.lpfn = SetInitialPathCallback; + bi.lParam = (LPARAM)initialDirectory.c_str(); + + LPITEMIDLIST pidl = SHBrowseForFolder(&bi); + if (pidl != 0) { + if (SHGetPathFromIDList(pidl, szFile)) { + // Add directory path to the result + selectedFiles->SetString(0, szFile); + } + IMalloc* pMalloc = NULL; + SHGetMalloc(&pMalloc); + if (pMalloc) { + pMalloc->Free(pidl); + pMalloc->Release(); + } + } + } else { + OPENFILENAME ofn; + + ZeroMemory(&ofn, sizeof(ofn)); + ofn.hwndOwner = GetActiveWindow(); + ofn.lStructSize = sizeof(ofn); + ofn.lpstrFile = szFile; + ofn.nMaxFile = MAX_PATH; + + allowMulitpleSelection = false; // TODO: Raymond, please implement. + + // TODO (issue #65) - Use passed in file types. Note, when fileTypesStr is null, all files should be shown + /* findAndReplaceString( fileTypesStr, std::string(" "), std::string(";*.")); + LPCWSTR allFilesFilter = L"All Files\0*.*\0\0";*/ + + ofn.lpstrFilter = L"All Files\0*.*\0Web Files\0*.js;*.css;*.htm;*.html\0\0"; + + ofn.lpstrInitialDir = initialDirectory.c_str(); + ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR | OFN_EXPLORER; + if (allowMulitpleSelection) + ofn.Flags |= OFN_ALLOWMULTISELECT; + + if (GetOpenFileName(&ofn)) { + if (allowMulitpleSelection) { + // Multiple selection encodes the files differently +/* + // If multiple files are selected, the first null terminator + // signals end of directory that the files are all in + std::wstring dir(szFile); + + // Check for two null terminators, which signal that only one file + // was selected + if (szFile[dir.length() + 1] == '\0') { + // Escape the single file path and add it to the JSON array + std::wstring escaped; + EscapeJSONString(dir, escaped); + results += L"\"" + escaped + L"\""; + } else { + // Multiple files are selected + wchar_t fullPath[MAX_PATH]; + bool firstFile = true; + for (int i = dir.length() + 1;;) { + // Get the next file name + std::wstring file(&szFile[i]); + + // Two adjacent null characters signal the end of the files + if (file.length() == 0) + break; + + // The filename is relative to the directory that was specified as + // the first string + if (PathCombine(fullPath, dir.c_str(), file.c_str()) != NULL) + { + // Append a comma separator if it is not the first file in the list + if (firstFile) + firstFile = false; + else + results += L","; + + // Escape the path and add it to the list + std::wstring escaped; + EscapeJSONString(std::wstring(fullPath), escaped); + results += L"\"" + escaped + L"\""; + } + + // Go to the start of the next file name + i += file.length() + 1; + } + } +*/ + } else { + // If multiple files are not allowed, add the single file + selectedFiles->SetString(0, szFile); + } + } + } + + return NO_ERROR; +} + +int32 ReadDir(ExtensionString path, CefRefPtr& directoryContents) +{ + path += L"\\*"; + + WIN32_FIND_DATA ffd; + HANDLE hFind = FindFirstFile(path.c_str(), &ffd); + + std::vector resultFiles; + std::vector resultDirs; + + if (hFind != INVALID_HANDLE_VALUE) { + do { + // Ignore '.' and '..' + if (!wcscmp(ffd.cFileName, L".") || !wcscmp(ffd.cFileName, L"..")) + continue; + + // Collect file and directory names separately + if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + resultDirs.push_back(ExtensionString(ffd.cFileName)); + } else { + resultFiles.push_back(ExtensionString(ffd.cFileName)); + } + } + while (FindNextFile(hFind, &ffd) != 0); + + FindClose(hFind); + } + else { + return ConvertWinErrorCode(GetLastError()); + } + + // On Windows, list directories first, then files + size_t i, total = 0; + for (i = 0; i < resultDirs.size(); i++) + directoryContents->SetString(total++, resultDirs[i]); + for (i = 0; i < resultFiles.size(); i++) + directoryContents->SetString(total++, resultFiles[i]); + + return NO_ERROR; +} + +int32 GetFileModificationTime(ExtensionString filename, uint32& modtime, bool& isDir) +{ + DWORD dwAttr = GetFileAttributes(filename.c_str()); + + if (dwAttr == INVALID_FILE_ATTRIBUTES) { + return ConvertWinErrorCode(GetLastError()); + } + + isDir = ((dwAttr & FILE_ATTRIBUTE_DIRECTORY) != 0); + + struct _stat buffer; + if(_wstat(filename.c_str(), &buffer) == -1) { + return ConvertErrnoCode(errno); + } + + modtime = buffer.st_mtime; + + return NO_ERROR; +} + +int32 ReadFile(ExtensionString filename, ExtensionString encoding, std::string& contents) +{ + if (encoding != L"utf8") + return ERR_UNSUPPORTED_ENCODING; + + DWORD dwAttr; + dwAttr = GetFileAttributes(filename.c_str()); + if (INVALID_FILE_ATTRIBUTES == dwAttr) + return ConvertWinErrorCode(GetLastError()); + + if (dwAttr & FILE_ATTRIBUTE_DIRECTORY) + return ERR_CANT_READ; + + HANDLE hFile = CreateFile(filename.c_str(), GENERIC_READ, + 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + int32 error = NO_ERROR; + + if (INVALID_HANDLE_VALUE == hFile) + return ConvertWinErrorCode(GetLastError()); + + DWORD dwFileSize = GetFileSize(hFile, NULL); + DWORD dwBytesRead; + char* buffer = (char*)malloc(dwFileSize); + if (buffer && ReadFile(hFile, buffer, dwFileSize, &dwBytesRead, NULL)) { + contents = std::string(buffer, dwFileSize); + } + else { + if (!buffer) + error = ERR_UNKNOWN; + else + error = ConvertWinErrorCode(GetLastError()); + } + CloseHandle(hFile); + if (buffer) + free(buffer); + + return error; +} + +int32 WriteFile(ExtensionString filename, std::string contents, ExtensionString encoding) +{ + if (encoding != L"utf8") + return ERR_UNSUPPORTED_ENCODING; + + HANDLE hFile = CreateFile(filename.c_str(), GENERIC_WRITE, + 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + DWORD dwBytesWritten; + int error = NO_ERROR; + + if (INVALID_HANDLE_VALUE == hFile) + return ConvertWinErrorCode(GetLastError(), false); + + // TODO (issue 67) - Should write to temp file and handle encoding + if (!WriteFile(hFile, contents.c_str(), contents.length(), &dwBytesWritten, NULL)) { + error = ConvertWinErrorCode(GetLastError(), false); + } + + CloseHandle(hFile); + return error; +} + +int32 SetPosixPermissions(ExtensionString filename, int32 mode) +{ + // TODO: Raymond, please implement + return NO_ERROR; +} + +int32 DeleteFileOrDirectory(ExtensionString filename) +{ + // TODO: Raymond, please implement + return NO_ERROR; +} + + +// Maps errors from errno.h to the brackets error codes +// found in brackets_extensions.js +int ConvertErrnoCode(int errorCode, bool isReading) +{ + switch (errorCode) { + case NO_ERROR: + return NO_ERROR; + case EINVAL: + return ERR_INVALID_PARAMS; + case ENOENT: + return ERR_NOT_FOUND; + default: + return ERR_UNKNOWN; + } +} + +// Maps errors from WinError.h to the brackets error codes +// found in brackets_extensions.js +int ConvertWinErrorCode(int errorCode, bool isReading) +{ + switch (errorCode) { + case NO_ERROR: + return NO_ERROR; + case ERROR_PATH_NOT_FOUND: + case ERROR_FILE_NOT_FOUND: + return ERR_NOT_FOUND; + case ERROR_ACCESS_DENIED: + return isReading ? ERR_CANT_READ : ERR_CANT_WRITE; + case ERROR_WRITE_PROTECT: + return ERR_CANT_WRITE; + case ERROR_HANDLE_DISK_FULL: + return ERR_OUT_OF_SPACE; + default: + return ERR_UNKNOWN; + } +} + diff --git a/appshell/cefclient_win.cpp b/appshell/cefclient_win.cpp index 2a625a52c..2a77217cb 100644 --- a/appshell/cefclient_win.cpp +++ b/appshell/cefclient_win.cpp @@ -289,6 +289,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, // Populate the settings based on command line arguments. AppGetBrowserSettings(settings); + settings.file_access_from_file_urls_allowed = true; + settings.universal_access_from_file_urls_allowed = true; + // Initialize window info to the defaults for a child window info.SetAsChild(hWnd, rect); diff --git a/appshell/client_app_win.cpp b/appshell/client_app_win.cpp index 8de3a72fd..218f31cb4 100644 --- a/appshell/client_app_win.cpp +++ b/appshell/client_app_win.cpp @@ -51,3 +51,9 @@ std::string ClientApp::GetExtensionJSSource() return ""; } + +double ClientApp::GetElapsedMilliseconds() +{ + // TODO: Raymond, please implement + return 0; +} From f0d3bba875e298feef725807663acdb9dd7716f2 Mon Sep 17 00:00:00 2001 From: Glenn Ruehle Date: Mon, 11 Jun 2012 13:42:53 -0700 Subject: [PATCH 7/7] Windows path fixes. --- appshell/appshell_extensions_win.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/appshell/appshell_extensions_win.cpp b/appshell/appshell_extensions_win.cpp index 2a4626faa..c1f80a020 100644 --- a/appshell/appshell_extensions_win.cpp +++ b/appshell/appshell_extensions_win.cpp @@ -23,10 +23,12 @@ #include "appshell_extensions.h" +#include #include #include // Forward declarations for functions at the bottom of this file +void FixFilename(ExtensionString& filename); int ConvertErrnoCode(int errorCode, bool isReading = true); int ConvertWinErrorCode(int errorCode, bool isReading = true); @@ -50,6 +52,8 @@ int32 ShowOpenDialog(bool allowMulitpleSelection, wchar_t szFile[MAX_PATH]; szFile[0] = 0; + FixFilename(initialDirectory); + // TODO (issue #64) - This method should be using IFileDialog instead of the /* outdated SHGetPathFromIDList and GetOpenFileName. @@ -172,6 +176,8 @@ int32 ShowOpenDialog(bool allowMulitpleSelection, int32 ReadDir(ExtensionString path, CefRefPtr& directoryContents) { + FixFilename(path); + path += L"\\*"; WIN32_FIND_DATA ffd; @@ -213,6 +219,8 @@ int32 ReadDir(ExtensionString path, CefRefPtr& directoryContents) int32 GetFileModificationTime(ExtensionString filename, uint32& modtime, bool& isDir) { + FixFilename(filename); + DWORD dwAttr = GetFileAttributes(filename.c_str()); if (dwAttr == INVALID_FILE_ATTRIBUTES) { @@ -233,6 +241,8 @@ int32 GetFileModificationTime(ExtensionString filename, uint32& modtime, bool& i int32 ReadFile(ExtensionString filename, ExtensionString encoding, std::string& contents) { + FixFilename(filename); + if (encoding != L"utf8") return ERR_UNSUPPORTED_ENCODING; @@ -272,6 +282,8 @@ int32 ReadFile(ExtensionString filename, ExtensionString encoding, std::string& int32 WriteFile(ExtensionString filename, std::string contents, ExtensionString encoding) { + FixFilename(filename); + if (encoding != L"utf8") return ERR_UNSUPPORTED_ENCODING; @@ -304,6 +316,11 @@ int32 DeleteFileOrDirectory(ExtensionString filename) return NO_ERROR; } +void FixFilename(ExtensionString& filename) +{ + // Convert '/' to '\' + replace(filename.begin(), filename.end(), '/', '\\'); +} // Maps errors from errno.h to the brackets error codes // found in brackets_extensions.js