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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 GetProcess()->GetBrowserContext()))); | 318 GetProcess()->GetBrowserContext()))); |
319 } | 319 } |
320 | 320 |
321 WebPreferences RenderViewHostImpl::ComputeWebkitPrefs(const GURL& url) { | 321 WebPreferences RenderViewHostImpl::ComputeWebkitPrefs(const GURL& url) { |
322 TRACE_EVENT0("browser", "RenderViewHostImpl::GetWebkitPrefs"); | 322 TRACE_EVENT0("browser", "RenderViewHostImpl::GetWebkitPrefs"); |
323 WebPreferences prefs; | 323 WebPreferences prefs; |
324 | 324 |
325 const base::CommandLine& command_line = | 325 const base::CommandLine& command_line = |
326 *base::CommandLine::ForCurrentProcess(); | 326 *base::CommandLine::ForCurrentProcess(); |
327 | 327 |
328 prefs.javascript_enabled = | |
329 !command_line.HasSwitch(switches::kDisableJavaScript); | |
330 prefs.web_security_enabled = | 328 prefs.web_security_enabled = |
331 !command_line.HasSwitch(switches::kDisableWebSecurity); | 329 !command_line.HasSwitch(switches::kDisableWebSecurity); |
332 prefs.plugins_enabled = | 330 prefs.plugins_enabled = |
333 !command_line.HasSwitch(switches::kDisablePlugins); | 331 !command_line.HasSwitch(switches::kDisablePlugins); |
334 prefs.java_enabled = | 332 prefs.java_enabled = |
335 !command_line.HasSwitch(switches::kDisableJava); | 333 !command_line.HasSwitch(switches::kDisableJava); |
336 | 334 |
337 prefs.remote_fonts_enabled = | 335 prefs.remote_fonts_enabled = |
338 !command_line.HasSwitch(switches::kDisableRemoteFonts); | 336 !command_line.HasSwitch(switches::kDisableRemoteFonts); |
339 prefs.xslt_enabled = | 337 prefs.xslt_enabled = |
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1487 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1485 FrameTree* frame_tree = delegate_->GetFrameTree(); |
1488 | 1486 |
1489 frame_tree->ResetForMainFrameSwap(); | 1487 frame_tree->ResetForMainFrameSwap(); |
1490 } | 1488 } |
1491 | 1489 |
1492 void RenderViewHostImpl::SelectWordAroundCaret() { | 1490 void RenderViewHostImpl::SelectWordAroundCaret() { |
1493 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1491 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
1494 } | 1492 } |
1495 | 1493 |
1496 } // namespace content | 1494 } // namespace content |
OLD | NEW |