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

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

Issue 32793003: Have Frame::navigationScheduler() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/ApplicationCacheHost.cpp ('k') | 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 2484 matching lines...) Expand 10 before | Expand all | Expand 10 after
2495 return; 2495 return;
2496 2496
2497 String script = decodeURLEscapeSequences(url.string().substring(strlen("java script:"))); 2497 String script = decodeURLEscapeSequences(url.string().substring(strlen("java script:")));
2498 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); 2498 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture);
2499 ScriptValue result = frame()->script()->executeScriptInMainWorldAndReturnVal ue(ScriptSourceCode(script)); 2499 ScriptValue result = frame()->script()->executeScriptInMainWorldAndReturnVal ue(ScriptSourceCode(script));
2500 2500
2501 String scriptResult; 2501 String scriptResult;
2502 if (!result.getString(scriptResult)) 2502 if (!result.getString(scriptResult))
2503 return; 2503 return;
2504 2504
2505 if (!frame()->navigationScheduler()->locationChangePending()) 2505 if (!frame()->navigationScheduler().locationChangePending())
2506 frame()->document()->loader()->replaceDocument(scriptResult, ownerDocume nt.get()); 2506 frame()->document()->loader()->replaceDocument(scriptResult, ownerDocume nt.get());
2507 } 2507 }
2508 2508
2509 void WebFrameImpl::willDetachPage() 2509 void WebFrameImpl::willDetachPage()
2510 { 2510 {
2511 if (!frame() || !frame()->page()) 2511 if (!frame() || !frame()->page())
2512 return; 2512 return;
2513 2513
2514 // Do not expect string scoping results from any frames that got detached 2514 // Do not expect string scoping results from any frames that got detached
2515 // in the middle of the operation. 2515 // in the middle of the operation.
2516 if (m_scopingInProgress) { 2516 if (m_scopingInProgress) {
2517 2517
2518 // There is a possibility that the frame being detached was the only 2518 // There is a possibility that the frame being detached was the only
2519 // pending one. We need to make sure final replies can be sent. 2519 // pending one. We need to make sure final replies can be sent.
2520 flushCurrentScopingEffort(m_findRequestIdentifier); 2520 flushCurrentScopingEffort(m_findRequestIdentifier);
2521 2521
2522 cancelPendingScopingEffort(); 2522 cancelPendingScopingEffort();
2523 } 2523 }
2524 } 2524 }
2525 2525
2526 } // namespace WebKit 2526 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/ApplicationCacheHost.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698