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_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 virtual bool DisplayedInsecureContent() const OVERRIDE; | 226 virtual bool DisplayedInsecureContent() const OVERRIDE; |
227 virtual void IncrementCapturerCount(const gfx::Size& capture_size) OVERRIDE; | 227 virtual void IncrementCapturerCount(const gfx::Size& capture_size) OVERRIDE; |
228 virtual void DecrementCapturerCount() OVERRIDE; | 228 virtual void DecrementCapturerCount() OVERRIDE; |
229 virtual int GetCapturerCount() const OVERRIDE; | 229 virtual int GetCapturerCount() const OVERRIDE; |
230 virtual bool IsCrashed() const OVERRIDE; | 230 virtual bool IsCrashed() const OVERRIDE; |
231 virtual void SetIsCrashed(base::TerminationStatus status, | 231 virtual void SetIsCrashed(base::TerminationStatus status, |
232 int error_code) OVERRIDE; | 232 int error_code) OVERRIDE; |
233 virtual base::TerminationStatus GetCrashedStatus() const OVERRIDE; | 233 virtual base::TerminationStatus GetCrashedStatus() const OVERRIDE; |
234 virtual bool IsBeingDestroyed() const OVERRIDE; | 234 virtual bool IsBeingDestroyed() const OVERRIDE; |
235 virtual void NotifyNavigationStateChanged(unsigned changed_flags) OVERRIDE; | 235 virtual void NotifyNavigationStateChanged(unsigned changed_flags) OVERRIDE; |
236 virtual base::TimeTicks GetLastSelectedTime() const OVERRIDE; | 236 virtual base::TimeTicks GetLastActiveTime() const OVERRIDE; |
237 virtual void WasShown() OVERRIDE; | 237 virtual void WasShown() OVERRIDE; |
238 virtual void WasHidden() OVERRIDE; | 238 virtual void WasHidden() OVERRIDE; |
239 virtual bool NeedToFireBeforeUnload() OVERRIDE; | 239 virtual bool NeedToFireBeforeUnload() OVERRIDE; |
240 virtual void Stop() OVERRIDE; | 240 virtual void Stop() OVERRIDE; |
241 virtual WebContents* Clone() OVERRIDE; | 241 virtual WebContents* Clone() OVERRIDE; |
242 virtual void FocusThroughTabTraversal(bool reverse) OVERRIDE; | 242 virtual void FocusThroughTabTraversal(bool reverse) OVERRIDE; |
243 virtual bool ShowingInterstitialPage() const OVERRIDE; | 243 virtual bool ShowingInterstitialPage() const OVERRIDE; |
244 virtual InterstitialPage* GetInterstitialPage() const OVERRIDE; | 244 virtual InterstitialPage* GetInterstitialPage() const OVERRIDE; |
245 virtual bool IsSavable() OVERRIDE; | 245 virtual bool IsSavable() OVERRIDE; |
246 virtual void OnSavePage() OVERRIDE; | 246 virtual void OnSavePage() OVERRIDE; |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 friend class WebContentsObserver; | 619 friend class WebContentsObserver; |
620 friend class WebContents; // To implement factory methods. | 620 friend class WebContents; // To implement factory methods. |
621 | 621 |
622 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, NoJSMessageOnInterstitials); | 622 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, NoJSMessageOnInterstitials); |
623 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, UpdateTitle); | 623 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, UpdateTitle); |
624 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, FindOpenerRVHWhenPending); | 624 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, FindOpenerRVHWhenPending); |
625 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, | 625 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, |
626 CrossSiteCantPreemptAfterUnload); | 626 CrossSiteCantPreemptAfterUnload); |
627 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, PendingContents); | 627 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, PendingContents); |
628 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, FrameTreeShape); | 628 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, FrameTreeShape); |
| 629 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, GetLastActiveTime); |
629 FRIEND_TEST_ALL_PREFIXES(FormStructureBrowserTest, HTMLFiles); | 630 FRIEND_TEST_ALL_PREFIXES(FormStructureBrowserTest, HTMLFiles); |
630 FRIEND_TEST_ALL_PREFIXES(NavigationControllerTest, HistoryNavigate); | 631 FRIEND_TEST_ALL_PREFIXES(NavigationControllerTest, HistoryNavigate); |
631 FRIEND_TEST_ALL_PREFIXES(RenderFrameHostManagerTest, PageDoesBackAndReload); | 632 FRIEND_TEST_ALL_PREFIXES(RenderFrameHostManagerTest, PageDoesBackAndReload); |
632 | 633 |
633 // So InterstitialPageImpl can access SetIsLoading. | 634 // So InterstitialPageImpl can access SetIsLoading. |
634 friend class InterstitialPageImpl; | 635 friend class InterstitialPageImpl; |
635 | 636 |
636 // TODO(brettw) TestWebContents shouldn't exist! | 637 // TODO(brettw) TestWebContents shouldn't exist! |
637 friend class TestWebContents; | 638 friend class TestWebContents; |
638 | 639 |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 JavaScriptDialogManager* dialog_manager_; | 982 JavaScriptDialogManager* dialog_manager_; |
982 | 983 |
983 // Set to true when there is an active "before unload" dialog. When true, | 984 // Set to true when there is an active "before unload" dialog. When true, |
984 // we've forced the throbber to start in Navigate, and we need to remember to | 985 // we've forced the throbber to start in Navigate, and we need to remember to |
985 // turn it off in OnJavaScriptMessageBoxClosed if the navigation is canceled. | 986 // turn it off in OnJavaScriptMessageBoxClosed if the navigation is canceled. |
986 bool is_showing_before_unload_dialog_; | 987 bool is_showing_before_unload_dialog_; |
987 | 988 |
988 // Settings that get passed to the renderer process. | 989 // Settings that get passed to the renderer process. |
989 RendererPreferences renderer_preferences_; | 990 RendererPreferences renderer_preferences_; |
990 | 991 |
991 // The time that this tab was last selected. | 992 // The time that this WebContents was last made active. The initial value is |
992 base::TimeTicks last_selected_time_; | 993 // the WebContents creation time. |
| 994 base::TimeTicks last_active_time_; |
993 | 995 |
994 // See description above setter. | 996 // See description above setter. |
995 bool closed_by_user_gesture_; | 997 bool closed_by_user_gesture_; |
996 | 998 |
997 // Minimum/maximum zoom percent. | 999 // Minimum/maximum zoom percent. |
998 int minimum_zoom_percent_; | 1000 int minimum_zoom_percent_; |
999 int maximum_zoom_percent_; | 1001 int maximum_zoom_percent_; |
1000 // If true, the default zoom limits have been overriden for this tab, in which | 1002 // If true, the default zoom limits have been overriden for this tab, in which |
1001 // case we don't want saved settings to apply to it and we don't want to | 1003 // case we don't want saved settings to apply to it and we don't want to |
1002 // remember it. | 1004 // remember it. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 // Whether this WebContents is responsible for displaying a subframe in a | 1060 // Whether this WebContents is responsible for displaying a subframe in a |
1059 // different process from its parent page. | 1061 // different process from its parent page. |
1060 bool is_subframe_; | 1062 bool is_subframe_; |
1061 | 1063 |
1062 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 1064 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
1063 }; | 1065 }; |
1064 | 1066 |
1065 } // namespace content | 1067 } // namespace content |
1066 | 1068 |
1067 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1069 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |