| 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 | 344 |
| 345 virtual base::TerminationStatus GetCrashedStatus() const = 0; | 345 virtual base::TerminationStatus GetCrashedStatus() const = 0; |
| 346 | 346 |
| 347 // Whether the tab is in the process of being destroyed. | 347 // Whether the tab is in the process of being destroyed. |
| 348 virtual bool IsBeingDestroyed() const = 0; | 348 virtual bool IsBeingDestroyed() const = 0; |
| 349 | 349 |
| 350 // Convenience method for notifying the delegate of a navigation state | 350 // Convenience method for notifying the delegate of a navigation state |
| 351 // change. | 351 // change. |
| 352 virtual void NotifyNavigationStateChanged(InvalidateTypes changed_flags) = 0; | 352 virtual void NotifyNavigationStateChanged(InvalidateTypes changed_flags) = 0; |
| 353 | 353 |
| 354 // Get the last time that the WebContents was made active (either when it was | 354 // Get/Set the last time that the WebContents was made active (either when it |
| 355 // created or shown with WasShown()). | 355 // was created or shown with WasShown()). |
| 356 virtual base::TimeTicks GetLastActiveTime() const = 0; | 356 virtual base::TimeTicks GetLastActiveTime() const = 0; |
| 357 virtual void SetLastActiveTime(base::TimeTicks last_active_time) = 0; |
| 357 | 358 |
| 358 // Invoked when the WebContents becomes shown/hidden. | 359 // Invoked when the WebContents becomes shown/hidden. |
| 359 virtual void WasShown() = 0; | 360 virtual void WasShown() = 0; |
| 360 virtual void WasHidden() = 0; | 361 virtual void WasHidden() = 0; |
| 361 | 362 |
| 362 // Returns true if the before unload and unload listeners need to be | 363 // Returns true if the before unload and unload listeners need to be |
| 363 // fired. The value of this changes over time. For example, if true and the | 364 // fired. The value of this changes over time. For example, if true and the |
| 364 // before unload listener is executed and allows the user to exit, then this | 365 // before unload listener is executed and allows the user to exit, then this |
| 365 // returns false. | 366 // returns false. |
| 366 virtual bool NeedToFireBeforeUnload() = 0; | 367 virtual bool NeedToFireBeforeUnload() = 0; |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 | 660 |
| 660 private: | 661 private: |
| 661 // This interface should only be implemented inside content. | 662 // This interface should only be implemented inside content. |
| 662 friend class WebContentsImpl; | 663 friend class WebContentsImpl; |
| 663 WebContents() {} | 664 WebContents() {} |
| 664 }; | 665 }; |
| 665 | 666 |
| 666 } // namespace content | 667 } // namespace content |
| 667 | 668 |
| 668 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 669 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |