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

Side by Side Diff: DartApplicationLoader.h

Issue 18024004: Bugfix in DOM bindings: canonicalize URLs even if no ApplicationLoader is available (Closed) Base URL: http://src.chromium.org/multivm/trunk/webkit/Source/bindings/dart
Patch Set: Created 7 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | DartApplicationLoader.cpp » ('j') | DartApplicationLoader.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011, Google Inc. 1 // Copyright 2011, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 Document* document() { return m_originDocument; } 62 Document* document() { return m_originDocument; }
63 63
64 static void installLibraryTagHandlerForCurrentIsolate(); 64 static void installLibraryTagHandlerForCurrentIsolate();
65 65
66 private: 66 private:
67 void scriptLoadError(String failedUrl); 67 void scriptLoadError(String failedUrl);
68 void loadMainScript(const String& url, const String& source); 68 void loadMainScript(const String& url, const String& source);
69 69
70 static Dart_Handle libraryTagHandlerCallback(Dart_LibraryTag tag, Dart_Handl e library, Dart_Handle url); 70 static Dart_Handle libraryTagHandlerCallback(Dart_LibraryTag tag, Dart_Handl e library, Dart_Handle url);
71 Dart_Handle libraryTagHandler(Dart_LibraryTag tag, Dart_Handle library, Dart _Handle url); 71 static Dart_Handle CanonicalizeUrl(Dart_Handle urlHandle, String url, String libraryURL);
72 Dart_Handle libraryTagHandler(Dart_LibraryTag tag, Dart_Handle urlHandle, St ring url, String libraryURL);
72 73
73 Dart_Isolate m_isolate; 74 Dart_Isolate m_isolate;
74 // Client must ensure that DartApplicationLoader doesn't outlive correspondi ng document. 75 // Client must ensure that DartApplicationLoader doesn't outlive correspondi ng document.
75 Document* m_originDocument; 76 Document* m_originDocument;
76 RefPtr<ErrorEventDispatcher> m_errorEventDispatcher; 77 RefPtr<ErrorEventDispatcher> m_errorEventDispatcher;
77 String m_libraryUrl; 78 String m_libraryUrl;
78 79
79 void loadScriptFromSnapshot(const String& url, const uint8_t* snapshot, intp tr_t snapshotSize); 80 void loadScriptFromSnapshot(const String& url, const uint8_t* snapshot, intp tr_t snapshotSize);
80 void loadLibrary(const String& url, const String& source); 81 void loadLibrary(const String& url, const String& source);
81 void loadSource(const String& url, const String& source); 82 void loadSource(const String& url, const String& source);
(...skipping 18 matching lines...) Expand all
100 101
101 RefPtr<VoidCallback> m_applicationLoadedCallback; 102 RefPtr<VoidCallback> m_applicationLoadedCallback;
102 bool m_domEnabled; 103 bool m_domEnabled;
103 104
104 friend class ScriptLoadCallback; 105 friend class ScriptLoadCallback;
105 }; 106 };
106 107
107 } 108 }
108 109
109 #endif // DartApplicationLoader_h 110 #endif // DartApplicationLoader_h
OLDNEW
« no previous file with comments | « no previous file | DartApplicationLoader.cpp » ('j') | DartApplicationLoader.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698