Chromium Code Reviews| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 376 | 376 |
| 377 // Notification that tab closing was cancelled. This can happen when a user | 377 // Notification that tab closing was cancelled. This can happen when a user |
| 378 // cancels a window close via another tab's beforeunload dialog. | 378 // cancels a window close via another tab's beforeunload dialog. |
| 379 virtual void OnCloseCanceled() = 0; | 379 virtual void OnCloseCanceled() = 0; |
| 380 | 380 |
| 381 // Set the time during close when unload is started. Normally, this is set | 381 // Set the time during close when unload is started. Normally, this is set |
| 382 // after the beforeunload dialog. However, for a window close, it is set | 382 // after the beforeunload dialog. However, for a window close, it is set |
| 383 // after all the beforeunload dialogs have finished. | 383 // after all the beforeunload dialogs have finished. |
| 384 virtual void OnUnloadStarted() = 0; | 384 virtual void OnUnloadStarted() = 0; |
| 385 | 385 |
| 386 // Called just before making the tab invisible on close. | |
| 387 virtual void OnUnloadAboutToDetach() = 0; | |
| 388 | |
| 386 // Set the time during close when the tab is no longer visible. | 389 // Set the time during close when the tab is no longer visible. |
| 387 virtual void OnUnloadDetachedStarted() = 0; | 390 virtual void OnUnloadDetachedStarted() = 0; |
|
Avi (use Gerrit)
2013/06/18 15:04:13
:( :(
| |
| 388 | 391 |
| 389 // A render view-originated drag has ended. Informs the render view host and | 392 // A render view-originated drag has ended. Informs the render view host and |
| 390 // WebContentsDelegate. | 393 // WebContentsDelegate. |
| 391 virtual void SystemDragEnded() = 0; | 394 virtual void SystemDragEnded() = 0; |
| 392 | 395 |
| 393 // Notification the user has made a gesture while focus was on the | 396 // Notification the user has made a gesture while focus was on the |
| 394 // page. This is used to avoid uninitiated user downloads (aka carpet | 397 // page. This is used to avoid uninitiated user downloads (aka carpet |
| 395 // bombing), see DownloadRequestLimiter for details. | 398 // bombing), see DownloadRequestLimiter for details. |
| 396 virtual void UserGestureDone() = 0; | 399 virtual void UserGestureDone() = 0; |
| 397 | 400 |
| 398 // Indicates if this tab was explicitly closed by the user (control-w, close | 401 // Indicates if this tab was explicitly closed by the user (control-w, close |
| 399 // tab menu item...). This is false for actions that indirectly close the tab, | 402 // tab menu item...). This is false for actions that indirectly close the tab, |
| 400 // such as closing the window. The setter is maintained by TabStripModel, and | 403 // such as closing the window. The setter is maintained by TabStripModel, and |
| 401 // the getter only useful from within TAB_CLOSED notification | 404 // the getter only useful from within TAB_CLOSED notification |
| 402 virtual void SetClosedByUserGesture(bool value) = 0; | 405 virtual void SetClosedByUserGesture(bool value) = 0; |
| 403 virtual bool GetClosedByUserGesture() const = 0; | 406 virtual bool GetClosedByUserGesture() const = 0; |
| 404 | 407 |
| 408 // True if view is in the process of being detached from it's containing tab | |
| 409 // as part of tab closure. | |
| 410 virtual bool GetWebContentsDetachedToClose() const = 0; | |
| 411 | |
| 405 // Gets the zoom level for this tab. | 412 // Gets the zoom level for this tab. |
| 406 virtual double GetZoomLevel() const = 0; | 413 virtual double GetZoomLevel() const = 0; |
| 407 | 414 |
| 408 // Gets the zoom percent for this tab. | 415 // Gets the zoom percent for this tab. |
| 409 virtual int GetZoomPercent(bool* enable_increment, | 416 virtual int GetZoomPercent(bool* enable_increment, |
| 410 bool* enable_decrement) const = 0; | 417 bool* enable_decrement) const = 0; |
| 411 | 418 |
| 412 // Opens view-source tab for this contents. | 419 // Opens view-source tab for this contents. |
| 413 virtual void ViewSource() = 0; | 420 virtual void ViewSource() = 0; |
| 414 | 421 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 465 | 472 |
| 466 private: | 473 private: |
| 467 // This interface should only be implemented inside content. | 474 // This interface should only be implemented inside content. |
| 468 friend class WebContentsImpl; | 475 friend class WebContentsImpl; |
| 469 WebContents() {} | 476 WebContents() {} |
| 470 }; | 477 }; |
| 471 | 478 |
| 472 } // namespace content | 479 } // namespace content |
| 473 | 480 |
| 474 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 481 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |