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

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: Now only calling BeforeUnload from the embedder 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 // Runs beforeunload handlers for this frame and updates |proceed| with the
90 // value returned by handlers. Returns false if the execution of
91 // BeforeUnload led to the destruction of the frame, true otherwise.
92 virtual bool dispatchBeforeUnloadEvent(bool* proceed) = 0;
dcheng 2016/05/03 06:51:59 Rather than using a bool out param, I'd suggest ju
clamy 2016/05/03 13:17:09 There is one case where we need to distinguish bet
93
89 // Returns a WebURLRequest corresponding to the load of the WebHistoryItem. 94 // Returns a WebURLRequest corresponding to the load of the WebHistoryItem.
90 virtual WebURLRequest requestFromHistoryItem(const WebHistoryItem&, WebCache Policy) const = 0; 95 virtual WebURLRequest requestFromHistoryItem(const WebHistoryItem&, WebCache Policy) const = 0;
91 96
92 // Returns a WebURLRequest corresponding to the reload of the current 97 // Returns a WebURLRequest corresponding to the reload of the current
93 // HistoryItem. 98 // HistoryItem.
94 virtual WebURLRequest requestForReload(WebFrameLoadType, 99 virtual WebURLRequest requestForReload(WebFrameLoadType,
95 const WebURL& overrideURL = WebURL()) const = 0; 100 const WebURL& overrideURL = WebURL()) const = 0;
96 101
97 // Load the given URL. For history navigations, a valid WebHistoryItem 102 // Load the given URL. For history navigations, a valid WebHistoryItem
98 // should be given, as well as a WebHistoryLoadType. 103 // 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. 333 // to call these on a WebLocalFrame.
329 bool isWebLocalFrame() const override = 0; 334 bool isWebLocalFrame() const override = 0;
330 WebLocalFrame* toWebLocalFrame() override = 0; 335 WebLocalFrame* toWebLocalFrame() override = 0;
331 bool isWebRemoteFrame() const override = 0; 336 bool isWebRemoteFrame() const override = 0;
332 WebRemoteFrame* toWebRemoteFrame() override = 0; 337 WebRemoteFrame* toWebRemoteFrame() override = 0;
333 }; 338 };
334 339
335 } // namespace blink 340 } // namespace blink
336 341
337 #endif // WebLocalFrame_h 342 #endif // WebLocalFrame_h
OLDNEW
« third_party/WebKit/public/web/WebFrame.h ('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