diff --git a/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp b/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp index 829e95309..0c581427a 100644 --- a/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp +++ b/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp @@ -14,7 +14,6 @@ #include "..\CefSharp.Core\Internals\Messaging\Messages.h" #include "..\CefSharp.Core\Internals\Serialization\Primitives.h" -using namespace System; using namespace System::Diagnostics; using namespace System::Collections::Generic; using namespace CefSharp::Internals::Messaging; diff --git a/CefSharp.BrowserSubprocess.Core/CefAppWrapper.cpp b/CefSharp.BrowserSubprocess.Core/CefAppWrapper.cpp index d9cdddeaa..dd6c6cb35 100644 --- a/CefSharp.BrowserSubprocess.Core/CefAppWrapper.cpp +++ b/CefSharp.BrowserSubprocess.Core/CefAppWrapper.cpp @@ -7,7 +7,6 @@ #include "CefAppWrapper.h" -using namespace System; using namespace System::Diagnostics; using namespace System::Collections::Generic; diff --git a/CefSharp.BrowserSubprocess.Core/CefBrowserWrapper.h b/CefSharp.BrowserSubprocess.Core/CefBrowserWrapper.h index 76b832d0a..49b60a70a 100644 --- a/CefSharp.BrowserSubprocess.Core/CefBrowserWrapper.h +++ b/CefSharp.BrowserSubprocess.Core/CefBrowserWrapper.h @@ -13,9 +13,7 @@ #include "JavascriptRootObjectWrapper.h" #include "Async/JavascriptAsyncMethodCallback.h" -using namespace CefSharp::Internals; using namespace CefSharp::Internals::Async; -using namespace System; using namespace System::ServiceModel; using namespace System::Threading; using namespace System::Threading::Tasks; diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj index bc6ec91fd..53e1c4056 100644 --- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj @@ -181,7 +181,6 @@ - diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj.filters b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj.filters index 09db929e5..e141521fd 100644 --- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj.filters +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj.filters @@ -100,9 +100,6 @@ Source Files - - Source Files - Source Files diff --git a/CefSharp.BrowserSubprocess.Core/JavascriptCallbackWrapper.h b/CefSharp.BrowserSubprocess.Core/JavascriptCallbackWrapper.h index e3e641995..9190334f3 100644 --- a/CefSharp.BrowserSubprocess.Core/JavascriptCallbackWrapper.h +++ b/CefSharp.BrowserSubprocess.Core/JavascriptCallbackWrapper.h @@ -6,8 +6,6 @@ #include "include\cef_v8.h" -using namespace CefSharp::Internals; - namespace CefSharp { namespace Internals diff --git a/CefSharp.BrowserSubprocess.Core/JavascriptMethodHandler.cpp b/CefSharp.BrowserSubprocess.Core/JavascriptMethodHandler.cpp index 2171893c7..d01806b6d 100644 --- a/CefSharp.BrowserSubprocess.Core/JavascriptMethodHandler.cpp +++ b/CefSharp.BrowserSubprocess.Core/JavascriptMethodHandler.cpp @@ -6,8 +6,6 @@ #include "TypeUtils.h" #include "JavascriptMethodHandler.h" -using namespace CefSharp::Internals; - namespace CefSharp { bool JavascriptMethodHandler::Execute(const CefString& name, CefRefPtr object, const CefV8ValueList& arguments, CefRefPtr& retval, CefString& exception) diff --git a/CefSharp.BrowserSubprocess.Core/JavascriptMethodHandler.h b/CefSharp.BrowserSubprocess.Core/JavascriptMethodHandler.h index 82b1e8b30..a695974b2 100644 --- a/CefSharp.BrowserSubprocess.Core/JavascriptMethodHandler.h +++ b/CefSharp.BrowserSubprocess.Core/JavascriptMethodHandler.h @@ -7,8 +7,6 @@ #include "include/cef_v8.h" #include "JavascriptCallbackRegistry.h" -using namespace CefSharp::Internals; - namespace CefSharp { private class JavascriptMethodHandler : public CefV8Handler diff --git a/CefSharp.BrowserSubprocess.Core/JavascriptMethodWrapper.cpp b/CefSharp.BrowserSubprocess.Core/JavascriptMethodWrapper.cpp index 9822f7c1a..e48501ae2 100644 --- a/CefSharp.BrowserSubprocess.Core/JavascriptMethodWrapper.cpp +++ b/CefSharp.BrowserSubprocess.Core/JavascriptMethodWrapper.cpp @@ -7,8 +7,6 @@ #include "JavascriptMethodWrapper.h" -using namespace System; - namespace CefSharp { void JavascriptMethodWrapper::Bind(JavascriptMethod^ javascriptMethod, const CefRefPtr& v8Value) diff --git a/CefSharp.BrowserSubprocess.Core/JavascriptMethodWrapper.h b/CefSharp.BrowserSubprocess.Core/JavascriptMethodWrapper.h index 4ed74cc99..968253a46 100644 --- a/CefSharp.BrowserSubprocess.Core/JavascriptMethodWrapper.h +++ b/CefSharp.BrowserSubprocess.Core/JavascriptMethodWrapper.h @@ -8,7 +8,6 @@ #include "JavascriptMethodHandler.h" -using namespace CefSharp::Internals; using namespace System::Runtime::Serialization; namespace CefSharp diff --git a/CefSharp.BrowserSubprocess.Core/JavascriptObjectWrapper.cpp b/CefSharp.BrowserSubprocess.Core/JavascriptObjectWrapper.cpp index e996914e9..5f58a428e 100644 --- a/CefSharp.BrowserSubprocess.Core/JavascriptObjectWrapper.cpp +++ b/CefSharp.BrowserSubprocess.Core/JavascriptObjectWrapper.cpp @@ -7,9 +7,6 @@ #include "JavascriptObjectWrapper.h" -using namespace System; -using namespace CefSharp::Internals; - namespace CefSharp { void JavascriptObjectWrapper::Bind(JavascriptObject^ object, const CefRefPtr& v8Value, JavascriptCallbackRegistry^ callbackRegistry) diff --git a/CefSharp.BrowserSubprocess.Core/JavascriptObjectWrapper.h b/CefSharp.BrowserSubprocess.Core/JavascriptObjectWrapper.h index af1d7e637..2e0713767 100644 --- a/CefSharp.BrowserSubprocess.Core/JavascriptObjectWrapper.h +++ b/CefSharp.BrowserSubprocess.Core/JavascriptObjectWrapper.h @@ -15,8 +15,6 @@ using namespace System::Runtime::Serialization; using namespace System::Linq; using namespace System::Collections::Generic; -using namespace CefSharp::Internals; - namespace CefSharp { private ref class JavascriptObjectWrapper diff --git a/CefSharp.BrowserSubprocess.Core/JavascriptPropertyHandler.h b/CefSharp.BrowserSubprocess.Core/JavascriptPropertyHandler.h index 2bac97265..4fbf6de3e 100644 --- a/CefSharp.BrowserSubprocess.Core/JavascriptPropertyHandler.h +++ b/CefSharp.BrowserSubprocess.Core/JavascriptPropertyHandler.h @@ -9,8 +9,6 @@ #include "include/cef_v8.h" #include "TypeUtils.h" -using namespace CefSharp::Internals; - namespace CefSharp { private class JavascriptPropertyHandler : public CefV8Accessor diff --git a/CefSharp.BrowserSubprocess.Core/JavascriptPropertyWrapper.h b/CefSharp.BrowserSubprocess.Core/JavascriptPropertyWrapper.h index aa3e1def6..94fd119b5 100644 --- a/CefSharp.BrowserSubprocess.Core/JavascriptPropertyWrapper.h +++ b/CefSharp.BrowserSubprocess.Core/JavascriptPropertyWrapper.h @@ -8,8 +8,6 @@ #include "include/cef_v8.h" #include "JavascriptCallbackRegistry.h" -using namespace CefSharp::Internals; - namespace CefSharp { private ref class JavascriptPropertyWrapper diff --git a/CefSharp.BrowserSubprocess.Core/JavascriptRootObjectWrapper.h b/CefSharp.BrowserSubprocess.Core/JavascriptRootObjectWrapper.h index f8d65fd04..2551eb0a4 100644 --- a/CefSharp.BrowserSubprocess.Core/JavascriptRootObjectWrapper.h +++ b/CefSharp.BrowserSubprocess.Core/JavascriptRootObjectWrapper.h @@ -13,7 +13,6 @@ using namespace System::Runtime::Serialization; using namespace System::Linq; using namespace System::Collections::Generic; -using namespace CefSharp::Internals; using namespace CefSharp::Internals::Async; namespace CefSharp diff --git a/CefSharp.BrowserSubprocess.Core/Stdafx.h b/CefSharp.BrowserSubprocess.Core/Stdafx.h index 433105627..1e2321397 100644 --- a/CefSharp.BrowserSubprocess.Core/Stdafx.h +++ b/CefSharp.BrowserSubprocess.Core/Stdafx.h @@ -19,3 +19,5 @@ #include "vcclr_local.h" using namespace System; +using namespace CefSharp; +using namespace CefSharp::Internals; \ No newline at end of file diff --git a/CefSharp.BrowserSubprocess.Core/TypeUtils.cpp b/CefSharp.BrowserSubprocess.Core/TypeUtils.cpp index 4ef947e90..d1f9821ba 100644 --- a/CefSharp.BrowserSubprocess.Core/TypeUtils.cpp +++ b/CefSharp.BrowserSubprocess.Core/TypeUtils.cpp @@ -8,8 +8,6 @@ #include ".\..\CefSharp.Core\Internals\StringUtils.h" #include "TypeUtils.h" -using namespace CefSharp::Internals; -using namespace System; using namespace System::Collections::Generic; namespace CefSharp diff --git a/CefSharp.Core/BrowserSettings.h b/CefSharp.Core/BrowserSettings.h index c5c02ee4c..097c9d7e9 100644 --- a/CefSharp.Core/BrowserSettings.h +++ b/CefSharp.Core/BrowserSettings.h @@ -5,11 +5,8 @@ #pragma once #include "Stdafx.h" -#include "Internals/StringUtils.h" #include "RequestContext.h" -using namespace CefSharp::Internals; - namespace CefSharp { /// diff --git a/CefSharp.Core/Cef.h b/CefSharp.Core/Cef.h index 02f9b4223..4c18f5017 100644 --- a/CefSharp.Core/Cef.h +++ b/CefSharp.Core/Cef.h @@ -4,6 +4,8 @@ #pragma once +#include "Stdafx.h" + #include #include #include @@ -11,17 +13,11 @@ #include #include "Internals/CefSharpApp.h" -#include "Internals/CookieVisitor.h" #include "Internals/CookieManager.h" -#include "Internals/CefCompletionCallbackAdapter.h" -#include "Internals/StringUtils.h" #include "Internals/PluginVisitor.h" -#include "ManagedCefBrowserAdapter.h" #include "CefSettings.h" -#include "ResourceHandlerWrapper.h" #include "SchemeHandlerFactoryWrapper.h" #include "Internals/CefTaskScheduler.h" -#include "CookieAsyncWrapper.h" using namespace System::Collections::Generic; using namespace System::Linq; diff --git a/CefSharp.Core/CefSettings.h b/CefSharp.Core/CefSettings.h index cb1e96471..48e496bc2 100644 --- a/CefSharp.Core/CefSettings.h +++ b/CefSharp.Core/CefSettings.h @@ -5,11 +5,8 @@ #pragma once #include "Stdafx.h" -#include "Internals/StringUtils.h" -using namespace System; using namespace System::Collections::Generic; -using namespace CefSharp::Internals; namespace CefSharp { diff --git a/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp b/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp index 5f1febfc8..9677a9805 100644 --- a/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp +++ b/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp @@ -3,8 +3,12 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #include "Stdafx.h" +#include "include\cef_client.h" + #include "CefBrowserHostWrapper.h" #include "WindowInfo.h" +#include "CefTaskScheduler.h" +#include "Cef.h" void CefBrowserHostWrapper::StartDownload(String^ url) { diff --git a/CefSharp.Core/Internals/CefBrowserHostWrapper.h b/CefSharp.Core/Internals/CefBrowserHostWrapper.h index 6b5f3e01a..acf15f63c 100644 --- a/CefSharp.Core/Internals/CefBrowserHostWrapper.h +++ b/CefSharp.Core/Internals/CefBrowserHostWrapper.h @@ -4,9 +4,11 @@ #pragma once +#include "Stdafx.h" + #include "CefWrapper.h" -using namespace System; +using namespace System::Threading::Tasks; namespace CefSharp { diff --git a/CefSharp.Core/Internals/CefContextMenuParamsWrapper.h b/CefSharp.Core/Internals/CefContextMenuParamsWrapper.h index 89b5131be..f5287caa3 100644 --- a/CefSharp.Core/Internals/CefContextMenuParamsWrapper.h +++ b/CefSharp.Core/Internals/CefContextMenuParamsWrapper.h @@ -7,8 +7,8 @@ #include "Stdafx.h" #include "CefWrapper.h" +#include "include\cef_context_menu_handler.h" -using namespace System; using namespace System::Collections::Generic; namespace CefSharp diff --git a/CefSharp.Core/Internals/CefDragDataWrapper.h b/CefSharp.Core/Internals/CefDragDataWrapper.h index eff29149d..178dbd2b2 100644 --- a/CefSharp.Core/Internals/CefDragDataWrapper.h +++ b/CefSharp.Core/Internals/CefDragDataWrapper.h @@ -11,9 +11,7 @@ #include "CefWrapper.h" using namespace std; -using namespace System; using namespace System::IO; -using namespace CefSharp; namespace CefSharp { diff --git a/CefSharp.Core/Internals/CefFrameWrapper.cpp b/CefSharp.Core/Internals/CefFrameWrapper.cpp index 838a1d70d..512e352be 100644 --- a/CefSharp.Core/Internals/CefFrameWrapper.cpp +++ b/CefSharp.Core/Internals/CefFrameWrapper.cpp @@ -3,9 +3,12 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #include "Stdafx.h" +#include -#include "Internals/CefSharpBrowserWrapper.h" -#include "Internals/CefFrameWrapper.h" +#include "Internals\CefSharpBrowserWrapper.h" +#include "Internals\CefFrameWrapper.h" +#include "Internals\StringVisitor.h" +#include "Internals\ClientAdapter.h" /// // True if this object is currently attached to a valid frame. @@ -239,7 +242,7 @@ IFrame^ CefFrameWrapper::Parent::get() if (_parentFrame != nullptr) { // Be paranoid about creating the cached IBrowser. - lock sync(_syncRoot); + msclr::lock sync(_syncRoot); auto parent = _frame->GetParent(); if (parent != nullptr && _parentFrame != nullptr) @@ -281,7 +284,7 @@ IBrowser^ CefFrameWrapper::Browser::get() } // Be paranoid about creating the cached IBrowser. - lock sync(_syncRoot); + msclr::lock sync(_syncRoot); if (_owningBrowser != nullptr) { diff --git a/CefSharp.Core/Internals/CefFrameWrapper.h b/CefSharp.Core/Internals/CefFrameWrapper.h index cfa2e55c5..ea1b170ea 100644 --- a/CefSharp.Core/Internals/CefFrameWrapper.h +++ b/CefSharp.Core/Internals/CefFrameWrapper.h @@ -6,10 +6,12 @@ #include "Stdafx.h" -#include -#include "CefRequestWrapper.h" +#include "include\cef_frame.h"" +#include "include\cef_v8.h" #include "CefWrapper.h" +using namespace System::Threading::Tasks; + namespace CefSharp { namespace Internals diff --git a/CefSharp.Core/Internals/CefJSDialogCallbackWrapper.h b/CefSharp.Core/Internals/CefJSDialogCallbackWrapper.h index a8763ee89..4d879911f 100644 --- a/CefSharp.Core/Internals/CefJSDialogCallbackWrapper.h +++ b/CefSharp.Core/Internals/CefJSDialogCallbackWrapper.h @@ -7,8 +7,6 @@ #include "Stdafx.h" #include "CefWrapper.h" -using namespace CefSharp; - namespace CefSharp { namespace Internals diff --git a/CefSharp.Core/Internals/CefPostDataElementWrapper.h b/CefSharp.Core/Internals/CefPostDataElementWrapper.h index 55bc7e18b..10facd2c8 100644 --- a/CefSharp.Core/Internals/CefPostDataElementWrapper.h +++ b/CefSharp.Core/Internals/CefPostDataElementWrapper.h @@ -6,11 +6,11 @@ #include "Stdafx.h" +#include "include\cef_request.h" + #include "Internals/TypeConversion.h" -using namespace System; using namespace System::Collections::Specialized; -using namespace CefSharp; namespace CefSharp { diff --git a/CefSharp.Core/Internals/CefPostDataWrapper.h b/CefSharp.Core/Internals/CefPostDataWrapper.h index 1e58dbc27..3a26e6180 100644 --- a/CefSharp.Core/Internals/CefPostDataWrapper.h +++ b/CefSharp.Core/Internals/CefPostDataWrapper.h @@ -6,13 +6,13 @@ #include "Stdafx.h" +#include "include\cef_request.h" + #include "Internals/TypeConversion.h" #include "CefPostDataElementWrapper.h" -using namespace System; using namespace System::Collections::Generic; using namespace System::Collections::ObjectModel; -using namespace CefSharp; namespace CefSharp { diff --git a/CefSharp.Core/Internals/CefRequestCallbackWrapper.h b/CefSharp.Core/Internals/CefRequestCallbackWrapper.h index 45cea6821..ec8e07c62 100644 --- a/CefSharp.Core/Internals/CefRequestCallbackWrapper.h +++ b/CefSharp.Core/Internals/CefRequestCallbackWrapper.h @@ -7,8 +7,6 @@ #include "Stdafx.h" #include "CefWrapper.h" -using namespace CefSharp; - namespace CefSharp { namespace Internals diff --git a/CefSharp.Core/Internals/CefRequestWrapper.h b/CefSharp.Core/Internals/CefRequestWrapper.h index a8dca5b38..9cf6fff0f 100644 --- a/CefSharp.Core/Internals/CefRequestWrapper.h +++ b/CefSharp.Core/Internals/CefRequestWrapper.h @@ -6,11 +6,10 @@ #include "Stdafx.h" +#include "include\cef_request.h" #include "CefWrapper.h" -using namespace System; using namespace System::Collections::Specialized; -using namespace CefSharp; namespace CefSharp { diff --git a/CefSharp.Core/Internals/CefResponseWrapper.h b/CefSharp.Core/Internals/CefResponseWrapper.h index 41385afd9..1e81b279f 100644 --- a/CefSharp.Core/Internals/CefResponseWrapper.h +++ b/CefSharp.Core/Internals/CefResponseWrapper.h @@ -9,9 +9,7 @@ #include "TypeConversion.h" #include "CefWrapper.h" -using namespace System; using namespace System::Collections::Specialized; -using namespace CefSharp; namespace CefSharp { diff --git a/CefSharp.Core/Internals/CefSharpApp.h b/CefSharp.Core/Internals/CefSharpApp.h index 507160fa6..5d3b77d59 100644 --- a/CefSharp.Core/Internals/CefSharpApp.h +++ b/CefSharp.Core/Internals/CefSharpApp.h @@ -4,11 +4,11 @@ #pragma once +#include "Stdafx.h" + #include "include/cef_app.h" #include "CefSettings.h" -using namespace CefSharp::Internals; - namespace CefSharp { private class CefSharpApp : public CefApp, diff --git a/CefSharp.Core/Internals/CefSharpBrowserWrapper.cpp b/CefSharp.Core/Internals/CefSharpBrowserWrapper.cpp index bd589ea02..14d986cfc 100644 --- a/CefSharp.Core/Internals/CefSharpBrowserWrapper.cpp +++ b/CefSharp.Core/Internals/CefSharpBrowserWrapper.cpp @@ -4,9 +4,9 @@ #include "Stdafx.h" -#include "Internals/CefFrameWrapper.h" -#include "Internals/CefSharpBrowserWrapper.h" -#include "CefBrowserHostWrapper.h" +#include "Internals\CefFrameWrapper.h" +#include "Internals\CefSharpBrowserWrapper.h" +#include "Internals\CefBrowserHostWrapper.h" /// // Returns the browser host object. This method can only be called in the diff --git a/CefSharp.Core/Internals/CefSharpBrowserWrapper.h b/CefSharp.Core/Internals/CefSharpBrowserWrapper.h index 3671b2a5e..9d8c41981 100644 --- a/CefSharp.Core/Internals/CefSharpBrowserWrapper.h +++ b/CefSharp.Core/Internals/CefSharpBrowserWrapper.h @@ -7,7 +7,6 @@ #include "Stdafx.h" #include -#include "StringUtils.h" #include "CefWrapper.h" namespace CefSharp diff --git a/CefSharp.Core/Internals/CefTaskScheduler.h b/CefSharp.Core/Internals/CefTaskScheduler.h index 06f96aeba..541f7b4d8 100644 --- a/CefSharp.Core/Internals/CefTaskScheduler.h +++ b/CefSharp.Core/Internals/CefTaskScheduler.h @@ -8,12 +8,9 @@ #include "include/cef_task.h" #include "CefTaskWrapper.h" -using namespace System; using namespace System::Threading::Tasks; using namespace System::Runtime::InteropServices; -using namespace CefSharp; - namespace CefSharp { namespace Internals diff --git a/CefSharp.Core/Internals/CefTaskWrapper.h b/CefSharp.Core/Internals/CefTaskWrapper.h index 557d40712..3c15681cf 100644 --- a/CefSharp.Core/Internals/CefTaskWrapper.h +++ b/CefSharp.Core/Internals/CefTaskWrapper.h @@ -9,12 +9,9 @@ #include "ReportUnhandledExceptions.h" -using namespace System; using namespace System::Threading::Tasks; using namespace System::Runtime::InteropServices; -using namespace CefSharp; - namespace CefSharp { namespace Internals diff --git a/CefSharp.Core/Internals/ClientAdapter.cpp b/CefSharp.Core/Internals/ClientAdapter.cpp index 07939c1e7..a151d159f 100644 --- a/CefSharp.Core/Internals/ClientAdapter.cpp +++ b/CefSharp.Core/Internals/ClientAdapter.cpp @@ -4,8 +4,11 @@ #include "Stdafx.h" -#include "include/wrapper/cef_stream_resource_handler.h" +#include "include\cef_client.h" +#include "include\wrapper\cef_stream_resource_handler.h" + #include "ClientAdapter.h" +#include "ManagedCefBrowserAdapter.h" #include "CefRequestWrapper.h" #include "CefContextMenuParamsWrapper.h" #include "CefMenuModelWrapper.h" diff --git a/CefSharp.Core/Internals/ClientAdapter.h b/CefSharp.Core/Internals/ClientAdapter.h index c7576389e..055ff8176 100644 --- a/CefSharp.Core/Internals/ClientAdapter.h +++ b/CefSharp.Core/Internals/ClientAdapter.h @@ -5,13 +5,13 @@ #pragma once #include "Stdafx.h" -#include + #include "include/cef_app.h" #include "include/cef_client.h" #include "include/cef_render_process_handler.h" #include "include/internal/cef_types.h" -using namespace System; +using namespace System::Threading::Tasks; namespace CefSharp { diff --git a/CefSharp.Core/Internals/CookieManager.cpp b/CefSharp.Core/Internals/CookieManager.cpp index 8a5738894..1275f04dc 100644 --- a/CefSharp.Core/Internals/CookieManager.cpp +++ b/CefSharp.Core/Internals/CookieManager.cpp @@ -5,6 +5,11 @@ #include "Stdafx.h" #include "CookieManager.h" +#include "CookieAsyncWrapper.h" +#include "CookieVisitor.h" +#include "Internals\CefCompletionCallbackAdapter.h" +#include "Cef.h" + namespace CefSharp { namespace Internals diff --git a/CefSharp.Core/Internals/CookieManager.h b/CefSharp.Core/Internals/CookieManager.h index 4a67edd7f..f79db3136 100644 --- a/CefSharp.Core/Internals/CookieManager.h +++ b/CefSharp.Core/Internals/CookieManager.h @@ -4,7 +4,8 @@ #pragma once -#include "MCefRefPtr.h" +#include "Stdafx.h" + #include "include/cef_cookie.h" using namespace System::Threading::Tasks; diff --git a/CefSharp.Core/Internals/JavascriptCallbackFactory.cpp b/CefSharp.Core/Internals/JavascriptCallbackFactory.cpp index 82b18ba09..994094704 100644 --- a/CefSharp.Core/Internals/JavascriptCallbackFactory.cpp +++ b/CefSharp.Core/Internals/JavascriptCallbackFactory.cpp @@ -3,7 +3,6 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #include "Stdafx.h" -#include "CefSharpBrowserWrapper.h" #include "JavascriptCallbackProxy.h" #include "JavascriptCallbackFactory.h" diff --git a/CefSharp.Core/Internals/JavascriptCallbackFactory.h b/CefSharp.Core/Internals/JavascriptCallbackFactory.h index fd0e75cad..b79ff4790 100644 --- a/CefSharp.Core/Internals/JavascriptCallbackFactory.h +++ b/CefSharp.Core/Internals/JavascriptCallbackFactory.h @@ -4,8 +4,6 @@ #pragma once -using namespace System; - namespace CefSharp { namespace Internals diff --git a/CefSharp.Core/Internals/JavascriptCallbackProxy.h b/CefSharp.Core/Internals/JavascriptCallbackProxy.h index 0cd91693b..c1393a55d 100644 --- a/CefSharp.Core/Internals/JavascriptCallbackProxy.h +++ b/CefSharp.Core/Internals/JavascriptCallbackProxy.h @@ -4,13 +4,13 @@ #pragma once -#include "include/cef_base.h" +#include "Stdafx.h" + #include "include/cef_app.h" #include "..\ManagedCefBrowserAdapter.h" -#include "CefSharpBrowserWrapper.h" +#include "Internals\CefSharpBrowserWrapper.h" -using namespace System; using namespace System::Threading::Tasks; namespace CefSharp diff --git a/CefSharp.Core/Internals/PluginVisitor.h b/CefSharp.Core/Internals/PluginVisitor.h index f0ac63c11..1d853bfd8 100644 --- a/CefSharp.Core/Internals/PluginVisitor.h +++ b/CefSharp.Core/Internals/PluginVisitor.h @@ -7,7 +7,6 @@ #include "Stdafx.h" #include "include/cef_web_plugin.h" -using namespace CefSharp; using namespace System::Threading::Tasks; namespace CefSharp diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h index b7ab14e51..06dc8d2d8 100644 --- a/CefSharp.Core/Internals/RenderClientAdapter.h +++ b/CefSharp.Core/Internals/RenderClientAdapter.h @@ -5,10 +5,11 @@ #pragma once #include "Stdafx.h" +#include + #include "ClientAdapter.h" using namespace msclr; -using namespace System; namespace CefSharp { diff --git a/CefSharp.Core/Internals/ReportUnhandledExceptions.h b/CefSharp.Core/Internals/ReportUnhandledExceptions.h index 83b33a34b..d8cf8a284 100644 --- a/CefSharp.Core/Internals/ReportUnhandledExceptions.h +++ b/CefSharp.Core/Internals/ReportUnhandledExceptions.h @@ -8,6 +8,8 @@ #include +using namespace System::Threading; + namespace CefSharp { namespace Internals diff --git a/CefSharp.Core/Internals/Serialization/JsObjectsSerialization.h b/CefSharp.Core/Internals/Serialization/JsObjectsSerialization.h index da817a1cf..5fcadf484 100644 --- a/CefSharp.Core/Internals/Serialization/JsObjectsSerialization.h +++ b/CefSharp.Core/Internals/Serialization/JsObjectsSerialization.h @@ -4,6 +4,10 @@ #pragma once +#include "Stdafx.h" + +#include "include\cef_values.h" + namespace CefSharp { namespace Internals diff --git a/CefSharp.Core/Internals/Serialization/ObjectsSerialization.h b/CefSharp.Core/Internals/Serialization/ObjectsSerialization.h index 87ba99e2a..45b0e2fc1 100644 --- a/CefSharp.Core/Internals/Serialization/ObjectsSerialization.h +++ b/CefSharp.Core/Internals/Serialization/ObjectsSerialization.h @@ -4,6 +4,8 @@ #pragma once +#include "Stdafx.h" + #include "include/cef_values.h" namespace CefSharp diff --git a/CefSharp.Core/Internals/Serialization/V8Serialization.cpp b/CefSharp.Core/Internals/Serialization/V8Serialization.cpp index 9d55ba2c1..1ba239e05 100644 --- a/CefSharp.Core/Internals/Serialization/V8Serialization.cpp +++ b/CefSharp.Core/Internals/Serialization/V8Serialization.cpp @@ -3,6 +3,9 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #include "Stdafx.h" + +#include "include\cef_values.h" + #include "V8Serialization.h" #include "Primitives.h" diff --git a/CefSharp.Core/Internals/StringUtils.cpp b/CefSharp.Core/Internals/StringUtils.cpp deleted file mode 100644 index b56f0520f..000000000 --- a/CefSharp.Core/Internals/StringUtils.cpp +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright © 2010-2015 The CefSharp Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. - -#include "Stdafx.h" - -using namespace System::Diagnostics; -using namespace System::Collections::Generic; - -namespace CefSharp -{ - namespace Internals - { - [DebuggerStepThrough] - String^ StringUtils::ToClr(const cef_string_t& cefStr) - { - return gcnew String(cefStr.str); - } - - [DebuggerStepThrough] - String^ StringUtils::ToClr(const CefString& cefStr) - { - return gcnew String(cefStr.c_str()); - } - - [DebuggerStepThrough] - List^ StringUtils::ToClr(const std::vector& cefStr) - { - auto result = gcnew List(); - - for each(CefString s in cefStr) - { - result->Add(StringUtils::ToClr(s)); - } - - return result; - } - - [DebuggerStepThrough] - CefString StringUtils::ToNative(String^ str) - { - if (str == nullptr) - { - return CefString(); - } - - pin_ptr pStr = PtrToStringChars(str); - CefString cefStr(pStr); - return cefStr; - } - - [DebuggerStepThrough] - std::vector StringUtils::ToNative(IEnumerable^ str) - { - if (str == nullptr) - { - return std::vector(); - } - - std::vector result = std::vector(); - - for each (String^ s in str) - { - result.push_back(StringUtils::ToNative(s)); - } - - return result; - } - - [DebuggerStepThrough] - void StringUtils::AssignNativeFromClr(cef_string_t& cefStr, String^ str) - { - cef_string_clear(&cefStr); - - if (str != nullptr) - { - pin_ptr pStr = PtrToStringChars(str); - cef_string_copy(pStr, str->Length, &cefStr); - } - } - } -} diff --git a/CefSharp.Core/Internals/StringUtils.h b/CefSharp.Core/Internals/StringUtils.h index a2d3ba83e..5ac6bb8e0 100644 --- a/CefSharp.Core/Internals/StringUtils.h +++ b/CefSharp.Core/Internals/StringUtils.h @@ -4,10 +4,13 @@ #pragma once -#include "Stdafx.h" +#include +#include "vcclr_local.h" +#include "include\internal\cef_string.h" using namespace System; using namespace System::Collections::Generic; +using namespace System::Diagnostics; namespace CefSharp { @@ -21,21 +24,40 @@ namespace CefSharp /// /// The string that should be converted. /// A .NET string. - static String^ ToClr(const cef_string_t& cefStr); + [DebuggerStepThrough] + static String^ StringUtils::ToClr(const cef_string_t& cefStr) + { + return gcnew String(cefStr.str); + } /// /// Converts an unmanaged string to a (managed) .NET string. /// /// The string that should be converted. /// A .NET string. - static String^ ToClr(const CefString& cefStr); + [DebuggerStepThrough] + static String^ StringUtils::ToClr(const CefString& cefStr) + { + return gcnew String(cefStr.c_str()); + } /// /// Converts an unmanaged vector of strings to a (managed) .NET List of strings. /// /// The vector of strings that should be converted. /// A .NET List of strings. - static List^ ToClr(const std::vector& cefStr); + [DebuggerStepThrough] + static List^ ToClr(const std::vector& cefStr) + { + auto result = gcnew List(); + + for each(CefString s in cefStr) + { + result->Add(StringUtils::ToClr(s)); + } + + return result; + } /// /// Converts a .NET string to native (unmanaged) format. Note that this method does not allocate a new copy of the @@ -43,21 +65,58 @@ namespace CefSharp /// /// The string that should be converted. /// An unmanaged representation of the provided string, or an empty string if the input string is a nullptr. - static CefString ToNative(String^ str); + [DebuggerStepThrough] + static CefString ToNative(String^ str) + { + if (str == nullptr) + { + return CefString(); + } + + pin_ptr pStr = PtrToStringChars(str); + CefString cefStr(pStr); + return cefStr; + } /// /// Converts a .NET List of strings to native (unmanaged) format. /// /// The List of strings that should be converted. /// An unmanaged representation of the provided List of strings, or an empty List if the input is a nullptr. - static std::vector ToNative(IEnumerable^ str); + [DebuggerStepThrough] + static std::vector ToNative(IEnumerable^ str) + { + if (str == nullptr) + { + return std::vector(); + } + + std::vector result = std::vector(); + + for each (String^ s in str) + { + result.push_back(StringUtils::ToNative(s)); + } + + return result; + } /// /// Assigns the provided cef_string_t object from the given .NET string. /// /// The cef_string_t that should be updated. /// The .NET string whose value should be used to update cefStr. - static void AssignNativeFromClr(cef_string_t& cefStr, String^ str); + [DebuggerStepThrough] + static void StringUtils::AssignNativeFromClr(cef_string_t& cefStr, String^ str) + { + cef_string_clear(&cefStr); + + if (str != nullptr) + { + pin_ptr pStr = PtrToStringChars(str); + cef_string_copy(pStr, str->Length, &cefStr); + } + } }; } } \ No newline at end of file diff --git a/CefSharp.Core/Internals/TypeConversion.h b/CefSharp.Core/Internals/TypeConversion.h index d3e75bbfc..f9b067402 100644 --- a/CefSharp.Core/Internals/TypeConversion.h +++ b/CefSharp.Core/Internals/TypeConversion.h @@ -4,12 +4,12 @@ #pragma once -#include "include/internal/cef_ptr.h" -#include "include/cef_download_item.h" -#include "Internals/StringUtils.h" +#include "Stdafx.h" -using namespace System; -using namespace CefSharp; +#include "include/internal/cef_ptr.h" +#include "include\cef_download_item.h" +#include "include\cef_response.h" +#include "include\cef_web_plugin.h" namespace CefSharp { diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.cpp b/CefSharp.Core/ManagedCefBrowserAdapter.cpp index 16d234184..4d0cb3d95 100644 --- a/CefSharp.Core/ManagedCefBrowserAdapter.cpp +++ b/CefSharp.Core/ManagedCefBrowserAdapter.cpp @@ -3,8 +3,11 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #include "Stdafx.h" -#include "Cef.h" + +#include "ManagedCefBrowserAdapter.h" #include "Internals/Messaging/Messages.h" +#include "Internals/CefFrameWrapper.h" +#include "Internals/CefSharpBrowserWrapper.h" using namespace CefSharp::Internals::Messaging; @@ -13,7 +16,6 @@ bool ManagedCefBrowserAdapter::IsDisposed::get() return _isDisposed; } - void ManagedCefBrowserAdapter::CreateOffscreenBrowser(IntPtr windowHandle, BrowserSettings^ browserSettings, RequestContext^ requestContext, String^ address) { //Create the required BitmapInfo classes before the offscreen browser is initialized diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h index a279a580b..ad350809d 100644 --- a/CefSharp.Core/ManagedCefBrowserAdapter.h +++ b/CefSharp.Core/ManagedCefBrowserAdapter.h @@ -6,19 +6,14 @@ #include "Stdafx.h" -#include +#include "include\cef_client.h" #include "BrowserSettings.h" #include "Internals/ClientAdapter.h" #include "Internals/CefDragDataWrapper.h" #include "Internals/RenderClientAdapter.h" -#include "Internals/MCefRefPtr.h" -#include "Internals/StringVisitor.h" -#include "Internals/CefFrameWrapper.h" -#include "Internals/CefSharpBrowserWrapper.h" #include "Internals/JavascriptCallbackFactory.h" -using namespace CefSharp::Internals; using namespace System::Diagnostics; using namespace System::ServiceModel; using namespace System::Threading; diff --git a/CefSharp.Core/NativeMethodWrapper.cpp b/CefSharp.Core/NativeMethodWrapper.cpp index a090ff99a..93969266f 100644 --- a/CefSharp.Core/NativeMethodWrapper.cpp +++ b/CefSharp.Core/NativeMethodWrapper.cpp @@ -3,9 +3,8 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #include "Stdafx.h" -#include "NativeMethodWrapper.h" -using namespace System; +#include "NativeMethodWrapper.h" namespace CefSharp { diff --git a/CefSharp.Core/NativeMethodWrapper.h b/CefSharp.Core/NativeMethodWrapper.h index 9d001e378..02f2a770d 100644 --- a/CefSharp.Core/NativeMethodWrapper.h +++ b/CefSharp.Core/NativeMethodWrapper.h @@ -6,8 +6,6 @@ #include "Stdafx.h" -using namespace System; - namespace CefSharp { public ref class NativeMethodWrapper sealed diff --git a/CefSharp.Core/RequestContext.h b/CefSharp.Core/RequestContext.h index d50c485f6..8155ec03e 100644 --- a/CefSharp.Core/RequestContext.h +++ b/CefSharp.Core/RequestContext.h @@ -9,8 +9,6 @@ #include "RequestContextSettings.h" #include "SchemeHandlerFactoryWrapper.h" -using namespace CefSharp; - namespace CefSharp { /// diff --git a/CefSharp.Core/RequestContextSettings.h b/CefSharp.Core/RequestContextSettings.h index a7f0659ff..18aa090fa 100644 --- a/CefSharp.Core/RequestContextSettings.h +++ b/CefSharp.Core/RequestContextSettings.h @@ -5,11 +5,8 @@ #pragma once #include "Stdafx.h" -#include "Internals/StringUtils.h" #include "include\cef_request_context.h" -using namespace CefSharp::Internals; - namespace CefSharp { /// diff --git a/CefSharp.Core/ResourceHandlerWrapper.cpp b/CefSharp.Core/ResourceHandlerWrapper.cpp index 5ae747ed3..a93a6f8e0 100644 --- a/CefSharp.Core/ResourceHandlerWrapper.cpp +++ b/CefSharp.Core/ResourceHandlerWrapper.cpp @@ -3,6 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #include "Stdafx.h" + #include "Internals/CefRequestWrapper.h" #include "Internals/CefResponseWrapper.h" #include "Internals/CefCallbackWrapper.h" diff --git a/CefSharp.Core/ResourceHandlerWrapper.h b/CefSharp.Core/ResourceHandlerWrapper.h index f450b8cb6..dedd39576 100644 --- a/CefSharp.Core/ResourceHandlerWrapper.h +++ b/CefSharp.Core/ResourceHandlerWrapper.h @@ -7,7 +7,6 @@ #include "Stdafx.h" #include "include/cef_scheme.h" -using namespace System; using namespace System::IO; using namespace System::Collections::Specialized; diff --git a/CefSharp.Core/SchemeHandlerFactoryWrapper.h b/CefSharp.Core/SchemeHandlerFactoryWrapper.h index 0068e2534..7f43d55ce 100644 --- a/CefSharp.Core/SchemeHandlerFactoryWrapper.h +++ b/CefSharp.Core/SchemeHandlerFactoryWrapper.h @@ -13,7 +13,6 @@ #include "Internals\CefRequestWrapper.h" #include "ResourceHandlerWrapper.h" -using namespace System; using namespace System::IO; using namespace System::Collections::Specialized; diff --git a/CefSharp.Core/Stdafx.h b/CefSharp.Core/Stdafx.h index a9a89155c..d31501f05 100644 --- a/CefSharp.Core/Stdafx.h +++ b/CefSharp.Core/Stdafx.h @@ -11,10 +11,14 @@ #endif #include +#include #include -#include "Cef.h" -#include "Internals/MCefRefPtr.h" -#include "Internals/StringUtils.h" +#include "Internals\MCefRefPtr.h" +#include "Internals\StringUtils.h" #include "vcclr_local.h" + +using namespace CefSharp; +using namespace CefSharp::Internals; +using namespace System; \ No newline at end of file diff --git a/CefSharp.Core/WindowInfo.h b/CefSharp.Core/WindowInfo.h index a262e35bc..9fd4c420f 100644 --- a/CefSharp.Core/WindowInfo.h +++ b/CefSharp.Core/WindowInfo.h @@ -8,8 +8,6 @@ #include "include\internal\cef_win.h" -using namespace CefSharp; - namespace CefSharp { public ref class WindowInfo : public IWindowInfo