| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 return; | 147 return; |
| 148 | 148 |
| 149 String baseURL = document->baseURL().baseAsString(); | 149 String baseURL = document->baseURL().baseAsString(); |
| 150 | 150 |
| 151 if (!verifyCustomHandlerURL(baseURL, url, es)) | 151 if (!verifyCustomHandlerURL(baseURL, url, es)) |
| 152 return; | 152 return; |
| 153 | 153 |
| 154 if (!verifyProtocolHandlerScheme(scheme, "registerProtocolHandler", es)) | 154 if (!verifyProtocolHandlerScheme(scheme, "registerProtocolHandler", es)) |
| 155 return; | 155 return; |
| 156 | 156 |
| 157 NavigatorContentUtils::from(navigator->frame()->page())->client()->registerP
rotocolHandler(scheme, baseURL, url, navigator->frame()->displayStringModifiedBy
Encoding(title)); | 157 NavigatorContentUtils::from(navigator->frame()->page())->client()->registerP
rotocolHandler(scheme, baseURL, url, title); |
| 158 } | 158 } |
| 159 | 159 |
| 160 #if ENABLE(CUSTOM_SCHEME_HANDLER) | 160 #if ENABLE(CUSTOM_SCHEME_HANDLER) |
| 161 static String customHandlersStateString(const NavigatorContentUtilsClient::Custo
mHandlersState state) | 161 static String customHandlersStateString(const NavigatorContentUtilsClient::Custo
mHandlersState state) |
| 162 { | 162 { |
| 163 DEFINE_STATIC_LOCAL(const String, newHandler, ("new")); | 163 DEFINE_STATIC_LOCAL(const String, newHandler, ("new")); |
| 164 DEFINE_STATIC_LOCAL(const String, registeredHandler, ("registered")); | 164 DEFINE_STATIC_LOCAL(const String, registeredHandler, ("registered")); |
| 165 DEFINE_STATIC_LOCAL(const String, declinedHandler, ("declined")); | 165 DEFINE_STATIC_LOCAL(const String, declinedHandler, ("declined")); |
| 166 | 166 |
| 167 switch (state) { | 167 switch (state) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 | 221 |
| 222 void provideNavigatorContentUtilsTo(Page* page, NavigatorContentUtilsClient* cli
ent) | 222 void provideNavigatorContentUtilsTo(Page* page, NavigatorContentUtilsClient* cli
ent) |
| 223 { | 223 { |
| 224 RefCountedSupplement<Page, NavigatorContentUtils>::provideTo(page, Navigator
ContentUtils::supplementName(), NavigatorContentUtils::create(client)); | 224 RefCountedSupplement<Page, NavigatorContentUtils>::provideTo(page, Navigator
ContentUtils::supplementName(), NavigatorContentUtils::create(client)); |
| 225 } | 225 } |
| 226 | 226 |
| 227 } // namespace WebCore | 227 } // namespace WebCore |
| 228 | 228 |
| 229 #endif // ENABLE(NAVIGATOR_CONTENT_UTILS) | 229 #endif // ENABLE(NAVIGATOR_CONTENT_UTILS) |
| 230 | 230 |
| OLD | NEW |