OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. 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 | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1761 mediaElement->connectedToRemoteDevice(); | 1761 mediaElement->connectedToRemoteDevice(); |
1762 else | 1762 else |
1763 mediaElement->disconnectedFromRemoteDevice(); | 1763 mediaElement->disconnectedFromRemoteDevice(); |
1764 } | 1764 } |
1765 | 1765 |
1766 void Internals::registerURLSchemeAsBypassingContentSecurityPolicy(const String&
scheme) | 1766 void Internals::registerURLSchemeAsBypassingContentSecurityPolicy(const String&
scheme) |
1767 { | 1767 { |
1768 SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy(scheme); | 1768 SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy(scheme); |
1769 } | 1769 } |
1770 | 1770 |
| 1771 void Internals::registerURLSchemeAsBypassingContentSecurityPolicy(const String&
scheme, const Vector<String>& policyAreas) |
| 1772 { |
| 1773 uint32_t policyAreasEnum = SchemeRegistry::PolicyAreaNone; |
| 1774 for (const auto& policyArea : policyAreas) { |
| 1775 if (policyArea == "img") |
| 1776 policyAreasEnum |= SchemeRegistry::PolicyAreaImage; |
| 1777 else if (policyArea == "style") |
| 1778 policyAreasEnum |= SchemeRegistry::PolicyAreaStyle; |
| 1779 } |
| 1780 SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy( |
| 1781 scheme, static_cast<SchemeRegistry::PolicyAreas>(policyAreasEnum)); |
| 1782 } |
| 1783 |
1771 void Internals::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(const
String& scheme) | 1784 void Internals::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(const
String& scheme) |
1772 { | 1785 { |
1773 SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(sc
heme); | 1786 SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(sc
heme); |
1774 } | 1787 } |
1775 | 1788 |
1776 TypeConversions* Internals::typeConversions() const | 1789 TypeConversions* Internals::typeConversions() const |
1777 { | 1790 { |
1778 return TypeConversions::create(); | 1791 return TypeConversions::create(); |
1779 } | 1792 } |
1780 | 1793 |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2336 } | 2349 } |
2337 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr
eate(element->document(), options)); | 2350 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr
eate(element->document(), options)); |
2338 } | 2351 } |
2339 | 2352 |
2340 Iterator* Internals::iterator(ScriptState* scriptState, ExceptionState& exceptio
nState) | 2353 Iterator* Internals::iterator(ScriptState* scriptState, ExceptionState& exceptio
nState) |
2341 { | 2354 { |
2342 return new InternalsIterator; | 2355 return new InternalsIterator; |
2343 } | 2356 } |
2344 | 2357 |
2345 } // namespace blink | 2358 } // namespace blink |
OLD | NEW |