Skip to content

Commit

Permalink
Maintenance - Fixed formatting, file encoding, and copyright year (#2504
Browse files Browse the repository at this point in the history
)

* Applied formatting

* Fixed file encoding + Updated copyright year

* Updated License

* Fixed more file encoding

* Copyright notice now shows the year the file was created
  • Loading branch information
merceyz authored and amaitland committed Sep 10, 2018
1 parent 28f4326 commit bef5dd3
Show file tree
Hide file tree
Showing 486 changed files with 2,329 additions and 2,276 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 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.

Expand Down
21 changes: 11 additions & 10 deletions CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 2014 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.

#pragma once

#include "Stdafx.h"
Expand Down Expand Up @@ -137,7 +138,7 @@ namespace CefSharp
}

auto rootObjectWrappers = browserWrapper->JavascriptRootObjectWrappers;

JavascriptRootObjectWrapper^ wrapper;
if (rootObjectWrappers->TryRemove(frame->GetIdentifier(), wrapper))
{
Expand Down Expand Up @@ -300,7 +301,7 @@ namespace CefSharp

return true;
}

//these messages are roughly handled the same way
if (name == kEvaluateJavascriptRequest || name == kJavascriptCallbackRequest)
{
Expand All @@ -327,7 +328,7 @@ namespace CefSharp

JavascriptRootObjectWrapper^ rootObjectWrapper;
browserWrapper->JavascriptRootObjectWrappers->TryGetValue(frameId, rootObjectWrapper);

//NOTE: In the rare case when when OnContextCreated hasn't been called we need to manually create the rootObjectWrapper
//It appears that OnContextCreated is only called for pages that have javascript on them, which makes sense
//as without javascript there is no need for a context.
Expand All @@ -348,14 +349,14 @@ namespace CefSharp
if (frame.get())
{
auto context = frame->GetV8Context();

if (context.get() && context->Enter())
{
try
{
CefRefPtr<CefV8Exception> exception;
success = context->Eval(script, scriptUrl, startLine, result, exception);

//we need to do this here to be able to store the v8context
if (success)
{
Expand Down Expand Up @@ -404,14 +405,14 @@ namespace CefSharp
{
auto context = callbackWrapper->GetContext();
auto value = callbackWrapper->GetValue();

if (context.get() && context->Enter())
{
try
{
auto parameterList = argList->GetList(3);
CefV8ValueList params;

//Needs to be called within the context as for Dictionary (mapped to struct)
//a V8Object will be created
for (CefV8ValueList::size_type i = 0; i < parameterList->GetSize(); i++)
Expand All @@ -421,7 +422,7 @@ namespace CefSharp

result = value->ExecuteFunction(nullptr, params);
success = result.get() != nullptr;

//we need to do this here to be able to store the v8context
if (success)
{
Expand Down Expand Up @@ -604,7 +605,7 @@ namespace CefSharp
if (rootObjectWrapper->TryGetAndRemoveMethodCallback(callbackId, callback))
{

try
try
{
auto frame = browser->GetFrame(frameId);
if (frame.get())
Expand Down
2 changes: 1 addition & 1 deletion CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 2014 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.

Expand Down
6 changes: 3 additions & 3 deletions CefSharp.BrowserSubprocess.Core/CefBrowserWrapper.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 2013 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.

Expand All @@ -24,7 +24,7 @@ namespace CefSharp
{
private:
MCefRefPtr<CefBrowser> _cefBrowser;

internal:
//Frame Identifier is used as Key
property ConcurrentDictionary<int64, JavascriptRootObjectWrapper^>^ JavascriptRootObjectWrappers;
Expand All @@ -38,7 +38,7 @@ namespace CefSharp

JavascriptRootObjectWrappers = gcnew ConcurrentDictionary<int64, JavascriptRootObjectWrapper^>();
}

!CefBrowserWrapper()
{
_cefBrowser = nullptr;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 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.

Expand Down Expand Up @@ -34,7 +34,7 @@ namespace CefSharp
void JavascriptCallbackRegistry::Deregister(Int64 id)
{
JavascriptCallbackWrapper^ callback;
if(_callbacks->TryRemove(id, callback))
if (_callbacks->TryRemove(id, callback))
{
delete callback;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 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.

Expand Down
4 changes: 2 additions & 2 deletions CefSharp.BrowserSubprocess.Core/JavascriptCallbackWrapper.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 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.

Expand Down Expand Up @@ -29,7 +29,7 @@ namespace CefSharp

public:
JavascriptCallbackWrapper(CefRefPtr<CefV8Value> value, CefRefPtr<CefV8Context> context)
: _value(value), _context(context)
: _value(value), _context(context)
{
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 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.

Expand Down
2 changes: 1 addition & 1 deletion CefSharp.BrowserSubprocess.Core/JavascriptMethodHandler.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 2014 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.

Expand Down
3 changes: 2 additions & 1 deletion CefSharp.BrowserSubprocess.Core/JavascriptMethodWrapper.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 2014 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.

#pragma once

#include "Stdafx.h"
Expand Down
3 changes: 2 additions & 1 deletion CefSharp.BrowserSubprocess.Core/JavascriptMethodWrapper.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 2014 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.

#pragma once

#include "Stdafx.h"
Expand Down
5 changes: 3 additions & 2 deletions CefSharp.BrowserSubprocess.Core/JavascriptObjectWrapper.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 2014 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.

#pragma once

#include "Stdafx.h"
Expand All @@ -17,7 +18,7 @@ namespace CefSharp
_jsPropertyHandler = new JavascriptPropertyHandler(
gcnew Func<String^, BrowserProcessResponse^>(this, &JavascriptObjectWrapper::GetProperty),
gcnew Func<String^, Object^, BrowserProcessResponse^>(this, &JavascriptObjectWrapper::SetProperty)
);
);

//V8Value that represents this javascript object - only one per complex type
auto javascriptObject = CefV8Value::CreateObject(_jsPropertyHandler.get(), NULL);
Expand Down
2 changes: 1 addition & 1 deletion CefSharp.BrowserSubprocess.Core/JavascriptObjectWrapper.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 2014 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.

Expand Down
6 changes: 3 additions & 3 deletions CefSharp.BrowserSubprocess.Core/JavascriptPropertyHandler.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 2014 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.

Expand Down Expand Up @@ -37,7 +37,7 @@ namespace CefSharp
auto propertyName = StringUtils::ToClr(name);
auto response = _getter->Invoke(propertyName);
retval = TypeUtils::ConvertToCef(response->Result, nullptr);
if(!response->Success)
if (!response->Success)
{
exception = StringUtils::ToNative(response->Message);
}
Expand All @@ -52,7 +52,7 @@ namespace CefSharp
auto propertyName = StringUtils::ToClr(name);
auto managedValue = TypeUtils::ConvertFromCef(value, nullptr);
auto response = _setter->Invoke(propertyName, managedValue);
if(!response->Success)
if (!response->Success)
{
exception = StringUtils::ToNative(response->Message);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 2014 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.

#pragma once

#include "Stdafx.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 2014 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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 2014 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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 2014 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.

Expand Down
13 changes: 6 additions & 7 deletions CefSharp.BrowserSubprocess.Core/RegisterBoundObjectHandler.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 2018 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.

Expand Down Expand Up @@ -90,7 +89,7 @@ namespace CefSharp
else
{
retval = CefV8Value::CreateBool(false);
}
}
}
//TODO: Better name for this function
else if (name == kDeleteBoundObject || name == kDeleteBoundObjectCamelCase)
Expand Down Expand Up @@ -196,7 +195,7 @@ namespace CefSharp
for (auto i = 0; i < arguments.size(); i++)
{
//Validate arg as being a string
if(arguments[i]->IsString())
if (arguments[i]->IsString())
{
auto objectName = arguments[i]->GetStringValue();
auto managedObjectName = StringUtils::ToClr(objectName);
Expand Down Expand Up @@ -257,7 +256,7 @@ namespace CefSharp
rootObject = gcnew JavascriptRootObjectWrapper(browser->GetIdentifier(), _browserWrapper->BrowserProcess);
rootObjectWrappers->TryAdd(frame->GetIdentifier(), rootObject);
}

//Cached objects only contains a list of objects not already bound
rootObject->Bind(cachedObjects, context->GetGlobal());

Expand All @@ -272,7 +271,7 @@ namespace CefSharp
NotifyObjectBound(browser, objectNamesWithBoundStatus);
}
}

}
else
{
Expand Down Expand Up @@ -326,7 +325,7 @@ namespace CefSharp
{
exception = "Unable to get current context";
}


return true;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 2018 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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 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.

Expand Down
Loading

0 comments on commit bef5dd3

Please sign in to comment.