| 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/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/alias.h" | 9 #include "base/debug/alias.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 WebString::fromUTF8(schemes[j]), | 830 WebString::fromUTF8(schemes[j]), |
| 831 WebString::fromUTF8(i->host()), | 831 WebString::fromUTF8(i->host()), |
| 832 i->match_subdomains()); | 832 i->match_subdomains()); |
| 833 } | 833 } |
| 834 } | 834 } |
| 835 } | 835 } |
| 836 } | 836 } |
| 837 | 837 |
| 838 void Dispatcher::EnableCustomElementWhiteList() { | 838 void Dispatcher::EnableCustomElementWhiteList() { |
| 839 blink::WebCustomElement::addEmbedderCustomElementName("webview"); | 839 blink::WebCustomElement::addEmbedderCustomElementName("webview"); |
| 840 // TODO(fsamuel): Add <adview> to the whitelist once it has been converted | |
| 841 // into a custom element. | |
| 842 blink::WebCustomElement::addEmbedderCustomElementName("browser-plugin"); | 840 blink::WebCustomElement::addEmbedderCustomElementName("browser-plugin"); |
| 843 } | 841 } |
| 844 | 842 |
| 845 void Dispatcher::UpdateBindings(const std::string& extension_id) { | 843 void Dispatcher::UpdateBindings(const std::string& extension_id) { |
| 846 script_context_set().ForEach(extension_id, | 844 script_context_set().ForEach(extension_id, |
| 847 base::Bind(&Dispatcher::UpdateBindingsForContext, | 845 base::Bind(&Dispatcher::UpdateBindingsForContext, |
| 848 base::Unretained(this))); | 846 base::Unretained(this))); |
| 849 } | 847 } |
| 850 | 848 |
| 851 void Dispatcher::UpdateBindingsForContext(ScriptContext* context) { | 849 void Dispatcher::UpdateBindingsForContext(ScriptContext* context) { |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1234 return v8::Handle<v8::Object>(); | 1232 return v8::Handle<v8::Object>(); |
| 1235 | 1233 |
| 1236 if (bind_name) | 1234 if (bind_name) |
| 1237 *bind_name = split.back(); | 1235 *bind_name = split.back(); |
| 1238 | 1236 |
| 1239 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) | 1237 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) |
| 1240 : bind_object; | 1238 : bind_object; |
| 1241 } | 1239 } |
| 1242 | 1240 |
| 1243 } // namespace extensions | 1241 } // namespace extensions |
| OLD | NEW |