| 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 | |
| 386 // A render view-originated drag has ended. Informs the render view host and | 374 // A render view-originated drag has ended. Informs the render view host and |
| 387 // WebContentsDelegate. | 375 // WebContentsDelegate. |
| 388 virtual void SystemDragEnded() = 0; | 376 virtual void SystemDragEnded() = 0; |
| 389 | 377 |
| 390 // Notification the user has made a gesture while focus was on the | 378 // Notification the user has made a gesture while focus was on the |
| 391 // page. This is used to avoid uninitiated user downloads (aka carpet | 379 // page. This is used to avoid uninitiated user downloads (aka carpet |
| 392 // bombing), see DownloadRequestLimiter for details. | 380 // bombing), see DownloadRequestLimiter for details. |
| 393 virtual void UserGestureDone() = 0; | 381 virtual void UserGestureDone() = 0; |
| 394 | 382 |
| 395 // Indicates if this tab was explicitly closed by the user (control-w, close | 383 // 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... |
| 462 | 450 |
| 463 private: | 451 private: |
| 464 // This interface should only be implemented inside content. | 452 // This interface should only be implemented inside content. |
| 465 friend class WebContentsImpl; | 453 friend class WebContentsImpl; |
| 466 WebContents() {} | 454 WebContents() {} |
| 467 }; | 455 }; |
| 468 | 456 |
| 469 } // namespace content | 457 } // namespace content |
| 470 | 458 |
| 471 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 459 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |