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

Side by Side Diff: Source/web/WebFrameImpl.cpp

Issue 119493003: Remove a no-longer needed user gesture from WebFrameImpl::executeScriptAndReturnValue() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 836
837 bool WebFrameImpl::checkIfRunInsecureContent(const WebURL& url) const 837 bool WebFrameImpl::checkIfRunInsecureContent(const WebURL& url) const
838 { 838 {
839 ASSERT(frame()); 839 ASSERT(frame());
840 return frame()->loader().mixedContentChecker()->canRunInsecureContent(frame( )->document()->securityOrigin(), url); 840 return frame()->loader().mixedContentChecker()->canRunInsecureContent(frame( )->document()->securityOrigin(), url);
841 } 841 }
842 842
843 v8::Handle<v8::Value> WebFrameImpl::executeScriptAndReturnValue(const WebScriptS ource& source) 843 v8::Handle<v8::Value> WebFrameImpl::executeScriptAndReturnValue(const WebScriptS ource& source)
844 { 844 {
845 ASSERT(frame()); 845 ASSERT(frame());
846
847 // FIXME: This fake user gesture is required to make a bunch of pyauto
848 // tests pass. If this isn't needed in non-test situations, we should
849 // consider removing this code and changing the tests.
850 // http://code.google.com/p/chromium/issues/detail?id=86397
851 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture);
852
853 TextPosition position(OrdinalNumber::fromOneBasedInt(source.startLine), Ordi nalNumber::first()); 846 TextPosition position(OrdinalNumber::fromOneBasedInt(source.startLine), Ordi nalNumber::first());
854 return frame()->script().executeScriptInMainWorldAndReturnValue(ScriptSource Code(source.code, source.url, position)).v8Value(); 847 return frame()->script().executeScriptInMainWorldAndReturnValue(ScriptSource Code(source.code, source.url, position)).v8Value();
855 } 848 }
856 849
857 void WebFrameImpl::executeScriptInIsolatedWorld(int worldID, const WebScriptSour ce* sourcesIn, unsigned numSources, int extensionGroup, WebVector<v8::Local<v8:: Value> >* results) 850 void WebFrameImpl::executeScriptInIsolatedWorld(int worldID, const WebScriptSour ce* sourcesIn, unsigned numSources, int extensionGroup, WebVector<v8::Local<v8:: Value> >* results)
858 { 851 {
859 ASSERT(frame()); 852 ASSERT(frame());
860 RELEASE_ASSERT(worldID > 0); 853 RELEASE_ASSERT(worldID > 0);
861 RELEASE_ASSERT(worldID < EmbedderWorldIdLimit); 854 RELEASE_ASSERT(worldID < EmbedderWorldIdLimit);
862 855
(...skipping 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after
2514 2507
2515 // There is a possibility that the frame being detached was the only 2508 // There is a possibility that the frame being detached was the only
2516 // pending one. We need to make sure final replies can be sent. 2509 // pending one. We need to make sure final replies can be sent.
2517 flushCurrentScopingEffort(m_findRequestIdentifier); 2510 flushCurrentScopingEffort(m_findRequestIdentifier);
2518 2511
2519 cancelPendingScopingEffort(); 2512 cancelPendingScopingEffort();
2520 } 2513 }
2521 } 2514 }
2522 2515
2523 } // namespace blink 2516 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698