Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Unified Diff: Source/bindings/core/dart/shared_lib/DartNativeExtensionsWin.cpp

Issue 1532413002: Added Dartium changes onto 45.0.2454.104 (Closed) Base URL: http://src.chromium.org/blink/branches/chromium/2454
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/bindings/core/dart/shared_lib/DartNativeExtensionsWin.cpp
diff --git a/Source/core/svg/SVGAnimatedEnumerationBase.cpp b/Source/bindings/core/dart/shared_lib/DartNativeExtensionsWin.cpp
similarity index 62%
copy from Source/core/svg/SVGAnimatedEnumerationBase.cpp
copy to Source/bindings/core/dart/shared_lib/DartNativeExtensionsWin.cpp
index 394e71629da21ba5082f6b811c7a4ae1a7ac0997..2508a3cff13ecb16458bafa314715e576aed8f01 100644
--- a/Source/core/svg/SVGAnimatedEnumerationBase.cpp
+++ b/Source/bindings/core/dart/shared_lib/DartNativeExtensionsWin.cpp
@@ -29,33 +29,39 @@
*/
#include "config.h"
+#include "bindings/core/dart/shared_lib/DartNativeExtensions.h"
-#include "core/svg/SVGAnimatedEnumerationBase.h"
+#if defined(ENABLE_DART_NATIVE_EXTENSIONS)
+#if OS(WIN)
+#include "wtf/text/StringUTF8Adaptor.h"
+#include <string>
-#include "core/svg/SVGElement.h"
namespace blink {
-SVGAnimatedEnumerationBase::~SVGAnimatedEnumerationBase()
+Dart_Handle DartNativeExtensions::loadExtensionLibrary(const String& libraryPath, const String& libraryName, void** libraryHandle)
{
+ String libraryFile = libraryPath;
+ libraryFile.append(libraryName);
+ libraryFile.append(".dll");
+
+ *libraryHandle = LoadLibraryW(libraryFile.characters16());
+ if (!*libraryHandle) {
+ return Dart_NewApiError("Error loading library.");
+ }
+ return Dart_Null();
}
-void SVGAnimatedEnumerationBase::setBaseVal(unsigned short value, ExceptionState& exceptionState)
+Dart_Handle DartNativeExtensions::resolveSymbol(void* libHandle, const String& symbolName, void** symbol)
{
- if (this->isReadOnly()) {
- exceptionState.throwDOMException(NoModificationAllowedError, "The attribute is read-only.");
- return;
+ *symbol = GetProcAddress(reinterpret_cast<HMODULE>(libHandle), symbolName.characters16());
+ if (!*symbol) {
+ return Dart_NewApiError("Error resolving symbol.");
}
-
- baseValue()->setValue(value, exceptionState);
- if (exceptionState.hadException())
- return;
-
- m_baseValueUpdated = true;
-
- ASSERT(this->attributeName() != QualifiedName::null());
- contextElement()->invalidateSVGAttributes();
- contextElement()->svgAttributeChanged(this->attributeName());
+ return Dart_Null();
}
}
+
+#endif // OS(WIN)
+#endif // defined(ENABLE_DART_NATIVE_EXTENSIONS)

Powered by Google App Engine
This is Rietveld 408576698