| OLD | NEW |
| 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/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 void RenderViewHostImpl::SyncRendererPrefs() { | 327 void RenderViewHostImpl::SyncRendererPrefs() { |
| 328 Send(new ViewMsg_SetRendererPrefs(GetRoutingID(), | 328 Send(new ViewMsg_SetRendererPrefs(GetRoutingID(), |
| 329 delegate_->GetRendererPrefs( | 329 delegate_->GetRendererPrefs( |
| 330 GetProcess()->GetBrowserContext()))); | 330 GetProcess()->GetBrowserContext()))); |
| 331 } | 331 } |
| 332 | 332 |
| 333 WebPreferences RenderViewHostImpl::ComputeWebkitPrefs(const GURL& url) { | 333 WebPreferences RenderViewHostImpl::ComputeWebkitPrefs(const GURL& url) { |
| 334 TRACE_EVENT0("browser", "RenderViewHostImpl::GetWebkitPrefs"); | 334 TRACE_EVENT0("browser", "RenderViewHostImpl::GetWebkitPrefs"); |
| 335 WebPreferences prefs; | 335 WebPreferences prefs; |
| 336 | 336 |
| 337 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 337 const base::CommandLine& command_line = |
| 338 *base::CommandLine::ForCurrentProcess(); |
| 338 | 339 |
| 339 prefs.javascript_enabled = | 340 prefs.javascript_enabled = |
| 340 !command_line.HasSwitch(switches::kDisableJavaScript); | 341 !command_line.HasSwitch(switches::kDisableJavaScript); |
| 341 prefs.web_security_enabled = | 342 prefs.web_security_enabled = |
| 342 !command_line.HasSwitch(switches::kDisableWebSecurity); | 343 !command_line.HasSwitch(switches::kDisableWebSecurity); |
| 343 prefs.plugins_enabled = | 344 prefs.plugins_enabled = |
| 344 !command_line.HasSwitch(switches::kDisablePlugins); | 345 !command_line.HasSwitch(switches::kDisablePlugins); |
| 345 prefs.java_enabled = | 346 prefs.java_enabled = |
| 346 !command_line.HasSwitch(switches::kDisableJava); | 347 !command_line.HasSwitch(switches::kDisableJava); |
| 347 | 348 |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 if (bindings_flags & BINDINGS_POLICY_WEB_UI && | 802 if (bindings_flags & BINDINGS_POLICY_WEB_UI && |
| 802 GetProcess()->HasConnection() && | 803 GetProcess()->HasConnection() && |
| 803 !ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( | 804 !ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( |
| 804 GetProcess()->GetID())) { | 805 GetProcess()->GetID())) { |
| 805 // This process has no bindings yet. Make sure it does not have more | 806 // This process has no bindings yet. Make sure it does not have more |
| 806 // than this single active view. | 807 // than this single active view. |
| 807 RenderProcessHostImpl* process = | 808 RenderProcessHostImpl* process = |
| 808 static_cast<RenderProcessHostImpl*>(GetProcess()); | 809 static_cast<RenderProcessHostImpl*>(GetProcess()); |
| 809 // --single-process only has one renderer. | 810 // --single-process only has one renderer. |
| 810 if (process->GetActiveViewCount() > 1 && | 811 if (process->GetActiveViewCount() > 1 && |
| 811 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) | 812 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 813 switches::kSingleProcess)) |
| 812 return; | 814 return; |
| 813 } | 815 } |
| 814 | 816 |
| 815 if (bindings_flags & BINDINGS_POLICY_WEB_UI) { | 817 if (bindings_flags & BINDINGS_POLICY_WEB_UI) { |
| 816 ChildProcessSecurityPolicyImpl::GetInstance()->GrantWebUIBindings( | 818 ChildProcessSecurityPolicyImpl::GetInstance()->GrantWebUIBindings( |
| 817 GetProcess()->GetID()); | 819 GetProcess()->GetID()); |
| 818 } | 820 } |
| 819 | 821 |
| 820 enabled_bindings_ |= bindings_flags; | 822 enabled_bindings_ |= bindings_flags; |
| 821 if (renderer_initialized_) | 823 if (renderer_initialized_) |
| (...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1598 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1600 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 1599 | 1601 |
| 1600 frame_tree->ResetForMainFrameSwap(); | 1602 frame_tree->ResetForMainFrameSwap(); |
| 1601 } | 1603 } |
| 1602 | 1604 |
| 1603 void RenderViewHostImpl::SelectWordAroundCaret() { | 1605 void RenderViewHostImpl::SelectWordAroundCaret() { |
| 1604 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1606 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
| 1605 } | 1607 } |
| 1606 | 1608 |
| 1607 } // namespace content | 1609 } // namespace content |
| OLD | NEW |