| Index: extensions/renderer/user_script_set_manager.cc
|
| diff --git a/extensions/renderer/user_script_set_manager.cc b/extensions/renderer/user_script_set_manager.cc
|
| index fee2f724977c988002cee1ef85597d9e8e2998f8..9d7c23f4d6d1a874b6eb0aa26221566291102581 100644
|
| --- a/extensions/renderer/user_script_set_manager.cc
|
| +++ b/extensions/renderer/user_script_set_manager.cc
|
| @@ -17,7 +17,9 @@
|
| namespace extensions {
|
|
|
| UserScriptSetManager::UserScriptSetManager(const ExtensionSet* extensions)
|
| - : static_scripts_(extensions), extensions_(extensions) {
|
| + : static_scripts_(extensions),
|
| + is_in_guest_render_process_(false),
|
| + extensions_(extensions) {
|
| content::RenderThread::Get()->AddObserver(this);
|
| }
|
|
|
| @@ -67,11 +69,13 @@ void UserScriptSetManager::GetAllInjections(
|
| blink::WebFrame* web_frame,
|
| int tab_id,
|
| UserScript::RunLocation run_location) {
|
| - static_scripts_.GetInjections(injections, web_frame, tab_id, run_location);
|
| + static_scripts_.GetInjections(injections, web_frame, tab_id, run_location,
|
| + is_in_guest_render_process_);
|
| for (UserScriptSetMap::iterator it = programmatic_scripts_.begin();
|
| it != programmatic_scripts_.end();
|
| ++it) {
|
| - it->second->GetInjections(injections, web_frame, tab_id, run_location);
|
| + it->second->GetInjections(injections, web_frame, tab_id, run_location,
|
| + is_in_guest_render_process_);
|
| }
|
| }
|
|
|
| @@ -95,7 +99,10 @@ UserScriptSet* UserScriptSetManager::GetProgrammaticScriptsByHostID(
|
| void UserScriptSetManager::OnUpdateUserScripts(
|
| base::SharedMemoryHandle shared_memory,
|
| const HostID& host_id,
|
| - const std::set<HostID>& changed_hosts) {
|
| + const std::set<HostID>& changed_hosts,
|
| + bool is_to_guest_render_process) {
|
| + is_in_guest_render_process_ = is_to_guest_render_process;
|
| +
|
| if (!base::SharedMemory::IsHandleValid(shared_memory)) {
|
| NOTREACHED() << "Bad scripts handle";
|
| return;
|
|
|