blob: e2fef31e43920d717a33446efd3ceee052abb3e1 [file] [log] [blame]
[email protected]0dd3a0ab2011-02-18 08:17:441// Copyright (c) 2011 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]674bc592011-12-20 23:00:425#ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
6#define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
[email protected]0dd3a0ab2011-02-18 08:17:447#pragma once
8
[email protected]1de2b8b2011-06-29 19:38:469#include <set>
[email protected]0dd3a0ab2011-02-18 08:17:4410#include <string>
[email protected]0dd3a0ab2011-02-18 08:17:4411
12#include "base/basictypes.h"
[email protected]d583e3f22011-12-27 21:38:1713#include "base/string16.h"
[email protected]8d128d62011-09-13 22:11:5714#include "content/common/content_export.h"
[email protected]e6e646d2011-12-01 00:50:1115#include "content/public/browser/navigation_type.h"
[email protected]2905f742011-10-13 03:51:5816#include "content/public/common/page_transition_types.h"
[email protected]0dd3a0ab2011-02-18 08:17:4417#include "ui/gfx/native_widget_types.h"
18#include "webkit/glue/window_open_disposition.h"
19
[email protected]7dba43dc2011-11-10 01:57:5820class FilePath;
21class GURL;
[email protected]32ded2212011-11-10 18:51:4322class TabContents;
23struct ContextMenuParams;
[email protected]7dba43dc2011-11-10 01:57:5824struct NativeWebKeyboardEvent;
[email protected]7dba43dc2011-11-10 01:57:5825
[email protected]32ded2212011-11-10 18:51:4326namespace base {
27class ListValue;
28}
29
[email protected]3ab9cb82011-06-03 18:02:0730namespace content {
[email protected]3d7474ff2011-07-27 17:47:3731class BrowserContext;
[email protected]e582fdd2011-12-20 16:48:1732class DownloadItem;
[email protected]3ab9cb82011-06-03 18:02:0733class JavaScriptDialogCreator;
[email protected]a81343d232011-12-27 07:39:2034class WebContents;
[email protected]0d9989d2011-12-21 20:26:0035class WebIntentsDispatcher;
[email protected]e582fdd2011-12-20 16:48:1736struct FileChooserParams;
[email protected]d583e3f22011-12-27 21:38:1737struct SSLStatus;
[email protected]3ab9cb82011-06-03 18:02:0738}
39
[email protected]0dd3a0ab2011-02-18 08:17:4440namespace gfx {
41class Point;
42class Rect;
43class Size;
44}
45
46namespace history {
47class HistoryAddPageArgs;
48}
49
[email protected]ce9751942011-09-21 01:57:2450namespace webkit_glue {
51struct WebIntentData;
52}
53
[email protected]674bc592011-12-20 23:00:4254namespace content {
55
[email protected]e5d549d2011-12-28 01:29:2056struct OpenURLParams;
57
[email protected]0dd3a0ab2011-02-18 08:17:4458// Objects implement this interface to get notified about changes in the
59// TabContents and to provide necessary functionality.
[email protected]674bc592011-12-20 23:00:4260class CONTENT_EXPORT WebContentsDelegate {
[email protected]0dd3a0ab2011-02-18 08:17:4461 public:
[email protected]674bc592011-12-20 23:00:4262 WebContentsDelegate();
[email protected]1de2b8b2011-06-29 19:38:4663
[email protected]e5d549d2011-12-28 01:29:2064 // Opens a new URL inside the passed in WebContents (if source is 0 open
[email protected]0dd3a0ab2011-02-18 08:17:4465 // in the current front-most tab), unless |disposition| indicates the url
66 // should be opened in a new tab or window.
67 //
68 // A NULL source indicates the current tab (callers should probably use
69 // OpenURL() for these cases which does it for you).
[email protected]00c37fc2011-08-02 00:22:5070
[email protected]e5d549d2011-12-28 01:29:2071 // Returns the WebContents the URL is opened in, or NULL if the URL wasn't
[email protected]992e4542011-07-20 23:09:2572 // opened immediately.
[email protected]e5d549d2011-12-28 01:29:2073 virtual WebContents* OpenURLFromTab(WebContents* source,
[email protected]00c37fc2011-08-02 00:22:5074 const OpenURLParams& params);
75
[email protected]0dd3a0ab2011-02-18 08:17:4476 // Called to inform the delegate that the tab content's navigation state
77 // changed. The |changed_flags| indicates the parts of the navigation state
78 // that have been updated, and is any combination of the
79 // |TabContents::InvalidateTypes| bits.
80 virtual void NavigationStateChanged(const TabContents* source,
[email protected]229eb7e2011-12-23 01:04:0881 unsigned changed_flags) {}
[email protected]0dd3a0ab2011-02-18 08:17:4482
[email protected]6c6b02d2011-09-02 03:36:4783 // Adds the navigation request headers to |headers|. Use
[email protected]0dd3a0ab2011-02-18 08:17:4484 // net::HttpUtil::AppendHeaderIfMissing to build the set of headers.
[email protected]229eb7e2011-12-23 01:04:0885 virtual void AddNavigationHeaders(const GURL& url, std::string* headers) {}
[email protected]0dd3a0ab2011-02-18 08:17:4486
87 // Creates a new tab with the already-created TabContents 'new_contents'.
88 // The window for the added contents should be reparented correctly when this
89 // method returns. If |disposition| is NEW_POPUP, |pos| should hold the
90 // initial position.
91 virtual void AddNewContents(TabContents* source,
92 TabContents* new_contents,
93 WindowOpenDisposition disposition,
94 const gfx::Rect& initial_pos,
[email protected]229eb7e2011-12-23 01:04:0895 bool user_gesture) {}
[email protected]0dd3a0ab2011-02-18 08:17:4496
97 // Selects the specified contents, bringing its container to the front.
[email protected]229eb7e2011-12-23 01:04:0898 virtual void ActivateContents(TabContents* contents) {}
[email protected]0dd3a0ab2011-02-18 08:17:4499
100 // Deactivates the specified contents by deactivating its container and
101 // potentialy moving it to the back of the Z order.
[email protected]229eb7e2011-12-23 01:04:08102 virtual void DeactivateContents(TabContents* contents) {}
[email protected]0dd3a0ab2011-02-18 08:17:44103
104 // Notifies the delegate that this contents is starting or is done loading
105 // some resource. The delegate should use this notification to represent
[email protected]f5d978c2011-07-21 14:43:51106 // loading feedback. See TabContents::IsLoading()
[email protected]229eb7e2011-12-23 01:04:08107 virtual void LoadingStateChanged(TabContents* source) {}
[email protected]0dd3a0ab2011-02-18 08:17:44108
109 // Notifies the delegate that the page has made some progress loading.
110 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully
111 // loaded).
112 // Note that to receive this notification, you must have called
113 // SetReportLoadProgressEnabled(true) in the render view.
[email protected]229eb7e2011-12-23 01:04:08114 virtual void LoadProgressChanged(double progress) {}
[email protected]0dd3a0ab2011-02-18 08:17:44115
116 // Request the delegate to close this tab contents, and do whatever cleanup
117 // it needs to do.
[email protected]a81343d232011-12-27 07:39:20118 virtual void CloseContents(WebContents* source) {}
[email protected]0dd3a0ab2011-02-18 08:17:44119
[email protected]cd9ed79d2011-11-15 19:22:57120 // Informs the delegate that the underlying RenderViewHost has been swapped
121 // out so it can perform any cleanup necessary.
[email protected]229eb7e2011-12-23 01:04:08122 virtual void SwappedOut(TabContents* source) {}
[email protected]cd9ed79d2011-11-15 19:22:57123
[email protected]0dd3a0ab2011-02-18 08:17:44124 // Request the delegate to move this tab contents to the specified position
125 // in screen coordinates.
[email protected]229eb7e2011-12-23 01:04:08126 virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {}
[email protected]0dd3a0ab2011-02-18 08:17:44127
128 // Causes the delegate to detach |source| and clean up any internal data
129 // pointing to it. After this call ownership of |source| passes to the
130 // caller, and it is safe to call "source->set_delegate(someone_else);".
[email protected]229eb7e2011-12-23 01:04:08131 virtual void DetachContents(TabContents* source) {}
[email protected]0dd3a0ab2011-02-18 08:17:44132
[email protected]b35b26b32011-05-05 20:35:14133 // Called to determine if the TabContents is contained in a popup window
134 // or a panel window.
135 virtual bool IsPopupOrPanel(const TabContents* source) const;
[email protected]0dd3a0ab2011-02-18 08:17:44136
[email protected]0dd3a0ab2011-02-18 08:17:44137 // Notification that the target URL has changed.
[email protected]229eb7e2011-12-23 01:04:08138 virtual void UpdateTargetURL(TabContents* source,
139 int32 page_id,
140 const GURL& url) {}
[email protected]0dd3a0ab2011-02-18 08:17:44141
142 // Notification that there was a mouse event, along with the absolute
143 // coordinates of the mouse pointer and whether it was a normal motion event
144 // (otherwise, the pointer left the contents area).
[email protected]229eb7e2011-12-23 01:04:08145 virtual void ContentsMouseEvent(TabContents* source,
146 const gfx::Point& location,
147 bool motion) {}
[email protected]0dd3a0ab2011-02-18 08:17:44148
149 // Request the delegate to change the zoom level of the current tab.
[email protected]229eb7e2011-12-23 01:04:08150 virtual void ContentsZoomChange(bool zoom_in) {}
[email protected]0dd3a0ab2011-02-18 08:17:44151
[email protected]0dd3a0ab2011-02-18 08:17:44152 // Check whether this contents is inside a window dedicated to running a web
153 // application.
154 virtual bool IsApplication() const;
155
156 // Detach the given tab and convert it to a "webapp" view. The tab must be
157 // a TabContents with a valid WebApp set.
[email protected]229eb7e2011-12-23 01:04:08158 virtual void ConvertContentsToApplication(TabContents* source) {}
[email protected]0dd3a0ab2011-02-18 08:17:44159
160 // Whether the specified tab can be reloaded.
161 // Reloading can be disabled e. g. for the DevTools window.
162 virtual bool CanReloadContents(TabContents* source) const;
163
[email protected]0dd3a0ab2011-02-18 08:17:44164 // Invoked prior to showing before unload handler confirmation dialog.
[email protected]229eb7e2011-12-23 01:04:08165 virtual void WillRunBeforeUnloadConfirm() {}
[email protected]0dd3a0ab2011-02-18 08:17:44166
167 // Returns true if javascript dialogs and unload alerts are suppressed.
168 // Default is false.
169 virtual bool ShouldSuppressDialogs();
170
171 // Tells us that we've finished firing this tab's beforeunload event.
172 // The proceed bool tells us whether the user chose to proceed closing the
173 // tab. Returns true if the tab can continue on firing it's unload event.
174 // If we're closing the entire browser, then we'll want to delay firing
175 // unload events until all the beforeunload events have fired.
176 virtual void BeforeUnloadFired(TabContents* tab,
177 bool proceed,
178 bool* proceed_to_fire_unload);
179
[email protected]0dd3a0ab2011-02-18 08:17:44180 // Sets focus to the location bar or some other place that is appropriate.
181 // This is called when the tab wants to encourage user input, like for the
182 // new tab page.
[email protected]229eb7e2011-12-23 01:04:08183 virtual void SetFocusToLocationBar(bool select_all) {}
[email protected]0dd3a0ab2011-02-18 08:17:44184
185 // Returns whether the page should be focused when transitioning from crashed
186 // to live. Default is true.
187 virtual bool ShouldFocusPageAfterCrash();
188
189 // Called when a popup select is about to be displayed. The delegate can use
190 // this to disable inactive rendering for the frame in the window the select
191 // is opened within if necessary.
[email protected]229eb7e2011-12-23 01:04:08192 virtual void RenderWidgetShowing() {}
[email protected]0dd3a0ab2011-02-18 08:17:44193
194 // This is called when WebKit tells us that it is done tabbing through
[email protected]674bc592011-12-20 23:00:42195 // controls on the page. Provides a way for WebContentsDelegates to handle
[email protected]0dd3a0ab2011-02-18 08:17:44196 // this. Returns true if the delegate successfully handled it.
197 virtual bool TakeFocus(bool reverse);
198
199 // Invoked when the page loses mouse capture.
[email protected]229eb7e2011-12-23 01:04:08200 virtual void LostCapture() {}
[email protected]0dd3a0ab2011-02-18 08:17:44201
[email protected]0dd3a0ab2011-02-18 08:17:44202 // Notification that |tab_contents| has gained focus.
[email protected]229eb7e2011-12-23 01:04:08203 virtual void TabContentsFocused(TabContents* tab_content) {}
[email protected]0dd3a0ab2011-02-18 08:17:44204
[email protected]686493142011-07-15 21:47:22205 // Asks the delegate if the given tab can download.
206 virtual bool CanDownload(TabContents* source, int request_id);
207
208 // Notifies the delegate that a download is starting.
[email protected]229eb7e2011-12-23 01:04:08209 virtual void OnStartDownload(TabContents* source, DownloadItem* download) {}
[email protected]686493142011-07-15 21:47:22210
[email protected]0dd3a0ab2011-02-18 08:17:44211 // Return much extra vertical space should be allotted to the
212 // render view widget during various animations (e.g. infobar closing).
213 // This is used to make painting look smoother.
214 virtual int GetExtraRenderViewHeight() const;
215
[email protected]0dd3a0ab2011-02-18 08:17:44216 // Returns true if the context menu operation was handled by the delegate.
217 virtual bool HandleContextMenu(const ContextMenuParams& params);
218
219 // Returns true if the context menu command was handled
220 virtual bool ExecuteContextMenuCommand(int command);
221
222 // Shows the page info using the specified information.
223 // |url| is the url of the page/frame the info applies to, |ssl| is the SSL
224 // information for that page/frame. If |show_history| is true, a section
225 // showing how many times that URL has been visited is added to the page info.
[email protected]36fc0392011-12-25 03:59:51226 virtual void ShowPageInfo(content::BrowserContext* browser_context,
[email protected]0dd3a0ab2011-02-18 08:17:44227 const GURL& url,
[email protected]d583e3f22011-12-27 21:38:17228 const SSLStatus& ssl,
[email protected]229eb7e2011-12-23 01:04:08229 bool show_history) {}
[email protected]0dd3a0ab2011-02-18 08:17:44230
231 // Opens source view for given tab contents that is navigated to the given
232 // page url.
233 virtual void ViewSourceForTab(TabContents* source, const GURL& page_url);
234
[email protected]932b7a12011-03-09 12:50:27235 // Opens source view for the given subframe.
236 virtual void ViewSourceForFrame(TabContents* source,
237 const GURL& url,
238 const std::string& content_state);
239
[email protected]0dd3a0ab2011-02-18 08:17:44240 // Allows delegates to handle keyboard events before sending to the renderer.
241 // Returns true if the |event| was handled. Otherwise, if the |event| would be
242 // handled in HandleKeyboardEvent() method as a normal keyboard shortcut,
243 // |*is_keyboard_shortcut| should be set to true.
244 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
245 bool* is_keyboard_shortcut);
246
247 // Allows delegates to handle unhandled keyboard messages coming back from
248 // the renderer.
[email protected]229eb7e2011-12-23 01:04:08249 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {}
[email protected]0dd3a0ab2011-02-18 08:17:44250
[email protected]229eb7e2011-12-23 01:04:08251 virtual void HandleMouseDown() {}
252 virtual void HandleMouseUp() {}
253 virtual void HandleMouseActivate() {}
[email protected]0dd3a0ab2011-02-18 08:17:44254
255 // Render view drag n drop ended.
[email protected]229eb7e2011-12-23 01:04:08256 virtual void DragEnded() {}
[email protected]0dd3a0ab2011-02-18 08:17:44257
258 // Shows the repost form confirmation dialog box.
[email protected]229eb7e2011-12-23 01:04:08259 virtual void ShowRepostFormWarningDialog(TabContents* tab_contents) {}
[email protected]0dd3a0ab2011-02-18 08:17:44260
[email protected]0dd3a0ab2011-02-18 08:17:44261 // Allows delegate to override navigation to the history entries.
262 // Returns true to allow TabContents to continue with the default processing.
263 virtual bool OnGoToEntryOffset(int offset);
264
265 // Returns whether this tab contents should add the specified navigation to
266 // history.
267 virtual bool ShouldAddNavigationToHistory(
268 const history::HistoryAddPageArgs& add_page_args,
[email protected]229eb7e2011-12-23 01:04:08269 NavigationType navigation_type);
[email protected]0dd3a0ab2011-02-18 08:17:44270
[email protected]0dd3a0ab2011-02-18 08:17:44271 // Returns the native window framing the view containing the tab contents.
272 virtual gfx::NativeWindow GetFrameNativeWindow();
273
274 // Notifies the delegate about the creation of a new TabContents. This
275 // typically happens when popups are created.
[email protected]229eb7e2011-12-23 01:04:08276 virtual void TabContentsCreated(TabContents* new_contents) {}
[email protected]0dd3a0ab2011-02-18 08:17:44277
[email protected]0dd3a0ab2011-02-18 08:17:44278 // Notifies the delegate that the content restrictions for this tab has
279 // changed.
[email protected]229eb7e2011-12-23 01:04:08280 virtual void ContentRestrictionsChanged(TabContents* source) {}
[email protected]0dd3a0ab2011-02-18 08:17:44281
[email protected]55452902011-06-01 21:57:47282 // Notification that the tab is hung.
[email protected]229eb7e2011-12-23 01:04:08283 virtual void RendererUnresponsive(TabContents* source) {}
[email protected]55452902011-06-01 21:57:47284
285 // Notification that the tab is no longer hung.
[email protected]229eb7e2011-12-23 01:04:08286 virtual void RendererResponsive(TabContents* source) {}
[email protected]0dd3a0ab2011-02-18 08:17:44287
288 // Notification that a worker associated with this tab has crashed.
[email protected]229eb7e2011-12-23 01:04:08289 virtual void WorkerCrashed(TabContents* source) {}
[email protected]0dd3a0ab2011-02-18 08:17:44290
[email protected]09b29342011-06-24 19:18:48291 // Invoked when a main fram navigation occurs.
[email protected]229eb7e2011-12-23 01:04:08292 virtual void DidNavigateMainFramePostCommit(TabContents* tab) {}
[email protected]93f230e02011-06-01 14:40:00293
[email protected]09b29342011-06-24 19:18:48294 // Invoked when navigating to a pending entry. When invoked the
295 // NavigationController has configured its pending entry, but it has not yet
296 // been committed.
[email protected]229eb7e2011-12-23 01:04:08297 virtual void DidNavigateToPendingEntry(TabContents* tab) {}
[email protected]93f230e02011-06-01 14:40:00298
[email protected]3ab9cb82011-06-03 18:02:07299 // Returns a pointer to a service to create JavaScript dialogs. The default
300 // pointer returned is to a stub service that marks all dialogs as suppressed
301 // and displays nothing.
[email protected]229eb7e2011-12-23 01:04:08302 virtual JavaScriptDialogCreator* GetJavaScriptDialogCreator();
[email protected]3ab9cb82011-06-03 18:02:07303
[email protected]3a29a6e2011-08-24 18:26:21304 // Called when a file selection is to be done.
305 virtual void RunFileChooser(TabContents* tab,
[email protected]229eb7e2011-12-23 01:04:08306 const FileChooserParams& params) {}
[email protected]3a29a6e2011-08-24 18:26:21307
308 // Request to enumerate a directory. This is equivalent to running the file
309 // chooser in directory-enumeration mode and having the user select the given
310 // directory.
[email protected]229eb7e2011-12-23 01:04:08311 virtual void EnumerateDirectory(TabContents* tab,
312 int request_id,
313 const FilePath& path) {}
[email protected]3a29a6e2011-08-24 18:26:21314
[email protected]8a5e0ca2011-08-25 06:30:47315 // Called when the renderer puts a tab into or out of fullscreen mode.
316 virtual void ToggleFullscreenModeForTab(TabContents* tab,
[email protected]229eb7e2011-12-23 01:04:08317 bool enter_fullscreen) {}
[email protected]5d5f7af2011-10-01 01:38:12318 virtual bool IsFullscreenForTab(const TabContents* tab) const;
[email protected]8a5e0ca2011-08-25 06:30:47319
[email protected]7d189022011-08-25 22:54:20320 // Called when a Javascript out of memory notification is received.
[email protected]229eb7e2011-12-23 01:04:08321 virtual void JSOutOfMemory(TabContents* tab) {}
[email protected]7d189022011-08-25 22:54:20322
323 // Register a new handler for URL requests with the given scheme.
324 virtual void RegisterProtocolHandler(TabContents* tab,
325 const std::string& protocol,
326 const GURL& url,
[email protected]229eb7e2011-12-23 01:04:08327 const string16& title) {}
[email protected]7d189022011-08-25 22:54:20328
329 // Register a new handler for Intents with the given action and type filter.
330 virtual void RegisterIntentHandler(TabContents* tab,
331 const string16& action,
332 const string16& type,
333 const string16& href,
[email protected]63c239322011-10-31 23:56:30334 const string16& title,
[email protected]229eb7e2011-12-23 01:04:08335 const string16& disposition) {}
[email protected]7d189022011-08-25 22:54:20336
[email protected]0d9989d2011-12-21 20:26:00337 // Web Intents notification handler. Takes ownership of the
338 // |intents_dispatcher|.
[email protected]229eb7e2011-12-23 01:04:08339 virtual void WebIntentDispatch(TabContents* tab,
340 WebIntentsDispatcher* intents_dispatcher);
[email protected]7d189022011-08-25 22:54:20341
[email protected]b888919c2011-09-02 00:32:16342 // Result of string search in the page. This includes the number of matches
343 // found and the selection rect (in screen coordinates) for the string found.
344 // If |final_update| is false, it indicates that more results follow.
345 virtual void FindReply(TabContents* tab,
346 int request_id,
347 int number_of_matches,
348 const gfx::Rect& selection_rect,
349 int active_match_ordinal,
[email protected]229eb7e2011-12-23 01:04:08350 bool final_update) {}
[email protected]b888919c2011-09-02 00:32:16351
[email protected]d952a052011-09-06 18:42:45352 // Notification that a plugin has crashed.
[email protected]229eb7e2011-12-23 01:04:08353 virtual void CrashedPlugin(TabContents* tab, const FilePath& plugin_path) {}
[email protected]d952a052011-09-06 18:42:45354
[email protected]0548c5352011-09-07 00:33:33355 // Invoked when the preferred size of the contents has been changed.
[email protected]32ded2212011-11-10 18:51:43356 virtual void UpdatePreferredSize(TabContents* tab,
[email protected]229eb7e2011-12-23 01:04:08357 const gfx::Size& pref_size) {}
[email protected]0548c5352011-09-07 00:33:33358
[email protected]32ded2212011-11-10 18:51:43359 // Notification message from HTML UI.
360 virtual void WebUISend(TabContents* tab,
361 const GURL& source_url,
362 const std::string& name,
[email protected]229eb7e2011-12-23 01:04:08363 const base::ListValue& args) {}
[email protected]32ded2212011-11-10 18:51:43364
[email protected]e9621112011-10-17 05:38:37365 // Requests to lock the mouse. Once the request is approved or rejected,
366 // GotResponseToLockMouseRequest() will be called on the requesting tab
367 // contents.
[email protected]229eb7e2011-12-23 01:04:08368 virtual void RequestToLockMouse(TabContents* tab) {}
[email protected]e9621112011-10-17 05:38:37369
370 // Notification that the page has lost the mouse lock.
[email protected]229eb7e2011-12-23 01:04:08371 virtual void LostMouseLock() {}
[email protected]e9621112011-10-17 05:38:37372
[email protected]0dd3a0ab2011-02-18 08:17:44373 protected:
[email protected]674bc592011-12-20 23:00:42374 virtual ~WebContentsDelegate();
[email protected]1de2b8b2011-06-29 19:38:46375
376 private:
[email protected]674bc592011-12-20 23:00:42377 friend class ::TabContents;
[email protected]1de2b8b2011-06-29 19:38:46378
[email protected]674bc592011-12-20 23:00:42379 // Called when |this| becomes the WebContentsDelegate for |source|.
[email protected]1de2b8b2011-06-29 19:38:46380 void Attach(TabContents* source);
381
[email protected]674bc592011-12-20 23:00:42382 // Called when |this| is no longer the WebContentsDelegate for |source|.
[email protected]1de2b8b2011-06-29 19:38:46383 void Detach(TabContents* source);
384
385 // The TabContents that this is currently a delegate for.
386 std::set<TabContents*> attached_contents_;
[email protected]0dd3a0ab2011-02-18 08:17:44387};
388
[email protected]674bc592011-12-20 23:00:42389} // namespace content
390
391#endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_