| 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 <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 | 339 |
| 340 virtual base::TerminationStatus GetCrashedStatus() const = 0; | 340 virtual base::TerminationStatus GetCrashedStatus() const = 0; |
| 341 | 341 |
| 342 // Whether the tab is in the process of being destroyed. | 342 // Whether the tab is in the process of being destroyed. |
| 343 virtual bool IsBeingDestroyed() const = 0; | 343 virtual bool IsBeingDestroyed() const = 0; |
| 344 | 344 |
| 345 // Convenience method for notifying the delegate of a navigation state | 345 // Convenience method for notifying the delegate of a navigation state |
| 346 // change. | 346 // change. |
| 347 virtual void NotifyNavigationStateChanged(InvalidateTypes changed_flags) = 0; | 347 virtual void NotifyNavigationStateChanged(InvalidateTypes changed_flags) = 0; |
| 348 | 348 |
| 349 // Get the last time that the WebContents was made active (either when it was | 349 // Get the last time that the WebContent was made active (either when it was |
| 350 // created or shown with WasShown()). | 350 // created or shown with WasShown()). If the tab has been restored from a |
| 351 // previous session, this will return the last time it was made active in the |
| 352 // previous session. |
| 351 virtual base::TimeTicks GetLastActiveTime() const = 0; | 353 virtual base::TimeTicks GetLastActiveTime() const = 0; |
| 352 | 354 |
| 355 // Sets the last time that the WebContents was made active. This is used when |
| 356 // tabs are restored so that the initial time is persisted (instead of using |
| 357 // tab creation time). |
| 358 virtual void SetLastActiveTime(base::TimeTicks time) = 0; |
| 359 |
| 353 // Invoked when the WebContents becomes shown/hidden. | 360 // Invoked when the WebContents becomes shown/hidden. |
| 354 virtual void WasShown() = 0; | 361 virtual void WasShown() = 0; |
| 355 virtual void WasHidden() = 0; | 362 virtual void WasHidden() = 0; |
| 356 | 363 |
| 357 // Returns true if the before unload and unload listeners need to be | 364 // Returns true if the before unload and unload listeners need to be |
| 358 // fired. The value of this changes over time. For example, if true and the | 365 // fired. The value of this changes over time. For example, if true and the |
| 359 // before unload listener is executed and allows the user to exit, then this | 366 // before unload listener is executed and allows the user to exit, then this |
| 360 // returns false. | 367 // returns false. |
| 361 virtual bool NeedToFireBeforeUnload() = 0; | 368 virtual bool NeedToFireBeforeUnload() = 0; |
| 362 | 369 |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 | 661 |
| 655 private: | 662 private: |
| 656 // This interface should only be implemented inside content. | 663 // This interface should only be implemented inside content. |
| 657 friend class WebContentsImpl; | 664 friend class WebContentsImpl; |
| 658 WebContents() {} | 665 WebContents() {} |
| 659 }; | 666 }; |
| 660 | 667 |
| 661 } // namespace content | 668 } // namespace content |
| 662 | 669 |
| 663 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 670 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |