| 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) 2014, Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2014, 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 NavigatorContentUtils* NavigatorContentUtils::from(LocalFrame& frame) | 139 NavigatorContentUtils* NavigatorContentUtils::from(LocalFrame& frame) |
| 140 { | 140 { |
| 141 return static_cast<NavigatorContentUtils*>(Supplement<LocalFrame>::from(fram
e, supplementName())); | 141 return static_cast<NavigatorContentUtils*>(Supplement<LocalFrame>::from(fram
e, supplementName())); |
| 142 } | 142 } |
| 143 | 143 |
| 144 NavigatorContentUtils::~NavigatorContentUtils() | 144 NavigatorContentUtils::~NavigatorContentUtils() |
| 145 { | 145 { |
| 146 } | 146 } |
| 147 | 147 |
| 148 RawPtr<NavigatorContentUtils> NavigatorContentUtils::create(RawPtr<NavigatorCont
entUtilsClient> client) | 148 NavigatorContentUtils* NavigatorContentUtils::create(NavigatorContentUtilsClient
* client) |
| 149 { | 149 { |
| 150 return new NavigatorContentUtils(client); | 150 return new NavigatorContentUtils(client); |
| 151 } | 151 } |
| 152 | 152 |
| 153 void NavigatorContentUtils::registerProtocolHandler(Navigator& navigator, const
String& scheme, const String& url, const String& title, ExceptionState& exceptio
nState) | 153 void NavigatorContentUtils::registerProtocolHandler(Navigator& navigator, const
String& scheme, const String& url, const String& title, ExceptionState& exceptio
nState) |
| 154 { | 154 { |
| 155 if (!navigator.frame()) | 155 if (!navigator.frame()) |
| 156 return; | 156 return; |
| 157 | 157 |
| 158 Document* document = navigator.frame()->document(); | 158 Document* document = navigator.frame()->document(); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 return; | 222 return; |
| 223 | 223 |
| 224 NavigatorContentUtils::from(*navigator.frame())->client()->unregisterProtoco
lHandler(scheme, document->completeURL(url)); | 224 NavigatorContentUtils::from(*navigator.frame())->client()->unregisterProtoco
lHandler(scheme, document->completeURL(url)); |
| 225 } | 225 } |
| 226 | 226 |
| 227 const char* NavigatorContentUtils::supplementName() | 227 const char* NavigatorContentUtils::supplementName() |
| 228 { | 228 { |
| 229 return "NavigatorContentUtils"; | 229 return "NavigatorContentUtils"; |
| 230 } | 230 } |
| 231 | 231 |
| 232 void provideNavigatorContentUtilsTo(LocalFrame& frame, RawPtr<NavigatorContentUt
ilsClient> client) | 232 void provideNavigatorContentUtilsTo(LocalFrame& frame, NavigatorContentUtilsClie
nt* client) |
| 233 { | 233 { |
| 234 NavigatorContentUtils::provideTo(frame, NavigatorContentUtils::supplementNam
e(), NavigatorContentUtils::create(client)); | 234 NavigatorContentUtils::provideTo(frame, NavigatorContentUtils::supplementNam
e(), NavigatorContentUtils::create(client)); |
| 235 } | 235 } |
| 236 | 236 |
| 237 } // namespace blink | 237 } // namespace blink |
| OLD | NEW |