| 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 virtual base::TimeTicks GetNewTabStartTime() const = 0; | 364 virtual base::TimeTicks GetNewTabStartTime() const = 0; |
| 365 | 365 |
| 366 // Tells the tab to close now. The tab will take care not to close until it's | 366 // Tells the tab to close now. The tab will take care not to close until it's |
| 367 // out of nested message loops. | 367 // out of nested message loops. |
| 368 virtual void Close() = 0; | 368 virtual void Close() = 0; |
| 369 | 369 |
| 370 // Notification that tab closing has started. This can be called multiple | 370 // Notification that tab closing has started. This can be called multiple |
| 371 // times, subsequent calls are ignored. | 371 // times, subsequent calls are ignored. |
| 372 virtual void OnCloseStarted() = 0; | 372 virtual void OnCloseStarted() = 0; |
| 373 | 373 |
| 374 // Notification that tab closing was cancelled. This can happen when a user |
| 375 // cancels a window close via another tab's beforeunload dialog. |
| 376 virtual void OnCloseCanceled() = 0; |
| 377 |
| 378 // Set the time during close when unload is started. Normally, this is set |
| 379 // after the beforeunload dialog. However, for a window close, it is set |
| 380 // after all the beforeunload dialogs have finished. |
| 381 virtual void OnUnloadStarted() = 0; |
| 382 |
| 383 // Set the time during close when the tab is no longer visible. |
| 384 virtual void OnUnloadDetachedStarted() = 0; |
| 385 |
| 374 // A render view-originated drag has ended. Informs the render view host and | 386 // A render view-originated drag has ended. Informs the render view host and |
| 375 // WebContentsDelegate. | 387 // WebContentsDelegate. |
| 376 virtual void SystemDragEnded() = 0; | 388 virtual void SystemDragEnded() = 0; |
| 377 | 389 |
| 378 // Notification the user has made a gesture while focus was on the | 390 // Notification the user has made a gesture while focus was on the |
| 379 // page. This is used to avoid uninitiated user downloads (aka carpet | 391 // page. This is used to avoid uninitiated user downloads (aka carpet |
| 380 // bombing), see DownloadRequestLimiter for details. | 392 // bombing), see DownloadRequestLimiter for details. |
| 381 virtual void UserGestureDone() = 0; | 393 virtual void UserGestureDone() = 0; |
| 382 | 394 |
| 383 // Indicates if this tab was explicitly closed by the user (control-w, close | 395 // Indicates if this tab was explicitly closed by the user (control-w, close |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 | 462 |
| 451 private: | 463 private: |
| 452 // This interface should only be implemented inside content. | 464 // This interface should only be implemented inside content. |
| 453 friend class WebContentsImpl; | 465 friend class WebContentsImpl; |
| 454 WebContents() {} | 466 WebContents() {} |
| 455 }; | 467 }; |
| 456 | 468 |
| 457 } // namespace content | 469 } // namespace content |
| 458 | 470 |
| 459 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 471 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |