| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 } | 114 } |
| 115 | 115 |
| 116 if (isProtocolWhitelisted(scheme)) | 116 if (isProtocolWhitelisted(scheme)) |
| 117 return true; | 117 return true; |
| 118 exceptionState.throwSecurityError("The scheme '" + scheme + "' doesn't belon
g to the protocol whitelist. Please prefix non-whitelisted schemes with the stri
ng 'web+'."); | 118 exceptionState.throwSecurityError("The scheme '" + scheme + "' doesn't belon
g to the protocol whitelist. Please prefix non-whitelisted schemes with the stri
ng 'web+'."); |
| 119 return false; | 119 return false; |
| 120 } | 120 } |
| 121 | 121 |
| 122 NavigatorContentUtils* NavigatorContentUtils::from(Page& page) | 122 NavigatorContentUtils* NavigatorContentUtils::from(Page& page) |
| 123 { | 123 { |
| 124 return static_cast<NavigatorContentUtils*>(Supplement<Page>::from(page, supp
lementName())); | 124 return static_cast<NavigatorContentUtils*>(WillBeHeapSupplement<Page>::from(
page, supplementName())); |
| 125 } | 125 } |
| 126 | 126 |
| 127 NavigatorContentUtils::~NavigatorContentUtils() | 127 NavigatorContentUtils::~NavigatorContentUtils() |
| 128 { | 128 { |
| 129 } | 129 } |
| 130 | 130 |
| 131 PassOwnPtr<NavigatorContentUtils> NavigatorContentUtils::create(PassOwnPtr<Navig
atorContentUtilsClient> client) | 131 PassOwnPtrWillBeRawPtr<NavigatorContentUtils> NavigatorContentUtils::create(Pass
OwnPtr<NavigatorContentUtilsClient> client) |
| 132 { | 132 { |
| 133 return adoptPtr(new NavigatorContentUtils(client)); | 133 return adoptPtrWillBeNoop(new NavigatorContentUtils(client)); |
| 134 } | 134 } |
| 135 | 135 |
| 136 void NavigatorContentUtils::registerProtocolHandler(Navigator& navigator, const
String& scheme, const String& url, const String& title, ExceptionState& exceptio
nState) | 136 void NavigatorContentUtils::registerProtocolHandler(Navigator& navigator, const
String& scheme, const String& url, const String& title, ExceptionState& exceptio
nState) |
| 137 { | 137 { |
| 138 if (!navigator.frame()) | 138 if (!navigator.frame()) |
| 139 return; | 139 return; |
| 140 | 140 |
| 141 ASSERT(navigator.frame()->document()); | 141 ASSERT(navigator.frame()->document()); |
| 142 KURL baseURL = navigator.frame()->document()->baseURL(); | 142 KURL baseURL = navigator.frame()->document()->baseURL(); |
| 143 | 143 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 { | 216 { |
| 217 return "NavigatorContentUtils"; | 217 return "NavigatorContentUtils"; |
| 218 } | 218 } |
| 219 | 219 |
| 220 void provideNavigatorContentUtilsTo(Page& page, PassOwnPtr<NavigatorContentUtils
Client> client) | 220 void provideNavigatorContentUtilsTo(Page& page, PassOwnPtr<NavigatorContentUtils
Client> client) |
| 221 { | 221 { |
| 222 NavigatorContentUtils::provideTo(page, NavigatorContentUtils::supplementName
(), NavigatorContentUtils::create(client)); | 222 NavigatorContentUtils::provideTo(page, NavigatorContentUtils::supplementName
(), NavigatorContentUtils::create(client)); |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace WebCore | 225 } // namespace WebCore |
| OLD | NEW |