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

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

Issue 1482683002: Trial: build trunk with Oilpan everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: have RemoteDOMWindow keep a weak ref back to its RemoteFrame Created 5 years 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 12 matching lines...) Expand all
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #include "config.h" 27 #include "config.h"
28 #include "core/dom/ContextFeatures.h" 28 #include "core/dom/ContextFeatures.h"
29 29
30 #include "core/dom/Document.h" 30 #include "core/dom/Document.h"
31 #include "core/page/Page.h" 31 #include "core/page/Page.h"
32 #include "platform/RuntimeEnabledFeatures.h" 32 #include "platform/RuntimeEnabledFeatures.h"
33 #include "wtf/LeakAnnotations.h"
33 34
34 namespace blink { 35 namespace blink {
35 36
36 PassOwnPtr<ContextFeaturesClient> ContextFeaturesClient::empty() 37 PassOwnPtr<ContextFeaturesClient> ContextFeaturesClient::empty()
37 { 38 {
38 return adoptPtr(new ContextFeaturesClient()); 39 return adoptPtr(new ContextFeaturesClient());
39 } 40 }
40 41
41 const char* ContextFeatures::supplementName() 42 const char* ContextFeatures::supplementName()
42 { 43 {
43 return "ContextFeatures"; 44 return "ContextFeatures";
44 } 45 }
45 46
46 ContextFeatures* ContextFeatures::defaultSwitch() 47 ContextFeatures* ContextFeatures::defaultSwitch()
47 { 48 {
49 WTF_ANNOTATE_SCOPED_MEMORY_LEAK;
48 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(ContextFeatures, instance, (ContextFeat ures::create(ContextFeaturesClient::empty()))); 50 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(ContextFeatures, instance, (ContextFeat ures::create(ContextFeaturesClient::empty())));
49 return instance; 51 return instance;
50 } 52 }
51 53
52 bool ContextFeatures::pagePopupEnabled(Document* document) 54 bool ContextFeatures::pagePopupEnabled(Document* document)
53 { 55 {
54 if (!document) 56 if (!document)
55 return false; 57 return false;
56 return document->contextFeatures().isEnabled(document, PagePopup, false); 58 return document->contextFeatures().isEnabled(document, PagePopup, false);
57 } 59 }
(...skipping 13 matching lines...) Expand all
71 73
72 void provideContextFeaturesToDocumentFrom(Document& document, Page& page) 74 void provideContextFeaturesToDocumentFrom(Document& document, Page& page)
73 { 75 {
74 ContextFeatures* provided = static_cast<ContextFeatures*>(ContextFeatures::S upplementType::from(page, ContextFeatures::supplementName())); 76 ContextFeatures* provided = static_cast<ContextFeatures*>(ContextFeatures::S upplementType::from(page, ContextFeatures::supplementName()));
75 if (!provided) 77 if (!provided)
76 return; 78 return;
77 document.setContextFeatures(*provided); 79 document.setContextFeatures(*provided);
78 } 80 }
79 81
80 } // namespace blink 82 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698