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

Side by Side Diff: content/browser/frame_host/render_frame_host_delegate.h

Issue 2384813002: Don't wait to close tabs waiting for JavaScript dialogs. (Closed)
Patch Set: now a bit on webcontents, no timer fiddling Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 struct TransitionLayerData; 49 struct TransitionLayerData;
50 50
51 // An interface implemented by an object interested in knowing about the state 51 // An interface implemented by an object interested in knowing about the state
52 // of the RenderFrameHost. 52 // of the RenderFrameHost.
53 class CONTENT_EXPORT RenderFrameHostDelegate { 53 class CONTENT_EXPORT RenderFrameHostDelegate {
54 public: 54 public:
55 // This is used to give the delegate a chance to filter IPC messages. 55 // This is used to give the delegate a chance to filter IPC messages.
56 virtual bool OnMessageReceived(RenderFrameHost* render_frame_host, 56 virtual bool OnMessageReceived(RenderFrameHost* render_frame_host,
57 const IPC::Message& message); 57 const IPC::Message& message);
58 58
59 // Allows the delegate to filter incoming associated inteface requests. 59 // Allows the delegate to filter incoming associated interface requests.
60 virtual void OnAssociatedInterfaceRequest( 60 virtual void OnAssociatedInterfaceRequest(
61 RenderFrameHost* render_frame_host, 61 RenderFrameHost* render_frame_host,
62 const std::string& interface_name, 62 const std::string& interface_name,
63 mojo::ScopedInterfaceEndpointHandle handle) {} 63 mojo::ScopedInterfaceEndpointHandle handle) {}
64 64
65 // Gets the last committed URL. See WebContents::GetLastCommittedURL for a 65 // Gets the last committed URL. See WebContents::GetLastCommittedURL for a
66 // description of the semantics. 66 // description of the semantics.
67 virtual const GURL& GetMainFrameLastCommittedURL() const; 67 virtual const GURL& GetMainFrameLastCommittedURL() const;
68 68
69 // A message was added to to the console. 69 // A message was added to to the console.
(...skipping 18 matching lines...) Expand all
88 const base::string16& message, 88 const base::string16& message,
89 const base::string16& default_prompt, 89 const base::string16& default_prompt,
90 const GURL& frame_url, 90 const GURL& frame_url,
91 JavaScriptMessageType type, 91 JavaScriptMessageType type,
92 IPC::Message* reply_msg) {} 92 IPC::Message* reply_msg) {}
93 93
94 virtual void RunBeforeUnloadConfirm(RenderFrameHost* render_frame_host, 94 virtual void RunBeforeUnloadConfirm(RenderFrameHost* render_frame_host,
95 bool is_reload, 95 bool is_reload,
96 IPC::Message* reply_msg) {} 96 IPC::Message* reply_msg) {}
97 97
98 virtual bool IsJavaScriptDialogShowing() const;
99
98 // Called when a file selection is to be done. 100 // Called when a file selection is to be done.
99 virtual void RunFileChooser(RenderFrameHost* render_frame_host, 101 virtual void RunFileChooser(RenderFrameHost* render_frame_host,
100 const FileChooserParams& params) {} 102 const FileChooserParams& params) {}
101 103
102 // Another page accessed the top-level initial empty document, which means it 104 // Another page accessed the top-level initial empty document, which means it
103 // is no longer safe to display a pending URL without risking a URL spoof. 105 // is no longer safe to display a pending URL without risking a URL spoof.
104 virtual void DidAccessInitialDocument() {} 106 virtual void DidAccessInitialDocument() {}
105 107
106 // The frame changed its window.name property. 108 // The frame changed its window.name property.
107 virtual void DidChangeName(RenderFrameHost* render_frame_host, 109 virtual void DidChangeName(RenderFrameHost* render_frame_host,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 virtual std::unique_ptr<WebUIImpl> CreateWebUIForRenderFrameHost( 211 virtual std::unique_ptr<WebUIImpl> CreateWebUIForRenderFrameHost(
210 const GURL& url); 212 const GURL& url);
211 213
212 protected: 214 protected:
213 virtual ~RenderFrameHostDelegate() {} 215 virtual ~RenderFrameHostDelegate() {}
214 }; 216 };
215 217
216 } // namespace content 218 } // namespace content
217 219
218 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ 220 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698