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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 431323003: Implement --v8-cache-options (instead of --enable-preparsed-js-caching) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixup after more rebase. Created 6 years, 4 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 (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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 prefs.main_frame_resizes_are_orientation_changes = 462 prefs.main_frame_resizes_are_orientation_changes =
463 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges); 463 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges);
464 464
465 prefs.deferred_image_decoding_enabled = 465 prefs.deferred_image_decoding_enabled =
466 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || 466 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) ||
467 content::IsImplSidePaintingEnabled(); 467 content::IsImplSidePaintingEnabled();
468 468
469 prefs.spatial_navigation_enabled = command_line.HasSwitch( 469 prefs.spatial_navigation_enabled = command_line.HasSwitch(
470 switches::kEnableSpatialNavigation); 470 switches::kEnableSpatialNavigation);
471 471
472 if (command_line.HasSwitch(switches::kV8CacheOptions)) {
473 const std::string v8_cache_options =
474 command_line.GetSwitchValueASCII(switches::kV8CacheOptions);
475 if (v8_cache_options == "parse") {
476 prefs.v8_cache_options = V8_CACHE_OPTIONS_PARSE;
477 } else if (v8_cache_options == "code") {
478 prefs.v8_cache_options = V8_CACHE_OPTIONS_CODE;
479 } else {
480 prefs.v8_cache_options = V8_CACHE_OPTIONS_OFF;
481 }
482 }
483
472 GetContentClient()->browser()->OverrideWebkitPrefs(this, url, &prefs); 484 GetContentClient()->browser()->OverrideWebkitPrefs(this, url, &prefs);
473 return prefs; 485 return prefs;
474 } 486 }
475 487
476 void RenderViewHostImpl::Navigate(const FrameMsg_Navigate_Params& params) { 488 void RenderViewHostImpl::Navigate(const FrameMsg_Navigate_Params& params) {
477 TRACE_EVENT0("renderer_host", "RenderViewHostImpl::Navigate"); 489 TRACE_EVENT0("renderer_host", "RenderViewHostImpl::Navigate");
478 delegate_->GetFrameTree()->GetMainFrame()->Navigate(params); 490 delegate_->GetFrameTree()->GetMainFrame()->Navigate(params);
479 } 491 }
480 492
481 void RenderViewHostImpl::NavigateToURL(const GURL& url) { 493 void RenderViewHostImpl::NavigateToURL(const GURL& url) {
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 FrameTree* frame_tree = delegate_->GetFrameTree(); 1567 FrameTree* frame_tree = delegate_->GetFrameTree();
1556 1568
1557 frame_tree->ResetForMainFrameSwap(); 1569 frame_tree->ResetForMainFrameSwap();
1558 } 1570 }
1559 1571
1560 void RenderViewHostImpl::SelectWordAroundCaret() { 1572 void RenderViewHostImpl::SelectWordAroundCaret() {
1561 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1573 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1562 } 1574 }
1563 1575
1564 } // namespace content 1576 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698