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

Side by Side Diff: third_party/WebKit/public/web/WebLocalFrame.h

Issue 1890493002: PlzNavigate: properly execute BeforeUnload on renderer initiated navigations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed dcheng's comments Created 4 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebLocalFrame_h 5 #ifndef WebLocalFrame_h
6 #define WebLocalFrame_h 6 #define WebLocalFrame_h
7 7
8 #include "WebFrame.h" 8 #include "WebFrame.h"
9 #include "WebFrameLoadType.h" 9 #include "WebFrameLoadType.h"
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // optionally wrapping around. 79 // optionally wrapping around.
80 virtual WebLocalFrame* traversePreviousLocal(bool wrap) const = 0; 80 virtual WebLocalFrame* traversePreviousLocal(bool wrap) const = 0;
81 virtual WebLocalFrame* traverseNextLocal(bool wrap) const = 0; 81 virtual WebLocalFrame* traverseNextLocal(bool wrap) const = 0;
82 82
83 // Navigation Ping -------------------------------------------------------- 83 // Navigation Ping --------------------------------------------------------
84 84
85 virtual void sendPings(const WebURL& destinationURL) = 0; 85 virtual void sendPings(const WebURL& destinationURL) = 0;
86 86
87 // Navigation ---------------------------------------------------------- 87 // Navigation ----------------------------------------------------------
88 88
89 enum class BeforeUnloadReturnValue {
90 Proceed,
91 DontProceed,
92 FrameDestroyed,
93 };
94
95 // Runs beforeunload handlers for this frame and updates |proceed| with the
96 // value returned by handlers. Returns false if the execution of
97 // BeforeUnload led to the destruction of the frame, true otherwise.
dcheng 2016/05/03 21:34:30 Also, this comment should be updated.
clamy 2016/05/04 13:50:15 Done.
98 virtual BeforeUnloadReturnValue dispatchBeforeUnloadEvent(bool isReload) = 0 ;
99
89 // Returns a WebURLRequest corresponding to the load of the WebHistoryItem. 100 // Returns a WebURLRequest corresponding to the load of the WebHistoryItem.
90 virtual WebURLRequest requestFromHistoryItem(const WebHistoryItem&, WebCache Policy) const = 0; 101 virtual WebURLRequest requestFromHistoryItem(const WebHistoryItem&, WebCache Policy) const = 0;
91 102
92 // Returns a WebURLRequest corresponding to the reload of the current 103 // Returns a WebURLRequest corresponding to the reload of the current
93 // HistoryItem. 104 // HistoryItem.
94 virtual WebURLRequest requestForReload(WebFrameLoadType, 105 virtual WebURLRequest requestForReload(WebFrameLoadType,
95 const WebURL& overrideURL = WebURL()) const = 0; 106 const WebURL& overrideURL = WebURL()) const = 0;
96 107
97 // Load the given URL. For history navigations, a valid WebHistoryItem 108 // Load the given URL. For history navigations, a valid WebHistoryItem
98 // should be given, as well as a WebHistoryLoadType. 109 // should be given, as well as a WebHistoryLoadType.
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 // to call these on a WebLocalFrame. 339 // to call these on a WebLocalFrame.
329 bool isWebLocalFrame() const override = 0; 340 bool isWebLocalFrame() const override = 0;
330 WebLocalFrame* toWebLocalFrame() override = 0; 341 WebLocalFrame* toWebLocalFrame() override = 0;
331 bool isWebRemoteFrame() const override = 0; 342 bool isWebRemoteFrame() const override = 0;
332 WebRemoteFrame* toWebRemoteFrame() override = 0; 343 WebRemoteFrame* toWebRemoteFrame() override = 0;
333 }; 344 };
334 345
335 } // namespace blink 346 } // namespace blink
336 347
337 #endif // WebLocalFrame_h 348 #endif // WebLocalFrame_h
OLDNEW
« content/renderer/render_frame_impl.cc ('K') | « third_party/WebKit/public/web/WebFrame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698