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

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: Capitalize the prefix. Created 4 years 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 /* 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 TRACE_EVENT1("devtools.timeline", "EvaluateScript", "data", 100 TRACE_EVENT1("devtools.timeline", "EvaluateScript", "data",
101 InspectorEvaluateScriptEvent::data( 101 InspectorEvaluateScriptEvent::data(
102 frame(), source.url().getString(), source.startPosition())); 102 frame(), source.url().getString(), source.startPosition()));
103 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint( 103 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(
104 frame()->document(), "scriptFirstStatement", false); 104 frame()->document(), "scriptFirstStatement", false);
105 105
106 v8::Local<v8::Value> result; 106 v8::Local<v8::Value> result;
107 { 107 {
108 V8CacheOptions v8CacheOptions(V8CacheOptionsDefault); 108 V8CacheOptions v8CacheOptions(V8CacheOptionsDefault);
109 if (frame()->settings()) 109 if (frame()->settings())
110 v8CacheOptions = frame()->settings()->v8CacheOptions(); 110 v8CacheOptions = frame()->settings()->GetV8CacheOptions();
111 if (source.resource() && 111 if (source.resource() &&
112 !source.resource()->response().cacheStorageCacheName().isNull()) { 112 !source.resource()->response().cacheStorageCacheName().isNull()) {
113 switch (frame()->settings()->v8CacheStrategiesForCacheStorage()) { 113 switch (frame()->settings()->GetV8CacheStrategiesForCacheStorage()) {
114 case V8CacheStrategiesForCacheStorage::None: 114 case V8CacheStrategiesForCacheStorage::None:
115 v8CacheOptions = V8CacheOptionsNone; 115 v8CacheOptions = V8CacheOptionsNone;
116 break; 116 break;
117 case V8CacheStrategiesForCacheStorage::Normal: 117 case V8CacheStrategiesForCacheStorage::Normal:
118 v8CacheOptions = V8CacheOptionsCode; 118 v8CacheOptions = V8CacheOptionsCode;
119 break; 119 break;
120 case V8CacheStrategiesForCacheStorage::Default: 120 case V8CacheStrategiesForCacheStorage::Default:
121 case V8CacheStrategiesForCacheStorage::Aggressive: 121 case V8CacheStrategiesForCacheStorage::Aggressive:
122 v8CacheOptions = V8CacheOptionsAlways; 122 v8CacheOptions = V8CacheOptionsAlways;
123 break; 123 break;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 if (frame()->document() && frame()->document()->isViewSource()) { 286 if (frame()->document() && frame()->document()->isViewSource()) {
287 ASSERT(frame()->document()->getSecurityOrigin()->isUnique()); 287 ASSERT(frame()->document()->getSecurityOrigin()->isUnique());
288 return true; 288 return true;
289 } 289 }
290 290
291 FrameLoaderClient* client = frame()->loader().client(); 291 FrameLoaderClient* client = frame()->loader().client();
292 if (!client) 292 if (!client)
293 return false; 293 return false;
294 Settings* settings = frame()->settings(); 294 Settings* settings = frame()->settings();
295 const bool allowed = 295 const bool allowed =
296 client->allowScript(settings && settings->scriptEnabled()); 296 client->allowScript(settings && settings->GetScriptEnabled());
297 if (!allowed && reason == AboutToExecuteScript) 297 if (!allowed && reason == AboutToExecuteScript)
298 client->didNotAllowScript(); 298 client->didNotAllowScript();
299 return allowed; 299 return allowed;
300 } 300 }
301 301
302 bool ScriptController::executeScriptIfJavaScriptURL(const KURL& url, 302 bool ScriptController::executeScriptIfJavaScriptURL(const KURL& url,
303 Element* element) { 303 Element* element) {
304 if (!protocolIsJavaScript(url)) 304 if (!protocolIsJavaScript(url))
305 return false; 305 return false;
306 306
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 for (size_t i = 0; i < resultArray->Length(); ++i) { 435 for (size_t i = 0; i < resultArray->Length(); ++i) {
436 v8::Local<v8::Value> value; 436 v8::Local<v8::Value> value;
437 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) 437 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value))
438 return; 438 return;
439 results->push_back(value); 439 results->push_back(value);
440 } 440 }
441 } 441 }
442 } 442 }
443 443
444 } // namespace blink 444 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698