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

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

Issue 11016023: Quickly close tabs/window with long-running unload handlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep original TabsNeedBeforeUnloadFired implementation. Created 8 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 | Annotate | Revision Log
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_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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 virtual const std::string& GetContentsMimeType() const OVERRIDE; 242 virtual const std::string& GetContentsMimeType() const OVERRIDE;
243 virtual bool WillNotifyDisconnection() const OVERRIDE; 243 virtual bool WillNotifyDisconnection() const OVERRIDE;
244 virtual void SetOverrideEncoding(const std::string& encoding) OVERRIDE; 244 virtual void SetOverrideEncoding(const std::string& encoding) OVERRIDE;
245 virtual void ResetOverrideEncoding() OVERRIDE; 245 virtual void ResetOverrideEncoding() OVERRIDE;
246 virtual RendererPreferences* GetMutableRendererPrefs() OVERRIDE; 246 virtual RendererPreferences* GetMutableRendererPrefs() OVERRIDE;
247 virtual void SetNewTabStartTime(const base::TimeTicks& time) OVERRIDE; 247 virtual void SetNewTabStartTime(const base::TimeTicks& time) OVERRIDE;
248 virtual base::TimeTicks GetNewTabStartTime() const OVERRIDE; 248 virtual base::TimeTicks GetNewTabStartTime() const OVERRIDE;
249 virtual void Close() OVERRIDE; 249 virtual void Close() OVERRIDE;
250 virtual void OnCloseStarted() OVERRIDE; 250 virtual void OnCloseStarted() OVERRIDE;
251 virtual void OnCloseCanceled() OVERRIDE;
252 virtual void OnUnloadStarted() OVERRIDE;
253 virtual void OnUnloadDetachedStarted() OVERRIDE;
251 virtual bool ShouldAcceptDragAndDrop() const OVERRIDE; 254 virtual bool ShouldAcceptDragAndDrop() const OVERRIDE;
252 virtual void SystemDragEnded() OVERRIDE; 255 virtual void SystemDragEnded() OVERRIDE;
253 virtual void UserGestureDone() OVERRIDE; 256 virtual void UserGestureDone() OVERRIDE;
254 virtual void SetClosedByUserGesture(bool value) OVERRIDE; 257 virtual void SetClosedByUserGesture(bool value) OVERRIDE;
255 virtual bool GetClosedByUserGesture() const OVERRIDE; 258 virtual bool GetClosedByUserGesture() const OVERRIDE;
256 virtual double GetZoomLevel() const OVERRIDE; 259 virtual double GetZoomLevel() const OVERRIDE;
257 virtual int GetZoomPercent(bool* enable_increment, 260 virtual int GetZoomPercent(bool* enable_increment,
258 bool* enable_decrement) const OVERRIDE; 261 bool* enable_decrement) const OVERRIDE;
259 virtual void ViewSource() OVERRIDE; 262 virtual void ViewSource() OVERRIDE;
260 virtual void ViewFrameSource(const GURL& url, 263 virtual void ViewFrameSource(const GURL& url,
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 807
805 // The time that we started to create the new tab page. 808 // The time that we started to create the new tab page.
806 base::TimeTicks new_tab_start_time_; 809 base::TimeTicks new_tab_start_time_;
807 810
808 // The time that we started to close this WebContents. 811 // The time that we started to close this WebContents.
809 base::TimeTicks close_start_time_; 812 base::TimeTicks close_start_time_;
810 813
811 // The time when onbeforeunload ended. 814 // The time when onbeforeunload ended.
812 base::TimeTicks before_unload_end_time_; 815 base::TimeTicks before_unload_end_time_;
813 816
817 // The time when the tab was removed from view during close.
818 base::TimeTicks unload_detached_start_time_;
819
814 // The time that this tab was last selected. 820 // The time that this tab was last selected.
815 base::TimeTicks last_selected_time_; 821 base::TimeTicks last_selected_time_;
816 822
817 // See description above setter. 823 // See description above setter.
818 bool closed_by_user_gesture_; 824 bool closed_by_user_gesture_;
819 825
820 // Minimum/maximum zoom percent. 826 // Minimum/maximum zoom percent.
821 int minimum_zoom_percent_; 827 int minimum_zoom_percent_;
822 int maximum_zoom_percent_; 828 int maximum_zoom_percent_;
823 // If true, the default zoom limits have been overriden for this tab, in which 829 // If true, the default zoom limits have been overriden for this tab, in which
(...skipping 29 matching lines...) Expand all
853 // All live RenderWidgetHostImpls that are created by this object and may 859 // All live RenderWidgetHostImpls that are created by this object and may
854 // outlive it. 860 // outlive it.
855 std::set<RenderWidgetHostImpl*> created_widgets_; 861 std::set<RenderWidgetHostImpl*> created_widgets_;
856 862
857 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 863 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
858 }; 864 };
859 865
860 } // namespace content 866 } // namespace content
861 867
862 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 868 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698