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 WebString::fromUTF8(schemes[j]), | 823 WebString::fromUTF8(schemes[j]), |
824 WebString::fromUTF8(i->host()), | 824 WebString::fromUTF8(i->host()), |
825 i->match_subdomains()); | 825 i->match_subdomains()); |
826 } | 826 } |
827 } | 827 } |
828 } | 828 } |
829 } | 829 } |
830 | 830 |
831 void Dispatcher::EnableCustomElementWhiteList() { | 831 void Dispatcher::EnableCustomElementWhiteList() { |
832 blink::WebCustomElement::addEmbedderCustomElementName("webview"); | 832 blink::WebCustomElement::addEmbedderCustomElementName("webview"); |
833 blink::WebCustomElement::addEmbedderCustomElementName("browser-plugin"); | 833 blink::WebCustomElement::addEmbedderCustomElementName("appview"); |
| 834 blink::WebCustomElement::addEmbedderCustomElementName("appplugin"); |
| 835 blink::WebCustomElement::addEmbedderCustomElementName("browserplugin"); |
834 } | 836 } |
835 | 837 |
836 void Dispatcher::UpdateBindings(const std::string& extension_id) { | 838 void Dispatcher::UpdateBindings(const std::string& extension_id) { |
837 script_context_set().ForEach(extension_id, | 839 script_context_set().ForEach(extension_id, |
838 base::Bind(&Dispatcher::UpdateBindingsForContext, | 840 base::Bind(&Dispatcher::UpdateBindingsForContext, |
839 base::Unretained(this))); | 841 base::Unretained(this))); |
840 } | 842 } |
841 | 843 |
842 void Dispatcher::UpdateBindingsForContext(ScriptContext* context) { | 844 void Dispatcher::UpdateBindingsForContext(ScriptContext* context) { |
843 v8::HandleScope handle_scope(context->isolate()); | 845 v8::HandleScope handle_scope(context->isolate()); |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1225 return v8::Handle<v8::Object>(); | 1227 return v8::Handle<v8::Object>(); |
1226 | 1228 |
1227 if (bind_name) | 1229 if (bind_name) |
1228 *bind_name = split.back(); | 1230 *bind_name = split.back(); |
1229 | 1231 |
1230 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) | 1232 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) |
1231 : bind_object; | 1233 : bind_object; |
1232 } | 1234 } |
1233 | 1235 |
1234 } // namespace extensions | 1236 } // namespace extensions |
OLD | NEW |