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

Side by Side Diff: third_party/WebKit/Source/core/dom/ContextFeatures.cpp

Issue 1851743002: Simplify Supplementables post Oilpan. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix component build Created 4 years, 8 months 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 bool ContextFeatures::mutationEventsEnabled(Document* document) 58 bool ContextFeatures::mutationEventsEnabled(Document* document)
59 { 59 {
60 ASSERT(document); 60 ASSERT(document);
61 if (!document) 61 if (!document)
62 return true; 62 return true;
63 return document->contextFeatures().isEnabled(document, MutationEvents, true) ; 63 return document->contextFeatures().isEnabled(document, MutationEvents, true) ;
64 } 64 }
65 65
66 void provideContextFeaturesTo(Page& page, PassOwnPtr<ContextFeaturesClient> clie nt) 66 void provideContextFeaturesTo(Page& page, PassOwnPtr<ContextFeaturesClient> clie nt)
67 { 67 {
68 ContextFeatures::SupplementType::provideTo(page, ContextFeatures::supplement Name(), ContextFeatures::create(client)); 68 Supplement<Page>::provideTo(page, ContextFeatures::supplementName(), Context Features::create(client));
69 } 69 }
70 70
71 void provideContextFeaturesToDocumentFrom(Document& document, Page& page) 71 void provideContextFeaturesToDocumentFrom(Document& document, Page& page)
72 { 72 {
73 ContextFeatures* provided = static_cast<ContextFeatures*>(ContextFeatures::S upplementType::from(page, ContextFeatures::supplementName())); 73 ContextFeatures* provided = static_cast<ContextFeatures*>(Supplement<Page>:: from(page, ContextFeatures::supplementName()));
74 if (!provided) 74 if (!provided)
75 return; 75 return;
76 document.setContextFeatures(*provided); 76 document.setContextFeatures(*provided);
77 } 77 }
78 78
79 } // namespace blink 79 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ContextFeatures.h ('k') | third_party/WebKit/Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698