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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 if (!verifyProtocolHandlerScheme(scheme, es)) | 149 if (!verifyProtocolHandlerScheme(scheme, es)) |
150 return; | 150 return; |
151 | 151 |
152 NavigatorContentUtils::from(navigator->frame()->page())->client()->registerP
rotocolHandler(scheme, baseURL, url, navigator->frame()->displayStringModifiedBy
Encoding(title)); | 152 NavigatorContentUtils::from(navigator->frame()->page())->client()->registerP
rotocolHandler(scheme, baseURL, url, navigator->frame()->displayStringModifiedBy
Encoding(title)); |
153 } | 153 } |
154 | 154 |
155 #if ENABLE(CUSTOM_SCHEME_HANDLER) | 155 #if ENABLE(CUSTOM_SCHEME_HANDLER) |
156 static String customHandlersStateString(const NavigatorContentUtilsClient::Custo
mHandlersState state) | 156 static String customHandlersStateString(const NavigatorContentUtilsClient::Custo
mHandlersState state) |
157 { | 157 { |
158 DEFINE_STATIC_LOCAL(const String, newHandler, (ASCIILiteral("new"))); | 158 DEFINE_STATIC_LOCAL(const String, newHandler, ("new")); |
159 DEFINE_STATIC_LOCAL(const String, registeredHandler, (ASCIILiteral("register
ed"))); | 159 DEFINE_STATIC_LOCAL(const String, registeredHandler, ("registered")); |
160 DEFINE_STATIC_LOCAL(const String, declinedHandler, (ASCIILiteral("declined")
)); | 160 DEFINE_STATIC_LOCAL(const String, declinedHandler, ("declined")); |
161 | 161 |
162 switch (state) { | 162 switch (state) { |
163 case NavigatorContentUtilsClient::CustomHandlersNew: | 163 case NavigatorContentUtilsClient::CustomHandlersNew: |
164 return newHandler; | 164 return newHandler; |
165 case NavigatorContentUtilsClient::CustomHandlersRegistered: | 165 case NavigatorContentUtilsClient::CustomHandlersRegistered: |
166 return registeredHandler; | 166 return registeredHandler; |
167 case NavigatorContentUtilsClient::CustomHandlersDeclined: | 167 case NavigatorContentUtilsClient::CustomHandlersDeclined: |
168 return declinedHandler; | 168 return declinedHandler; |
169 } | 169 } |
170 | 170 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 | 216 |
217 void provideNavigatorContentUtilsTo(Page* page, NavigatorContentUtilsClient* cli
ent) | 217 void provideNavigatorContentUtilsTo(Page* page, NavigatorContentUtilsClient* cli
ent) |
218 { | 218 { |
219 RefCountedSupplement<Page, NavigatorContentUtils>::provideTo(page, Navigator
ContentUtils::supplementName(), NavigatorContentUtils::create(client)); | 219 RefCountedSupplement<Page, NavigatorContentUtils>::provideTo(page, Navigator
ContentUtils::supplementName(), NavigatorContentUtils::create(client)); |
220 } | 220 } |
221 | 221 |
222 } // namespace WebCore | 222 } // namespace WebCore |
223 | 223 |
224 #endif // ENABLE(NAVIGATOR_CONTENT_UTILS) | 224 #endif // ENABLE(NAVIGATOR_CONTENT_UTILS) |
225 | 225 |
OLD | NEW |