| 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 26 matching lines...) Expand all Loading... |
| 37 #include <wtf/HashSet.h> | 37 #include <wtf/HashSet.h> |
| 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 #if !PLATFORM(BLACKBERRY) | |
| 48 "irc", | 47 "irc", |
| 49 "mailto", | 48 "mailto", |
| 50 "mms", | 49 "mms", |
| 51 "news", | 50 "news", |
| 52 "nntp", | 51 "nntp", |
| 53 "sms", | 52 "sms", |
| 54 "smsto", | 53 "smsto", |
| 55 "tel", | 54 "tel", |
| 56 "urn", | 55 "urn", |
| 57 "webcal", | 56 "webcal", |
| 58 #endif | |
| 59 }; | 57 }; |
| 60 for (size_t i = 0; i < WTF_ARRAY_LENGTH(protocols); ++i) | 58 for (size_t i = 0; i < WTF_ARRAY_LENGTH(protocols); ++i) |
| 61 protocolWhitelist->add(protocols[i]); | 59 protocolWhitelist->add(protocols[i]); |
| 62 } | 60 } |
| 63 | 61 |
| 64 static bool verifyCustomHandlerURL(const String& baseURL, const String& url, Exc
eptionCode& ec) | 62 static bool verifyCustomHandlerURL(const String& baseURL, const String& url, Exc
eptionCode& ec) |
| 65 { | 63 { |
| 66 // The specification requires that it is a SYNTAX_ERR if the "%s" token is | 64 // The specification requires that it is a SYNTAX_ERR if the "%s" token is |
| 67 // not present. | 65 // not present. |
| 68 static const char token[] = "%s"; | 66 static const char token[] = "%s"; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 206 |
| 209 void provideNavigatorContentUtilsTo(Page* page, NavigatorContentUtilsClient* cli
ent) | 207 void provideNavigatorContentUtilsTo(Page* page, NavigatorContentUtilsClient* cli
ent) |
| 210 { | 208 { |
| 211 RefCountedSupplement<Page, NavigatorContentUtils>::provideTo(page, Navigator
ContentUtils::supplementName(), NavigatorContentUtils::create(client)); | 209 RefCountedSupplement<Page, NavigatorContentUtils>::provideTo(page, Navigator
ContentUtils::supplementName(), NavigatorContentUtils::create(client)); |
| 212 } | 210 } |
| 213 | 211 |
| 214 } // namespace WebCore | 212 } // namespace WebCore |
| 215 | 213 |
| 216 #endif // ENABLE(NAVIGATOR_CONTENT_UTILS) | 214 #endif // ENABLE(NAVIGATOR_CONTENT_UTILS) |
| 217 | 215 |
| OLD | NEW |