OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, Google Inc. All rights reserved. | 2 * Copyright (C) 2011, Google Inc. All rights reserved. |
3 * Copyright (C) 2012, Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2012, Samsung Electronics. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 namespace WebCore { | 39 namespace WebCore { |
40 | 40 |
41 static HashSet<String>* protocolWhitelist; | 41 static HashSet<String>* protocolWhitelist; |
42 | 42 |
43 static void initProtocolHandlerWhitelist() | 43 static void initProtocolHandlerWhitelist() |
44 { | 44 { |
45 protocolWhitelist = new HashSet<String>; | 45 protocolWhitelist = new HashSet<String>; |
46 static const char* protocols[] = { | 46 static const char* protocols[] = { |
47 "bitcoin", | 47 "bitcoin", |
| 48 "geo", |
48 "irc", | 49 "irc", |
49 "mailto", | 50 "mailto", |
| 51 "magnet", |
50 "mms", | 52 "mms", |
51 "news", | 53 "news", |
52 "nntp", | 54 "nntp", |
| 55 "sip", |
53 "sms", | 56 "sms", |
54 "smsto", | 57 "smsto", |
| 58 "ssh", |
55 "tel", | 59 "tel", |
56 "urn", | 60 "urn", |
57 "webcal", | 61 "webcal", |
| 62 "xmpp", |
58 }; | 63 }; |
59 for (size_t i = 0; i < WTF_ARRAY_LENGTH(protocols); ++i) | 64 for (size_t i = 0; i < WTF_ARRAY_LENGTH(protocols); ++i) |
60 protocolWhitelist->add(protocols[i]); | 65 protocolWhitelist->add(protocols[i]); |
61 } | 66 } |
62 | 67 |
63 static bool verifyCustomHandlerURL(const String& baseURL, const String& url, Exc
eptionCode& ec) | 68 static bool verifyCustomHandlerURL(const String& baseURL, const String& url, Exc
eptionCode& ec) |
64 { | 69 { |
65 // The specification requires that it is a SYNTAX_ERR if the "%s" token is | 70 // The specification requires that it is a SYNTAX_ERR if the "%s" token is |
66 // not present. | 71 // not present. |
67 static const char token[] = "%s"; | 72 static const char token[] = "%s"; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 212 |
208 void provideNavigatorContentUtilsTo(Page* page, NavigatorContentUtilsClient* cli
ent) | 213 void provideNavigatorContentUtilsTo(Page* page, NavigatorContentUtilsClient* cli
ent) |
209 { | 214 { |
210 RefCountedSupplement<Page, NavigatorContentUtils>::provideTo(page, Navigator
ContentUtils::supplementName(), NavigatorContentUtils::create(client)); | 215 RefCountedSupplement<Page, NavigatorContentUtils>::provideTo(page, Navigator
ContentUtils::supplementName(), NavigatorContentUtils::create(client)); |
211 } | 216 } |
212 | 217 |
213 } // namespace WebCore | 218 } // namespace WebCore |
214 | 219 |
215 #endif // ENABLE(NAVIGATOR_CONTENT_UTILS) | 220 #endif // ENABLE(NAVIGATOR_CONTENT_UTILS) |
216 | 221 |
OLD | NEW |