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

Side by Side Diff: extensions/renderer/dispatcher.cc

Issue 378783002: Initial implementation of the <extensionoptions> GuestView tag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add constants file Created 6 years, 5 months 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 // 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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 extension->url(), 792 extension->url(),
793 WebString::fromUTF8(schemes[j]), 793 WebString::fromUTF8(schemes[j]),
794 WebString::fromUTF8(iter->host()), 794 WebString::fromUTF8(iter->host()),
795 iter->match_subdomains()); 795 iter->match_subdomains());
796 } 796 }
797 } 797 }
798 } 798 }
799 } 799 }
800 800
801 void Dispatcher::EnableCustomElementWhiteList() { 801 void Dispatcher::EnableCustomElementWhiteList() {
802 blink::WebCustomElement::addEmbedderCustomElementName("webview"); 802 blink::WebCustomElement::addEmbedderCustomElementName("appplugin");
803 blink::WebCustomElement::addEmbedderCustomElementName("appview"); 803 blink::WebCustomElement::addEmbedderCustomElementName("appview");
804 blink::WebCustomElement::addEmbedderCustomElementName("appplugin"); 804 blink::WebCustomElement::addEmbedderCustomElementName("extensionoptions");
805 blink::WebCustomElement::addEmbedderCustomElementName("browserplugin"); 805 blink::WebCustomElement::addEmbedderCustomElementName(
806 "extensionoptionsplugin");
807 blink::WebCustomElement::addEmbedderCustomElementName("webview");
not at google - send to devlin 2014/07/08 19:17:26 fady out of curiosity what are the 'plugin' elemen
Fady Samuel 2014/07/08 19:23:57 Doh! I misspoke earlier. WebView has a browserplug
ericzeng 2014/07/08 19:35:26 So I should put that line back in? Perhaps we shou
806 } 808 }
807 809
808 void Dispatcher::UpdateBindings(const std::string& extension_id) { 810 void Dispatcher::UpdateBindings(const std::string& extension_id) {
809 script_context_set().ForEach(extension_id, 811 script_context_set().ForEach(extension_id,
810 base::Bind(&Dispatcher::UpdateBindingsForContext, 812 base::Bind(&Dispatcher::UpdateBindingsForContext,
811 base::Unretained(this))); 813 base::Unretained(this)));
812 } 814 }
813 815
814 void Dispatcher::UpdateBindingsForContext(ScriptContext* context) { 816 void Dispatcher::UpdateBindingsForContext(ScriptContext* context) {
815 v8::HandleScope handle_scope(context->isolate()); 817 v8::HandleScope handle_scope(context->isolate());
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 return v8::Handle<v8::Object>(); 1199 return v8::Handle<v8::Object>();
1198 1200
1199 if (bind_name) 1201 if (bind_name)
1200 *bind_name = split.back(); 1202 *bind_name = split.back();
1201 1203
1202 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) 1204 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context))
1203 : bind_object; 1205 : bind_object;
1204 } 1206 }
1205 1207
1206 } // namespace extensions 1208 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698