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

Side by Side Diff: content/renderer/render_process_impl.cc

Issue 2566583002: Change allowed bindings to be per RenderFrame instead of per RenderView. (Closed)
Patch Set: rebase Created 3 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 | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_view_browsertest.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/render_process_impl.h" 5 #include "content/renderer/render_process_impl.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 11 matching lines...) Expand all
22 #include "base/debug/crash_logging.h" 22 #include "base/debug/crash_logging.h"
23 #include "base/feature_list.h" 23 #include "base/feature_list.h"
24 #include "base/sys_info.h" 24 #include "base/sys_info.h"
25 #include "base/task_scheduler/initialization_util.h" 25 #include "base/task_scheduler/initialization_util.h"
26 #include "base/task_scheduler/scheduler_worker_pool_params.h" 26 #include "base/task_scheduler/scheduler_worker_pool_params.h"
27 #include "base/task_scheduler/task_scheduler.h" 27 #include "base/task_scheduler/task_scheduler.h"
28 #include "base/task_scheduler/task_traits.h" 28 #include "base/task_scheduler/task_traits.h"
29 #include "base/threading/platform_thread.h" 29 #include "base/threading/platform_thread.h"
30 #include "base/time/time.h" 30 #include "base/time/time.h"
31 #include "content/child/site_isolation_stats_gatherer.h" 31 #include "content/child/site_isolation_stats_gatherer.h"
32 #include "content/public/common/bindings_policy.h"
32 #include "content/public/common/content_client.h" 33 #include "content/public/common/content_client.h"
33 #include "content/public/common/content_features.h" 34 #include "content/public/common/content_features.h"
34 #include "content/public/common/content_switches.h" 35 #include "content/public/common/content_switches.h"
35 #include "content/public/renderer/content_renderer_client.h" 36 #include "content/public/renderer/content_renderer_client.h"
36 #include "third_party/WebKit/public/web/WebFrame.h" 37 #include "third_party/WebKit/public/web/WebFrame.h"
37 #include "v8/include/v8.h" 38 #include "v8/include/v8.h"
38 39
39 #if defined(OS_WIN) 40 #if defined(OS_WIN)
40 #include "base/win/win_util.h" 41 #include "base/win/win_util.h"
41 #endif 42 #endif
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 *base::CommandLine::ForCurrentProcess(); 187 *base::CommandLine::ForCurrentProcess();
187 188
188 if (command_line.HasSwitch(switches::kJavaScriptFlags)) { 189 if (command_line.HasSwitch(switches::kJavaScriptFlags)) {
189 std::string flags( 190 std::string flags(
190 command_line.GetSwitchValueASCII(switches::kJavaScriptFlags)); 191 command_line.GetSwitchValueASCII(switches::kJavaScriptFlags));
191 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); 192 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size()));
192 } 193 }
193 194
194 SiteIsolationStatsGatherer::SetEnabled( 195 SiteIsolationStatsGatherer::SetEnabled(
195 GetContentClient()->renderer()->ShouldGatherSiteIsolationStats()); 196 GetContentClient()->renderer()->ShouldGatherSiteIsolationStats());
197
198 if (command_line.HasSwitch(switches::kDomAutomationController))
199 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION;
200 if (command_line.HasSwitch(switches::kStatsCollectionController))
201 enabled_bindings_ |= BINDINGS_POLICY_STATS_COLLECTION;
196 } 202 }
197 203
198 RenderProcessImpl::~RenderProcessImpl() { 204 RenderProcessImpl::~RenderProcessImpl() {
199 #ifndef NDEBUG 205 #ifndef NDEBUG
200 int count = blink::WebFrame::instanceCount(); 206 int count = blink::WebFrame::instanceCount();
201 if (count) 207 if (count)
202 DLOG(ERROR) << "WebFrame LEAKED " << count << " TIMES"; 208 DLOG(ERROR) << "WebFrame LEAKED " << count << " TIMES";
203 #endif 209 #endif
204 210
205 GetShutDownEvent()->Signal(); 211 GetShutDownEvent()->Signal();
(...skipping 19 matching lines...) Expand all
225 index_to_traits_callback = 231 index_to_traits_callback =
226 base::Bind(&DefaultRendererWorkerPoolIndexForTraits); 232 base::Bind(&DefaultRendererWorkerPoolIndexForTraits);
227 } 233 }
228 DCHECK(index_to_traits_callback); 234 DCHECK(index_to_traits_callback);
229 235
230 base::TaskScheduler::CreateAndSetDefaultTaskScheduler( 236 base::TaskScheduler::CreateAndSetDefaultTaskScheduler(
231 params_vector, index_to_traits_callback); 237 params_vector, index_to_traits_callback);
232 } 238 }
233 239
234 } // namespace content 240 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698