OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "extensions/renderer/dispatcher.h" | 5 #include "extensions/renderer/dispatcher.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/alias.h" | 10 #include "base/debug/alias.h" |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 extension->url(), | 823 extension->url(), |
824 WebString::fromUTF8(scheme), | 824 WebString::fromUTF8(scheme), |
825 WebString::fromUTF8(pattern->host()), | 825 WebString::fromUTF8(pattern->host()), |
826 pattern->match_subdomains()); | 826 pattern->match_subdomains()); |
827 } | 827 } |
828 } | 828 } |
829 } | 829 } |
830 } | 830 } |
831 | 831 |
832 void Dispatcher::EnableCustomElementWhiteList() { | 832 void Dispatcher::EnableCustomElementWhiteList() { |
| 833 blink::WebCustomElement::addEmbedderCustomElementName("appplugin"); |
| 834 blink::WebCustomElement::addEmbedderCustomElementName("appview"); |
| 835 blink::WebCustomElement::addEmbedderCustomElementName("browserplugin"); |
| 836 blink::WebCustomElement::addEmbedderCustomElementName("extensionoptions"); |
| 837 blink::WebCustomElement::addEmbedderCustomElementName( |
| 838 "extensionoptionsplugin"); |
833 blink::WebCustomElement::addEmbedderCustomElementName("webview"); | 839 blink::WebCustomElement::addEmbedderCustomElementName("webview"); |
834 blink::WebCustomElement::addEmbedderCustomElementName("appview"); | |
835 blink::WebCustomElement::addEmbedderCustomElementName("appplugin"); | |
836 blink::WebCustomElement::addEmbedderCustomElementName("browserplugin"); | |
837 } | 840 } |
838 | 841 |
839 void Dispatcher::UpdateBindings(const std::string& extension_id) { | 842 void Dispatcher::UpdateBindings(const std::string& extension_id) { |
840 script_context_set().ForEach(extension_id, | 843 script_context_set().ForEach(extension_id, |
841 base::Bind(&Dispatcher::UpdateBindingsForContext, | 844 base::Bind(&Dispatcher::UpdateBindingsForContext, |
842 base::Unretained(this))); | 845 base::Unretained(this))); |
843 } | 846 } |
844 | 847 |
845 void Dispatcher::UpdateBindingsForContext(ScriptContext* context) { | 848 void Dispatcher::UpdateBindingsForContext(ScriptContext* context) { |
846 v8::HandleScope handle_scope(context->isolate()); | 849 v8::HandleScope handle_scope(context->isolate()); |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1232 return v8::Handle<v8::Object>(); | 1235 return v8::Handle<v8::Object>(); |
1233 | 1236 |
1234 if (bind_name) | 1237 if (bind_name) |
1235 *bind_name = split.back(); | 1238 *bind_name = split.back(); |
1236 | 1239 |
1237 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) | 1240 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) |
1238 : bind_object; | 1241 : bind_object; |
1239 } | 1242 } |
1240 | 1243 |
1241 } // namespace extensions | 1244 } // namespace extensions |
OLD | NEW |