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

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

Issue 1312653003: Fix for WebView accessible resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments by lfg@. Created 5 years, 3 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/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"
11 #include "content/public/browser/render_process_host.h" 11 #include "content/public/browser/render_process_host.h"
12 #include "extensions/browser/extension_function_dispatcher.h" 12 #include "extensions/browser/extension_function_dispatcher.h"
13 #include "extensions/browser/extension_registry.h" 13 #include "extensions/browser/extension_registry.h"
14 #include "extensions/browser/extensions_browser_client.h" 14 #include "extensions/browser/extensions_browser_client.h"
15 #include "extensions/browser/guest_view/web_view/web_view_guest.h"
15 #include "extensions/common/extension_messages.h" 16 #include "extensions/common/extension_messages.h"
16 #include "extensions/common/extension_set.h" 17 #include "extensions/common/extension_set.h"
17 #include "extensions/common/extensions_client.h" 18 #include "extensions/common/extensions_client.h"
18 #include "ui/base/webui/web_ui_util.h" 19 #include "ui/base/webui/web_ui_util.h"
19 20
20 using content::BrowserContext; 21 using content::BrowserContext;
21 22
22 namespace extensions { 23 namespace extensions {
23 24
24 RendererStartupHelper::RendererStartupHelper(BrowserContext* browser_context) 25 RendererStartupHelper::RendererStartupHelper(BrowserContext* browser_context)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 if (!ext->is_theme()) { 66 if (!ext->is_theme()) {
66 // TODO(kalman): Only include tab specific permissions for extension 67 // TODO(kalman): Only include tab specific permissions for extension
67 // processes, no other process needs it, so it's mildly wasteful. 68 // processes, no other process needs it, so it's mildly wasteful.
68 // I am not sure this is possible to know this here, at such a low 69 // I am not sure this is possible to know this here, at such a low
69 // level of the stack. Perhaps site isolation can help. 70 // level of the stack. Perhaps site isolation can help.
70 bool include_tab_permissions = true; 71 bool include_tab_permissions = true;
71 loaded_extensions.push_back( 72 loaded_extensions.push_back(
72 ExtensionMsg_Loaded_Params(ext.get(), include_tab_permissions)); 73 ExtensionMsg_Loaded_Params(ext.get(), include_tab_permissions));
73 } 74 }
74 } 75 }
75 process->Send(new ExtensionMsg_Loaded(loaded_extensions)); 76 process->Send(new ExtensionMsg_Loaded(loaded_extensions,
77 WebViewGuest::GetPartitionID(process)));
76 } 78 }
77 79
78 ////////////////////////////////////////////////////////////////////////////// 80 //////////////////////////////////////////////////////////////////////////////
79 81
80 // static 82 // static
81 RendererStartupHelper* RendererStartupHelperFactory::GetForBrowserContext( 83 RendererStartupHelper* RendererStartupHelperFactory::GetForBrowserContext(
82 BrowserContext* context) { 84 BrowserContext* context) {
83 return static_cast<RendererStartupHelper*>( 85 return static_cast<RendererStartupHelper*>(
84 GetInstance()->GetServiceForBrowserContext(context, true)); 86 GetInstance()->GetServiceForBrowserContext(context, true));
85 } 87 }
(...skipping 21 matching lines...) Expand all
107 BrowserContext* context) const { 109 BrowserContext* context) const {
108 // Redirected in incognito. 110 // Redirected in incognito.
109 return ExtensionsBrowserClient::Get()->GetOriginalContext(context); 111 return ExtensionsBrowserClient::Get()->GetOriginalContext(context);
110 } 112 }
111 113
112 bool RendererStartupHelperFactory::ServiceIsCreatedWithBrowserContext() const { 114 bool RendererStartupHelperFactory::ServiceIsCreatedWithBrowserContext() const {
113 return true; 115 return true;
114 } 116 }
115 117
116 } // namespace extensions 118 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698