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

Side by Side Diff: extensions/browser/renderer_startup_helper.cc

Issue 890083002: [Extensions] Propagate activeTab hosts to extension background pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « extensions/browser/process_manager.cc ('k') | extensions/common/extension_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/renderer_startup_helper.h" 5 #include "extensions/browser/renderer_startup_helper.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "components/keyed_service/content/browser_context_dependency_manager.h" 8 #include "components/keyed_service/content/browser_context_dependency_manager.h"
9 #include "content/public/browser/notification_service.h" 9 #include "content/public/browser/notification_service.h"
10 #include "content/public/browser/notification_types.h" 10 #include "content/public/browser/notification_types.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 process->Send(new ExtensionMsg_SetScriptingWhitelist( 57 process->Send(new ExtensionMsg_SetScriptingWhitelist(
58 extensions::ExtensionsClient::Get()->GetScriptingWhitelist())); 58 extensions::ExtensionsClient::Get()->GetScriptingWhitelist()));
59 59
60 // Loaded extensions. 60 // Loaded extensions.
61 std::vector<ExtensionMsg_Loaded_Params> loaded_extensions; 61 std::vector<ExtensionMsg_Loaded_Params> loaded_extensions;
62 const ExtensionSet& extensions = 62 const ExtensionSet& extensions =
63 ExtensionRegistry::Get(browser_context_)->enabled_extensions(); 63 ExtensionRegistry::Get(browser_context_)->enabled_extensions();
64 for (ExtensionSet::const_iterator iter = extensions.begin(); 64 for (ExtensionSet::const_iterator iter = extensions.begin();
65 iter != extensions.end(); ++iter) { 65 iter != extensions.end(); ++iter) {
66 // Renderers don't need to know about themes. 66 // Renderers don't need to know about themes.
67 if (!(*iter)->is_theme()) 67 if (!(*iter)->is_theme()) {
68 loaded_extensions.push_back(ExtensionMsg_Loaded_Params(iter->get())); 68 // Don't need to include tab permissions for new tabs.
69 loaded_extensions.push_back(ExtensionMsg_Loaded_Params(
70 iter->get(), false /* no tab permissions */));
71 }
69 } 72 }
70 process->Send(new ExtensionMsg_Loaded(loaded_extensions)); 73 process->Send(new ExtensionMsg_Loaded(loaded_extensions));
71 break; 74 break;
72 } 75 }
73 default: 76 default:
74 NOTREACHED(); 77 NOTREACHED();
75 break; 78 break;
76 } 79 }
77 } 80 }
78 81
(...skipping 29 matching lines...) Expand all
108 BrowserContext* context) const { 111 BrowserContext* context) const {
109 // Redirected in incognito. 112 // Redirected in incognito.
110 return ExtensionsBrowserClient::Get()->GetOriginalContext(context); 113 return ExtensionsBrowserClient::Get()->GetOriginalContext(context);
111 } 114 }
112 115
113 bool RendererStartupHelperFactory::ServiceIsCreatedWithBrowserContext() const { 116 bool RendererStartupHelperFactory::ServiceIsCreatedWithBrowserContext() const {
114 return true; 117 return true;
115 } 118 }
116 119
117 } // namespace extensions 120 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/process_manager.cc ('k') | extensions/common/extension_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698