| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 // change. | 332 // change. |
| 333 virtual void NotifyNavigationStateChanged(InvalidateTypes changed_flags) = 0; | 333 virtual void NotifyNavigationStateChanged(InvalidateTypes changed_flags) = 0; |
| 334 | 334 |
| 335 // Get the last time that the WebContents was made active (either when it was | 335 // Get the last time that the WebContents was made active (either when it was |
| 336 // created or shown with WasShown()). | 336 // created or shown with WasShown()). |
| 337 virtual base::TimeTicks GetLastActiveTime() const = 0; | 337 virtual base::TimeTicks GetLastActiveTime() const = 0; |
| 338 | 338 |
| 339 // Invoked when the WebContents becomes shown/hidden. | 339 // Invoked when the WebContents becomes shown/hidden. |
| 340 virtual void WasShown() = 0; | 340 virtual void WasShown() = 0; |
| 341 virtual void WasHidden() = 0; | 341 virtual void WasHidden() = 0; |
| 342 virtual void WasHidden(bool content_visible) = 0; |
| 342 | 343 |
| 343 // Returns true if the before unload and unload listeners need to be | 344 // Returns true if the before unload and unload listeners need to be |
| 344 // fired. The value of this changes over time. For example, if true and the | 345 // fired. The value of this changes over time. For example, if true and the |
| 345 // before unload listener is executed and allows the user to exit, then this | 346 // before unload listener is executed and allows the user to exit, then this |
| 346 // returns false. | 347 // returns false. |
| 347 virtual bool NeedToFireBeforeUnload() = 0; | 348 virtual bool NeedToFireBeforeUnload() = 0; |
| 348 | 349 |
| 349 // Runs the beforeunload handler for the main frame. See also ClosePage and | 350 // Runs the beforeunload handler for the main frame. See also ClosePage and |
| 350 // SwapOut in RenderViewHost, which run the unload handler. | 351 // SwapOut in RenderViewHost, which run the unload handler. |
| 351 // | 352 // |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 | 619 |
| 619 private: | 620 private: |
| 620 // This interface should only be implemented inside content. | 621 // This interface should only be implemented inside content. |
| 621 friend class WebContentsImpl; | 622 friend class WebContentsImpl; |
| 622 WebContents() {} | 623 WebContents() {} |
| 623 }; | 624 }; |
| 624 | 625 |
| 625 } // namespace content | 626 } // namespace content |
| 626 | 627 |
| 627 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 628 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |