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

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: Patch for landing Created 7 years, 6 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 | 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 virtual const std::string& GetContentsMimeType() const OVERRIDE; 261 virtual const std::string& GetContentsMimeType() const OVERRIDE;
262 virtual bool WillNotifyDisconnection() const OVERRIDE; 262 virtual bool WillNotifyDisconnection() const OVERRIDE;
263 virtual void SetOverrideEncoding(const std::string& encoding) OVERRIDE; 263 virtual void SetOverrideEncoding(const std::string& encoding) OVERRIDE;
264 virtual void ResetOverrideEncoding() OVERRIDE; 264 virtual void ResetOverrideEncoding() OVERRIDE;
265 virtual RendererPreferences* GetMutableRendererPrefs() OVERRIDE; 265 virtual RendererPreferences* GetMutableRendererPrefs() OVERRIDE;
266 virtual void SetNewTabStartTime(const base::TimeTicks& time) OVERRIDE; 266 virtual void SetNewTabStartTime(const base::TimeTicks& time) OVERRIDE;
267 virtual base::TimeTicks GetNewTabStartTime() const OVERRIDE; 267 virtual base::TimeTicks GetNewTabStartTime() const OVERRIDE;
268 virtual void Close() OVERRIDE; 268 virtual void Close() OVERRIDE;
269 virtual void OnCloseStarted() OVERRIDE; 269 virtual void OnCloseStarted() OVERRIDE;
270 virtual void OnCloseCanceled() OVERRIDE;
271 virtual void OnUnloadStarted() OVERRIDE;
272 virtual void OnUnloadDetachedStarted() OVERRIDE;
270 virtual void SystemDragEnded() OVERRIDE; 273 virtual void SystemDragEnded() OVERRIDE;
271 virtual void UserGestureDone() OVERRIDE; 274 virtual void UserGestureDone() OVERRIDE;
272 virtual void SetClosedByUserGesture(bool value) OVERRIDE; 275 virtual void SetClosedByUserGesture(bool value) OVERRIDE;
273 virtual bool GetClosedByUserGesture() const OVERRIDE; 276 virtual bool GetClosedByUserGesture() const OVERRIDE;
274 virtual double GetZoomLevel() const OVERRIDE; 277 virtual double GetZoomLevel() const OVERRIDE;
275 virtual int GetZoomPercent(bool* enable_increment, 278 virtual int GetZoomPercent(bool* enable_increment,
276 bool* enable_decrement) const OVERRIDE; 279 bool* enable_decrement) const OVERRIDE;
277 virtual void ViewSource() OVERRIDE; 280 virtual void ViewSource() OVERRIDE;
278 virtual void ViewFrameSource(const GURL& url, 281 virtual void ViewFrameSource(const GURL& url,
279 const PageState& page_state) OVERRIDE; 282 const PageState& page_state) OVERRIDE;
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 871
869 // The time that we started to create the new tab page. 872 // The time that we started to create the new tab page.
870 base::TimeTicks new_tab_start_time_; 873 base::TimeTicks new_tab_start_time_;
871 874
872 // The time that we started to close this WebContents. 875 // The time that we started to close this WebContents.
873 base::TimeTicks close_start_time_; 876 base::TimeTicks close_start_time_;
874 877
875 // The time when onbeforeunload ended. 878 // The time when onbeforeunload ended.
876 base::TimeTicks before_unload_end_time_; 879 base::TimeTicks before_unload_end_time_;
877 880
881 // The time when the tab was removed from view during close.
882 base::TimeTicks unload_detached_start_time_;
883
878 // The time that this tab was last selected. 884 // The time that this tab was last selected.
879 base::TimeTicks last_selected_time_; 885 base::TimeTicks last_selected_time_;
880 886
881 // See description above setter. 887 // See description above setter.
882 bool closed_by_user_gesture_; 888 bool closed_by_user_gesture_;
883 889
884 // Minimum/maximum zoom percent. 890 // Minimum/maximum zoom percent.
885 int minimum_zoom_percent_; 891 int minimum_zoom_percent_;
886 int maximum_zoom_percent_; 892 int maximum_zoom_percent_;
887 // If true, the default zoom limits have been overriden for this tab, in which 893 // If true, the default zoom limits have been overriden for this tab, in which
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 // Maps the ids of pending image downloads to their callbacks 945 // Maps the ids of pending image downloads to their callbacks
940 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap; 946 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap;
941 ImageDownloadMap image_download_map_; 947 ImageDownloadMap image_download_map_;
942 948
943 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 949 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
944 }; 950 };
945 951
946 } // namespace content 952 } // namespace content
947 953
948 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 954 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/test/data/fast_tab_close/unload_sleep_before_cookie.html ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698