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

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: 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 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
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("webview");
803 blink::WebCustomElement::addEmbedderCustomElementName("appview"); 803 blink::WebCustomElement::addEmbedderCustomElementName("appview");
804 blink::WebCustomElement::addEmbedderCustomElementName("extensionoptions");
804 blink::WebCustomElement::addEmbedderCustomElementName("appplugin"); 805 blink::WebCustomElement::addEmbedderCustomElementName("appplugin");
805 blink::WebCustomElement::addEmbedderCustomElementName("browserplugin"); 806 blink::WebCustomElement::addEmbedderCustomElementName("browserplugin");
not at google - send to devlin 2014/07/08 15:43:39 fady why does "browserplugin" need to be in here?
Fady Samuel 2014/07/08 15:46:48 Good catch. That can be removed.
ericzeng 2014/07/08 18:10:48 Done.
807 blink::WebCustomElement::addEmbedderCustomElementName(
808 "extensionoptionsplugin");
not at google - send to devlin 2014/07/08 15:43:39 can we put this list in alphabetic order?
ericzeng 2014/07/08 18:10:48 Done.
806 } 809 }
807 810
808 void Dispatcher::UpdateBindings(const std::string& extension_id) { 811 void Dispatcher::UpdateBindings(const std::string& extension_id) {
809 script_context_set().ForEach(extension_id, 812 script_context_set().ForEach(extension_id,
810 base::Bind(&Dispatcher::UpdateBindingsForContext, 813 base::Bind(&Dispatcher::UpdateBindingsForContext,
811 base::Unretained(this))); 814 base::Unretained(this)));
812 } 815 }
813 816
814 void Dispatcher::UpdateBindingsForContext(ScriptContext* context) { 817 void Dispatcher::UpdateBindingsForContext(ScriptContext* context) {
815 v8::HandleScope handle_scope(context->isolate()); 818 v8::HandleScope handle_scope(context->isolate());
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 return v8::Handle<v8::Object>(); 1200 return v8::Handle<v8::Object>();
1198 1201
1199 if (bind_name) 1202 if (bind_name)
1200 *bind_name = split.back(); 1203 *bind_name = split.back();
1201 1204
1202 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) 1205 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context))
1203 : bind_object; 1206 : bind_object;
1204 } 1207 }
1205 1208
1206 } // namespace extensions 1209 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698