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

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

Issue 2931023002: [TooManyTabs] Add TabNavigationThrottle (Closed)
Patch Set: add comments Created 3 years, 5 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
« 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 <memory> 10 #include <memory>
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 virtual base::TimeTicks GetLastActiveTime() const = 0; 435 virtual base::TimeTicks GetLastActiveTime() const = 0;
436 virtual void SetLastActiveTime(base::TimeTicks last_active_time) = 0; 436 virtual void SetLastActiveTime(base::TimeTicks last_active_time) = 0;
437 437
438 // Get the last time that the WebContents was made hidden. 438 // Get the last time that the WebContents was made hidden.
439 virtual base::TimeTicks GetLastHiddenTime() const = 0; 439 virtual base::TimeTicks GetLastHiddenTime() const = 0;
440 440
441 // Invoked when the WebContents becomes shown/hidden. 441 // Invoked when the WebContents becomes shown/hidden.
442 virtual void WasShown() = 0; 442 virtual void WasShown() = 0;
443 virtual void WasHidden() = 0; 443 virtual void WasHidden() = 0;
444 444
445 // Whether the WebContents is visible. This can return true even if the page
446 // is still loading, as opposed to RenderWidgetHostView::IsShowing(), which
447 // always returns false when the page is still loading.
448 virtual bool IsVisible() const = 0;
449
445 // Returns true if the before unload and unload listeners need to be 450 // Returns true if the before unload and unload listeners need to be
446 // fired. The value of this changes over time. For example, if true and the 451 // fired. The value of this changes over time. For example, if true and the
447 // before unload listener is executed and allows the user to exit, then this 452 // before unload listener is executed and allows the user to exit, then this
448 // returns false. 453 // returns false.
449 virtual bool NeedToFireBeforeUnload() = 0; 454 virtual bool NeedToFireBeforeUnload() = 0;
450 455
451 // Runs the beforeunload handler for the main frame. See also ClosePage and 456 // Runs the beforeunload handler for the main frame. See also ClosePage and
452 // SwapOut in RenderViewHost, which run the unload handler. 457 // SwapOut in RenderViewHost, which run the unload handler.
453 // 458 //
454 // TODO(creis): We should run the beforeunload handler for every frame that 459 // TODO(creis): We should run the beforeunload handler for every frame that
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 843
839 private: 844 private:
840 // This interface should only be implemented inside content. 845 // This interface should only be implemented inside content.
841 friend class WebContentsImpl; 846 friend class WebContentsImpl;
842 WebContents() {} 847 WebContents() {}
843 }; 848 };
844 849
845 } // namespace content 850 } // namespace content
846 851
847 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 852 #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