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

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

Issue 2906133004: JavaScript dialogs cause a page to lose fullscreen. (Closed)
Patch Set: with a test Created 3 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
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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 uint32_t max_bitmap_size, 441 uint32_t max_bitmap_size,
442 bool bypass_cache, 442 bool bypass_cache,
443 const ImageDownloadCallback& callback) override; 443 const ImageDownloadCallback& callback) override;
444 bool IsSubframe() const override; 444 bool IsSubframe() const override;
445 void Find(int request_id, 445 void Find(int request_id,
446 const base::string16& search_text, 446 const base::string16& search_text,
447 const blink::WebFindOptions& options) override; 447 const blink::WebFindOptions& options) override;
448 void StopFinding(StopFindAction action) override; 448 void StopFinding(StopFindAction action) override;
449 bool WasRecentlyAudible() override; 449 bool WasRecentlyAudible() override;
450 void GetManifest(const GetManifestCallback& callback) override; 450 void GetManifest(const GetManifestCallback& callback) override;
451 bool IsFullscreenForCurrentTab() const override;
451 void ExitFullscreen(bool will_cause_resize) override; 452 void ExitFullscreen(bool will_cause_resize) override;
452 void ResumeLoadingCreatedWebContents() override; 453 void ResumeLoadingCreatedWebContents() override;
453 void OnPasswordInputShownOnHttp() override; 454 void OnPasswordInputShownOnHttp() override;
454 void OnAllPasswordInputsHiddenOnHttp() override; 455 void OnAllPasswordInputsHiddenOnHttp() override;
455 void OnCreditCardInputShownOnHttp() override; 456 void OnCreditCardInputShownOnHttp() override;
456 void SetIsOverlayContent(bool is_overlay_content) override; 457 void SetIsOverlayContent(bool is_overlay_content) override;
457 bool IsFocusedElementEditable() override; 458 bool IsFocusedElementEditable() override;
458 void ClearFocusedElement() override; 459 void ClearFocusedElement() override;
459 bool IsShowingContextMenu() const override; 460 bool IsShowingContextMenu() const override;
460 void SetShowingContextMenu(bool showing) override; 461 void SetShowingContextMenu(bool showing) override;
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 RenderWidgetHostImpl* receiving_widget) override; 699 RenderWidgetHostImpl* receiving_widget) override;
699 RenderWidgetHostImpl* GetRenderWidgetHostWithPageFocus() override; 700 RenderWidgetHostImpl* GetRenderWidgetHostWithPageFocus() override;
700 void FocusOwningWebContents( 701 void FocusOwningWebContents(
701 RenderWidgetHostImpl* render_widget_host) override; 702 RenderWidgetHostImpl* render_widget_host) override;
702 void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host) override; 703 void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host) override;
703 void RendererResponsive(RenderWidgetHostImpl* render_widget_host) override; 704 void RendererResponsive(RenderWidgetHostImpl* render_widget_host) override;
704 void RequestToLockMouse(RenderWidgetHostImpl* render_widget_host, 705 void RequestToLockMouse(RenderWidgetHostImpl* render_widget_host,
705 bool user_gesture, 706 bool user_gesture,
706 bool last_unlocked_by_target, 707 bool last_unlocked_by_target,
707 bool privileged) override; 708 bool privileged) override;
708 bool IsFullscreenForCurrentTab() const override; 709 // The following function is already listed under WebContents overrides:
710 // bool IsFullscreenForCurrentTab() const override;
Matt Giuca 2017/06/09 06:16:37 Shouldn't have commented-out lines of code. How a
Avi (use Gerrit) 2017/06/09 14:36:23 This is paralleling lines 689, etc, above.
709 blink::WebDisplayMode GetDisplayMode( 711 blink::WebDisplayMode GetDisplayMode(
710 RenderWidgetHostImpl* render_widget_host) const override; 712 RenderWidgetHostImpl* render_widget_host) const override;
711 void LostCapture(RenderWidgetHostImpl* render_widget_host) override; 713 void LostCapture(RenderWidgetHostImpl* render_widget_host) override;
712 void LostMouseLock(RenderWidgetHostImpl* render_widget_host) override; 714 void LostMouseLock(RenderWidgetHostImpl* render_widget_host) override;
713 bool HasMouseLock(RenderWidgetHostImpl* render_widget_host) override; 715 bool HasMouseLock(RenderWidgetHostImpl* render_widget_host) override;
714 RenderWidgetHostImpl* GetMouseLockWidget() override; 716 RenderWidgetHostImpl* GetMouseLockWidget() override;
715 void OnRenderFrameProxyVisibilityChanged(bool visible) override; 717 void OnRenderFrameProxyVisibilityChanged(bool visible) override;
716 void SendScreenRects() override; 718 void SendScreenRects() override;
717 TextInputManager* GetTextInputManager() override; 719 TextInputManager* GetTextInputManager() override;
718 bool OnUpdateDragCursor() override; 720 bool OnUpdateDragCursor() override;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 FRIEND_TEST_ALL_PREFIXES(RenderFrameHostManagerTest, PageDoesBackAndReload); 901 FRIEND_TEST_ALL_PREFIXES(RenderFrameHostManagerTest, PageDoesBackAndReload);
900 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, CrossSiteIframe); 902 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, CrossSiteIframe);
901 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, 903 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
902 TwoSubframesCreatePopupsSimultaneously); 904 TwoSubframesCreatePopupsSimultaneously);
903 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, 905 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
904 TwoSubframesCreatePopupMenuWidgetsSimultaneously); 906 TwoSubframesCreatePopupMenuWidgetsSimultaneously);
905 FRIEND_TEST_ALL_PREFIXES(SitePerProcessAccessibilityBrowserTest, 907 FRIEND_TEST_ALL_PREFIXES(SitePerProcessAccessibilityBrowserTest,
906 CrossSiteIframeAccessibility); 908 CrossSiteIframeAccessibility);
907 FRIEND_TEST_ALL_PREFIXES(WebContentsImplBrowserTest, 909 FRIEND_TEST_ALL_PREFIXES(WebContentsImplBrowserTest,
908 JavaScriptDialogsInMainAndSubframes); 910 JavaScriptDialogsInMainAndSubframes);
911 FRIEND_TEST_ALL_PREFIXES(WebContentsImplBrowserTest,
912 DialogsFromJavaScriptEndFullscreen);
909 FRIEND_TEST_ALL_PREFIXES(RenderFrameHostImplBrowserTest, 913 FRIEND_TEST_ALL_PREFIXES(RenderFrameHostImplBrowserTest,
910 IframeBeforeUnloadParentHang); 914 IframeBeforeUnloadParentHang);
911 FRIEND_TEST_ALL_PREFIXES(RenderFrameHostImplBrowserTest, 915 FRIEND_TEST_ALL_PREFIXES(RenderFrameHostImplBrowserTest,
912 BeforeUnloadDialogRequiresGesture); 916 BeforeUnloadDialogRequiresGesture);
913 917
914 // So |find_request_manager_| can be accessed for testing. 918 // So |find_request_manager_| can be accessed for testing.
915 friend class FindRequestManagerTest; 919 friend class FindRequestManagerTest;
916 920
917 // TODO(brettw) TestWebContents shouldn't exist! 921 // TODO(brettw) TestWebContents shouldn't exist!
918 friend class TestWebContents; 922 friend class TestWebContents;
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
1635 // Adds/removes a callback called on creation of each new WebContents. 1639 // Adds/removes a callback called on creation of each new WebContents.
1636 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1640 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1637 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1641 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1638 1642
1639 DISALLOW_COPY_AND_ASSIGN(FriendWrapper); 1643 DISALLOW_COPY_AND_ASSIGN(FriendWrapper);
1640 }; 1644 };
1641 1645
1642 } // namespace content 1646 } // namespace content
1643 1647
1644 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1648 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698