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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp

Issue 2589143003: Add 'get' prefix for Settings.in generated code. (Closed)
Patch Set: Only get prefix and no capitalization. Created 3 years, 11 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 | « no previous file | third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 void ScriptController::updateSecurityOrigin(SecurityOrigin* securityOrigin) { 93 void ScriptController::updateSecurityOrigin(SecurityOrigin* securityOrigin) {
94 m_windowProxyManager->updateSecurityOrigin(securityOrigin); 94 m_windowProxyManager->updateSecurityOrigin(securityOrigin);
95 } 95 }
96 96
97 namespace { 97 namespace {
98 98
99 V8CacheOptions cacheOptions(const ScriptResource* resource, 99 V8CacheOptions cacheOptions(const ScriptResource* resource,
100 const Settings* settings) { 100 const Settings* settings) {
101 V8CacheOptions v8CacheOptions(V8CacheOptionsDefault); 101 V8CacheOptions v8CacheOptions(V8CacheOptionsDefault);
102 if (settings) 102 if (settings)
103 v8CacheOptions = settings->v8CacheOptions(); 103 v8CacheOptions = settings->getV8CacheOptions();
104 if (resource && !resource->response().cacheStorageCacheName().isNull()) { 104 if (resource && !resource->response().cacheStorageCacheName().isNull()) {
105 switch (settings->v8CacheStrategiesForCacheStorage()) { 105 switch (settings->getV8CacheStrategiesForCacheStorage()) {
106 case V8CacheStrategiesForCacheStorage::None: 106 case V8CacheStrategiesForCacheStorage::None:
107 v8CacheOptions = V8CacheOptionsNone; 107 v8CacheOptions = V8CacheOptionsNone;
108 break; 108 break;
109 case V8CacheStrategiesForCacheStorage::Normal: 109 case V8CacheStrategiesForCacheStorage::Normal:
110 v8CacheOptions = V8CacheOptionsCode; 110 v8CacheOptions = V8CacheOptionsCode;
111 break; 111 break;
112 case V8CacheStrategiesForCacheStorage::Default: 112 case V8CacheStrategiesForCacheStorage::Default:
113 case V8CacheStrategiesForCacheStorage::Aggressive: 113 case V8CacheStrategiesForCacheStorage::Aggressive:
114 v8CacheOptions = V8CacheOptionsAlways; 114 v8CacheOptions = V8CacheOptionsAlways;
115 break; 115 break;
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 if (frame()->document() && frame()->document()->isViewSource()) { 341 if (frame()->document() && frame()->document()->isViewSource()) {
342 ASSERT(frame()->document()->getSecurityOrigin()->isUnique()); 342 ASSERT(frame()->document()->getSecurityOrigin()->isUnique());
343 return true; 343 return true;
344 } 344 }
345 345
346 FrameLoaderClient* client = frame()->loader().client(); 346 FrameLoaderClient* client = frame()->loader().client();
347 if (!client) 347 if (!client)
348 return false; 348 return false;
349 Settings* settings = frame()->settings(); 349 Settings* settings = frame()->settings();
350 const bool allowed = 350 const bool allowed =
351 client->allowScript(settings && settings->scriptEnabled()); 351 client->allowScript(settings && settings->getScriptEnabled());
352 if (!allowed && reason == AboutToExecuteScript) 352 if (!allowed && reason == AboutToExecuteScript)
353 client->didNotAllowScript(); 353 client->didNotAllowScript();
354 return allowed; 354 return allowed;
355 } 355 }
356 356
357 bool ScriptController::executeScriptIfJavaScriptURL(const KURL& url, 357 bool ScriptController::executeScriptIfJavaScriptURL(const KURL& url,
358 Element* element) { 358 Element* element) {
359 if (!protocolIsJavaScript(url)) 359 if (!protocolIsJavaScript(url))
360 return false; 360 return false;
361 361
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 for (size_t i = 0; i < resultArray->Length(); ++i) { 489 for (size_t i = 0; i < resultArray->Length(); ++i) {
490 v8::Local<v8::Value> value; 490 v8::Local<v8::Value> value;
491 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) 491 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value))
492 return; 492 return;
493 results->push_back(value); 493 results->push_back(value);
494 } 494 }
495 } 495 }
496 } 496 }
497 497
498 } // namespace blink 498 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698