| 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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 prefs.main_frame_resizes_are_orientation_changes = | 466 prefs.main_frame_resizes_are_orientation_changes = |
| 467 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges); | 467 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges); |
| 468 | 468 |
| 469 prefs.deferred_image_decoding_enabled = | 469 prefs.deferred_image_decoding_enabled = |
| 470 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || | 470 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || |
| 471 content::IsImplSidePaintingEnabled(); | 471 content::IsImplSidePaintingEnabled(); |
| 472 | 472 |
| 473 prefs.spatial_navigation_enabled = command_line.HasSwitch( | 473 prefs.spatial_navigation_enabled = command_line.HasSwitch( |
| 474 switches::kEnableSpatialNavigation); | 474 switches::kEnableSpatialNavigation); |
| 475 | 475 |
| 476 if (command_line.HasSwitch(switches::kV8CacheOptions)) { |
| 477 const std::string v8_cache_options = |
| 478 command_line.GetSwitchValueASCII(switches::kV8CacheOptions); |
| 479 if (v8_cache_options == "parse") { |
| 480 prefs.v8_cache_options = V8_CACHE_OPTIONS_PARSE; |
| 481 } else if (v8_cache_options == "code") { |
| 482 prefs.v8_cache_options = V8_CACHE_OPTIONS_CODE; |
| 483 } else { |
| 484 prefs.v8_cache_options = V8_CACHE_OPTIONS_OFF; |
| 485 } |
| 486 } |
| 487 |
| 476 GetContentClient()->browser()->OverrideWebkitPrefs(this, url, &prefs); | 488 GetContentClient()->browser()->OverrideWebkitPrefs(this, url, &prefs); |
| 477 return prefs; | 489 return prefs; |
| 478 } | 490 } |
| 479 | 491 |
| 480 void RenderViewHostImpl::Navigate(const FrameMsg_Navigate_Params& params) { | 492 void RenderViewHostImpl::Navigate(const FrameMsg_Navigate_Params& params) { |
| 481 TRACE_EVENT0("renderer_host", "RenderViewHostImpl::Navigate"); | 493 TRACE_EVENT0("renderer_host", "RenderViewHostImpl::Navigate"); |
| 482 delegate_->GetFrameTree()->GetMainFrame()->Navigate(params); | 494 delegate_->GetFrameTree()->GetMainFrame()->Navigate(params); |
| 483 } | 495 } |
| 484 | 496 |
| 485 void RenderViewHostImpl::NavigateToURL(const GURL& url) { | 497 void RenderViewHostImpl::NavigateToURL(const GURL& url) { |
| (...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1580 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1592 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 1581 | 1593 |
| 1582 frame_tree->ResetForMainFrameSwap(); | 1594 frame_tree->ResetForMainFrameSwap(); |
| 1583 } | 1595 } |
| 1584 | 1596 |
| 1585 void RenderViewHostImpl::SelectWordAroundCaret() { | 1597 void RenderViewHostImpl::SelectWordAroundCaret() { |
| 1586 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1598 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
| 1587 } | 1599 } |
| 1588 | 1600 |
| 1589 } // namespace content | 1601 } // namespace content |
| OLD | NEW |