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

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

Issue 446733003: Tue Aug 5 16:08:45 PDT 2014 Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: Created 6 years, 4 months 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
« no previous file with comments | « Source/bindings/dart/DartNativeExtensionsPosix.cpp ('k') | Source/bindings/dart/dart.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/dart/DartNativeExtensionsWin.cpp
diff --git a/Source/core/svg/SVGAnimatedEnumerationBase.cpp b/Source/bindings/dart/DartNativeExtensionsWin.cpp
similarity index 63%
copy from Source/core/svg/SVGAnimatedEnumerationBase.cpp
copy to Source/bindings/dart/DartNativeExtensionsWin.cpp
index 2d03e33d5f01b0635c1f575d3c566382341ca413..4b0c70f0bf9ef33420ff09abe42fa9addbd189bf 100644
--- a/Source/core/svg/SVGAnimatedEnumerationBase.cpp
+++ b/Source/bindings/dart/DartNativeExtensionsWin.cpp
@@ -29,35 +29,39 @@
*/
#include "config.h"
+#include "bindings/dart/DartNativeExtensions.h"
-#include "core/svg/SVGAnimatedEnumerationBase.h"
+#if defined(ENABLE_DART_NATIVE_EXTENSIONS)
+#if OS(WIN)
+#include "wtf/text/StringUTF8Adaptor.h"
+#include <string>
-#include "bindings/common/ExceptionState.h"
-#include "core/dom/ExceptionCode.h"
-#include "core/svg/SVGElement.h"
namespace WebCore {
-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)
« no previous file with comments | « Source/bindings/dart/DartNativeExtensionsPosix.cpp ('k') | Source/bindings/dart/dart.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698