Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: content/public/browser/web_contents.h

Issue 2426733004: Bug fix: Use the last hidden time for purge + suspend (Closed)
Patch Set: (rebase) Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 395
396 // Convenience method for notifying the delegate of a navigation state 396 // Convenience method for notifying the delegate of a navigation state
397 // change. 397 // change.
398 virtual void NotifyNavigationStateChanged(InvalidateTypes changed_flags) = 0; 398 virtual void NotifyNavigationStateChanged(InvalidateTypes changed_flags) = 0;
399 399
400 // Get/Set the last time that the WebContents was made active (either when it 400 // Get/Set the last time that the WebContents was made active (either when it
401 // was created or shown with WasShown()). 401 // was created or shown with WasShown()).
402 virtual base::TimeTicks GetLastActiveTime() const = 0; 402 virtual base::TimeTicks GetLastActiveTime() const = 0;
403 virtual void SetLastActiveTime(base::TimeTicks last_active_time) = 0; 403 virtual void SetLastActiveTime(base::TimeTicks last_active_time) = 0;
404 404
405 // Get the last time that the WebContents was made hidden.
406 virtual base::TimeTicks GetLastHiddenTime() const = 0;
407
405 // Invoked when the WebContents becomes shown/hidden. 408 // Invoked when the WebContents becomes shown/hidden.
406 virtual void WasShown() = 0; 409 virtual void WasShown() = 0;
407 virtual void WasHidden() = 0; 410 virtual void WasHidden() = 0;
408 411
409 // Returns true if the before unload and unload listeners need to be 412 // Returns true if the before unload and unload listeners need to be
410 // fired. The value of this changes over time. For example, if true and the 413 // fired. The value of this changes over time. For example, if true and the
411 // before unload listener is executed and allows the user to exit, then this 414 // before unload listener is executed and allows the user to exit, then this
412 // returns false. 415 // returns false.
413 virtual bool NeedToFireBeforeUnload() = 0; 416 virtual bool NeedToFireBeforeUnload() = 0;
414 417
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 756
754 private: 757 private:
755 // This interface should only be implemented inside content. 758 // This interface should only be implemented inside content.
756 friend class WebContentsImpl; 759 friend class WebContentsImpl;
757 WebContents() {} 760 WebContents() {}
758 }; 761 };
759 762
760 } // namespace content 763 } // namespace content
761 764
762 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 765 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698