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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 375 | 375 |
| 376 // Convenience method for notifying the delegate of a navigation state | 376 // Convenience method for notifying the delegate of a navigation state |
| 377 // change. | 377 // change. |
| 378 virtual void NotifyNavigationStateChanged(InvalidateTypes changed_flags) = 0; | 378 virtual void NotifyNavigationStateChanged(InvalidateTypes changed_flags) = 0; |
| 379 | 379 |
| 380 // Get/Set the last time that the WebContents was made active (either when it | 380 // Get/Set the last time that the WebContents was made active (either when it |
| 381 // was created or shown with WasShown()). | 381 // was created or shown with WasShown()). |
| 382 virtual base::TimeTicks GetLastActiveTime() const = 0; | 382 virtual base::TimeTicks GetLastActiveTime() const = 0; |
| 383 virtual void SetLastActiveTime(base::TimeTicks last_active_time) = 0; | 383 virtual void SetLastActiveTime(base::TimeTicks last_active_time) = 0; |
| 384 | 384 |
| 385 // Invoked when the WebContents becomes shown/hidden. | 385 // Hides the RenderWidgetHostView if it is not being used for capture, and |
| 386 virtual void WasShown() = 0; | 386 // emits WebContentsObserver::WasHidden(). |
| 387 virtual void WasHidden() = 0; | 387 virtual void MarkBackgrounded() = 0; |
|
jam
2016/02/29 17:36:36
what's the other analogous method?
i.e. it seems
tapted
2016/02/29 22:42:32
Ah, that's the thing :). `MarkBackgrounded` actual
| |
| 388 | 388 |
| 389 // Returns true if the before unload and unload listeners need to be | 389 // Returns true if the before unload and unload listeners need to be |
| 390 // fired. The value of this changes over time. For example, if true and the | 390 // fired. The value of this changes over time. For example, if true and the |
| 391 // before unload listener is executed and allows the user to exit, then this | 391 // before unload listener is executed and allows the user to exit, then this |
| 392 // returns false. | 392 // returns false. |
| 393 virtual bool NeedToFireBeforeUnload() = 0; | 393 virtual bool NeedToFireBeforeUnload() = 0; |
| 394 | 394 |
| 395 // Runs the beforeunload handler for the main frame. See also ClosePage and | 395 // Runs the beforeunload handler for the main frame. See also ClosePage and |
| 396 // SwapOut in RenderViewHost, which run the unload handler. | 396 // SwapOut in RenderViewHost, which run the unload handler. |
| 397 // | 397 // |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 719 | 719 |
| 720 private: | 720 private: |
| 721 // This interface should only be implemented inside content. | 721 // This interface should only be implemented inside content. |
| 722 friend class WebContentsImpl; | 722 friend class WebContentsImpl; |
| 723 WebContents() {} | 723 WebContents() {} |
| 724 }; | 724 }; |
| 725 | 725 |
| 726 } // namespace content | 726 } // namespace content |
| 727 | 727 |
| 728 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 728 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |