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

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

Issue 944763002: Make Page Visibility API work when the browser window is visible or not Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove the VisibilityNotify event handler Created 5 years, 9 months 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
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 <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 // change. 338 // change.
339 virtual void NotifyNavigationStateChanged(InvalidateTypes changed_flags) = 0; 339 virtual void NotifyNavigationStateChanged(InvalidateTypes changed_flags) = 0;
340 340
341 // Get the last time that the WebContents was made active (either when it was 341 // Get the last time that the WebContents was made active (either when it was
342 // created or shown with WasShown()). 342 // created or shown with WasShown()).
343 virtual base::TimeTicks GetLastActiveTime() const = 0; 343 virtual base::TimeTicks GetLastActiveTime() const = 0;
344 344
345 // Invoked when the WebContents becomes shown/hidden. 345 // Invoked when the WebContents becomes shown/hidden.
346 virtual void WasShown() = 0; 346 virtual void WasShown() = 0;
347 virtual void WasHidden() = 0; 347 virtual void WasHidden() = 0;
348 virtual void WasHidden(bool content_visible) = 0;
348 349
349 // Returns true if the before unload and unload listeners need to be 350 // Returns true if the before unload and unload listeners need to be
350 // fired. The value of this changes over time. For example, if true and the 351 // fired. The value of this changes over time. For example, if true and the
351 // before unload listener is executed and allows the user to exit, then this 352 // before unload listener is executed and allows the user to exit, then this
352 // returns false. 353 // returns false.
353 virtual bool NeedToFireBeforeUnload() = 0; 354 virtual bool NeedToFireBeforeUnload() = 0;
354 355
355 // Runs the beforeunload handler for the main frame. See also ClosePage and 356 // Runs the beforeunload handler for the main frame. See also ClosePage and
356 // SwapOut in RenderViewHost, which run the unload handler. 357 // SwapOut in RenderViewHost, which run the unload handler.
357 // 358 //
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 625
625 private: 626 private:
626 // This interface should only be implemented inside content. 627 // This interface should only be implemented inside content.
627 friend class WebContentsImpl; 628 friend class WebContentsImpl;
628 WebContents() {} 629 WebContents() {}
629 }; 630 };
630 631
631 } // namespace content 632 } // namespace content
632 633
633 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 634 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698