OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 this.reloadPage.apply(this, this._pendingReloadOptions); | 349 this.reloadPage.apply(this, this._pendingReloadOptions); |
350 } | 350 } |
351 | 351 |
352 /** | 352 /** |
353 * @param {boolean=} bypassCache | 353 * @param {boolean=} bypassCache |
354 * @param {string=} scriptToEvaluateOnLoad | 354 * @param {string=} scriptToEvaluateOnLoad |
355 */ | 355 */ |
356 reloadPage(bypassCache, scriptToEvaluateOnLoad) { | 356 reloadPage(bypassCache, scriptToEvaluateOnLoad) { |
357 // Only dispatch PageReloadRequested upon first reload request to simplify c
lient logic. | 357 // Only dispatch PageReloadRequested upon first reload request to simplify c
lient logic. |
358 if (!this._pendingReloadOptions) | 358 if (!this._pendingReloadOptions) |
359 this.dispatchEventToListeners(SDK.ResourceTreeModel.Events.PageReloadReque
sted); | 359 this.dispatchEventToListeners(SDK.ResourceTreeModel.Events.PageReloadReque
sted, this); |
360 if (this._reloadSuspensionCount) { | 360 if (this._reloadSuspensionCount) { |
361 this._pendingReloadOptions = [bypassCache, scriptToEvaluateOnLoad]; | 361 this._pendingReloadOptions = [bypassCache, scriptToEvaluateOnLoad]; |
362 return; | 362 return; |
363 } | 363 } |
364 this._pendingReloadOptions = null; | 364 this._pendingReloadOptions = null; |
365 this.dispatchEventToListeners(SDK.ResourceTreeModel.Events.WillReloadPage); | 365 this.dispatchEventToListeners(SDK.ResourceTreeModel.Events.WillReloadPage); |
366 this._agent.reload(bypassCache, scriptToEvaluateOnLoad); | 366 this._agent.reload(bypassCache, scriptToEvaluateOnLoad); |
367 } | 367 } |
368 | 368 |
369 /** | 369 /** |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
884 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event
s.InterstitialHidden); | 884 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event
s.InterstitialHidden); |
885 } | 885 } |
886 | 886 |
887 /** | 887 /** |
888 * @override | 888 * @override |
889 */ | 889 */ |
890 navigationRequested() { | 890 navigationRequested() { |
891 // Frontend is not interested in when navigations are requested. | 891 // Frontend is not interested in when navigations are requested. |
892 } | 892 } |
893 }; | 893 }; |
OLD | NEW |