Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp

Issue 1441083002: Oilpan: move NavigatorContentUtilsClients to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add back non-Oilpan USING_FAST_MALLOC() usage for NavigatorContentUtilsClient Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 NavigatorContentUtils* NavigatorContentUtils::from(LocalFrame& frame) 140 NavigatorContentUtils* NavigatorContentUtils::from(LocalFrame& frame)
141 { 141 {
142 return static_cast<NavigatorContentUtils*>(WillBeHeapSupplement<LocalFrame>: :from(frame, supplementName())); 142 return static_cast<NavigatorContentUtils*>(WillBeHeapSupplement<LocalFrame>: :from(frame, supplementName()));
143 } 143 }
144 144
145 NavigatorContentUtils::~NavigatorContentUtils() 145 NavigatorContentUtils::~NavigatorContentUtils()
146 { 146 {
147 } 147 }
148 148
149 PassOwnPtrWillBeRawPtr<NavigatorContentUtils> NavigatorContentUtils::create(Pass OwnPtr<NavigatorContentUtilsClient> client) 149 PassOwnPtrWillBeRawPtr<NavigatorContentUtils> NavigatorContentUtils::create(Pass OwnPtrWillBeRawPtr<NavigatorContentUtilsClient> client)
150 { 150 {
151 return adoptPtrWillBeNoop(new NavigatorContentUtils(client)); 151 return adoptPtrWillBeNoop(new NavigatorContentUtils(client));
152 } 152 }
153 153
154 void NavigatorContentUtils::registerProtocolHandler(Navigator& navigator, const String& scheme, const String& url, const String& title, ExceptionState& exceptio nState) 154 void NavigatorContentUtils::registerProtocolHandler(Navigator& navigator, const String& scheme, const String& url, const String& title, ExceptionState& exceptio nState)
155 { 155 {
156 if (!navigator.frame()) 156 if (!navigator.frame())
157 return; 157 return;
158 158
159 Document* document = navigator.frame()->document(); 159 Document* document = navigator.frame()->document();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 return; 223 return;
224 224
225 NavigatorContentUtils::from(*navigator.frame())->client()->unregisterProtoco lHandler(scheme, document->completeURL(url)); 225 NavigatorContentUtils::from(*navigator.frame())->client()->unregisterProtoco lHandler(scheme, document->completeURL(url));
226 } 226 }
227 227
228 const char* NavigatorContentUtils::supplementName() 228 const char* NavigatorContentUtils::supplementName()
229 { 229 {
230 return "NavigatorContentUtils"; 230 return "NavigatorContentUtils";
231 } 231 }
232 232
233 void provideNavigatorContentUtilsTo(LocalFrame& frame, PassOwnPtr<NavigatorConte ntUtilsClient> client) 233 void provideNavigatorContentUtilsTo(LocalFrame& frame, PassOwnPtrWillBeRawPtr<Na vigatorContentUtilsClient> client)
234 { 234 {
235 NavigatorContentUtils::provideTo(frame, NavigatorContentUtils::supplementNam e(), NavigatorContentUtils::create(client)); 235 NavigatorContentUtils::provideTo(frame, NavigatorContentUtils::supplementNam e(), NavigatorContentUtils::create(client));
236 } 236 }
237 237
238 } // namespace blink 238 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698