OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 virtual base::TimeTicks GetNewTabStartTime() const = 0; | 303 virtual base::TimeTicks GetNewTabStartTime() const = 0; |
304 | 304 |
305 // Tells the tab to close now. The tab will take care not to close until it's | 305 // Tells the tab to close now. The tab will take care not to close until it's |
306 // out of nested message loops. | 306 // out of nested message loops. |
307 virtual void Close() = 0; | 307 virtual void Close() = 0; |
308 | 308 |
309 // Notification that tab closing has started. This can be called multiple | 309 // Notification that tab closing has started. This can be called multiple |
310 // times, subsequent calls are ignored. | 310 // times, subsequent calls are ignored. |
311 virtual void OnCloseStarted() = 0; | 311 virtual void OnCloseStarted() = 0; |
312 | 312 |
| 313 // Notification that tab closing was cancelled. This can happen when a user |
| 314 // cancels a window close via another tab's beforeunload dialog. |
| 315 virtual void OnCloseCanceled() = 0; |
| 316 |
| 317 // Set the time during close when unload is started. Normally, this is set |
| 318 // after the beforeunload dialog. However, for a window close, it is set |
| 319 // after all the beforeunload dialogs have finished. |
| 320 virtual void OnUnloadStarted() = 0; |
| 321 |
| 322 // Set the time during close when the tab is no longer visible. |
| 323 virtual void OnUnloadDetachedStarted() = 0; |
| 324 |
313 // Returns true if underlying WebContentsView should accept drag-n-drop. | 325 // Returns true if underlying WebContentsView should accept drag-n-drop. |
314 virtual bool ShouldAcceptDragAndDrop() const = 0; | 326 virtual bool ShouldAcceptDragAndDrop() const = 0; |
315 | 327 |
316 // A render view-originated drag has ended. Informs the render view host and | 328 // A render view-originated drag has ended. Informs the render view host and |
317 // WebContentsDelegate. | 329 // WebContentsDelegate. |
318 virtual void SystemDragEnded() = 0; | 330 virtual void SystemDragEnded() = 0; |
319 | 331 |
320 // Notification the user has made a gesture while focus was on the | 332 // Notification the user has made a gesture while focus was on the |
321 // page. This is used to avoid uninitiated user downloads (aka carpet | 333 // page. This is used to avoid uninitiated user downloads (aka carpet |
322 // bombing), see DownloadRequestLimiter for details. | 334 // bombing), see DownloadRequestLimiter for details. |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 // Focuses the location bar. | 391 // Focuses the location bar. |
380 virtual void SetFocusToLocationBar(bool select_all) = 0; | 392 virtual void SetFocusToLocationBar(bool select_all) = 0; |
381 | 393 |
382 // Does this have an opener associated with it? | 394 // Does this have an opener associated with it? |
383 virtual bool HasOpener() const = 0; | 395 virtual bool HasOpener() const = 0; |
384 }; | 396 }; |
385 | 397 |
386 } // namespace content | 398 } // namespace content |
387 | 399 |
388 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 400 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |