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

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

Issue 2801813005: Only show a beforeunload dialog if a frame has had a user gesture since its load. (Closed)
Patch Set: one last bit Created 3 years, 7 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_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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <functional> 10 #include <functional>
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, 874 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
875 TwoSubframesCreatePopupsSimultaneously); 875 TwoSubframesCreatePopupsSimultaneously);
876 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, 876 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
877 TwoSubframesCreatePopupMenuWidgetsSimultaneously); 877 TwoSubframesCreatePopupMenuWidgetsSimultaneously);
878 FRIEND_TEST_ALL_PREFIXES(SitePerProcessAccessibilityBrowserTest, 878 FRIEND_TEST_ALL_PREFIXES(SitePerProcessAccessibilityBrowserTest,
879 CrossSiteIframeAccessibility); 879 CrossSiteIframeAccessibility);
880 FRIEND_TEST_ALL_PREFIXES(WebContentsImplBrowserTest, 880 FRIEND_TEST_ALL_PREFIXES(WebContentsImplBrowserTest,
881 JavaScriptDialogsInMainAndSubframes); 881 JavaScriptDialogsInMainAndSubframes);
882 FRIEND_TEST_ALL_PREFIXES(RenderFrameHostImplBrowserTest, 882 FRIEND_TEST_ALL_PREFIXES(RenderFrameHostImplBrowserTest,
883 IframeBeforeUnloadParentHang); 883 IframeBeforeUnloadParentHang);
884 FRIEND_TEST_ALL_PREFIXES(RenderFrameHostImplBrowserTest,
885 BeforeUnloadDialogRequiresGesture);
884 886
885 // So |find_request_manager_| can be accessed for testing. 887 // So |find_request_manager_| can be accessed for testing.
886 friend class FindRequestManagerTest; 888 friend class FindRequestManagerTest;
887 889
888 // TODO(brettw) TestWebContents shouldn't exist! 890 // TODO(brettw) TestWebContents shouldn't exist!
889 friend class TestWebContents; 891 friend class TestWebContents;
890 892
891 class DestructionObserver; 893 class DestructionObserver;
892 894
893 // Represents a WebContents node in a tree of WebContents structure. 895 // Represents a WebContents node in a tree of WebContents structure.
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 // Adds/removes a callback called on creation of each new WebContents. 1590 // Adds/removes a callback called on creation of each new WebContents.
1589 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1591 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1590 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1592 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1591 1593
1592 DISALLOW_COPY_AND_ASSIGN(FriendWrapper); 1594 DISALLOW_COPY_AND_ASSIGN(FriendWrapper);
1593 }; 1595 };
1594 1596
1595 } // namespace content 1597 } // namespace content
1596 1598
1597 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1599 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl_browsertest.cc ('k') | content/public/test/browser_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698