summaryrefslogtreecommitdiffstats
path: root/components/web_modal
Commit message (Collapse)AuthorAgeFilesLines
* Close Views web contents modal dialogs on interstitial pages by defaultwittman@chromium.org2013-10-253-9/+21
| | | | | | | | | | | | | | | | All Views web contents modal dialogs have been configured to close on interstitial pages (e.g. SSL errors) for a while now without issue. This changes the default to close the dialogs so that each dialog doesn't have to explicitly specify. Also change the name of the function, since the interstitial pages are not technically WebUI, but a blink-generated interstitial page. BUG=295897 Review URL: https://codereview.chromium.org/35153011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230893 0039d316-1c4b-4281-b951-d872f2087c98
* Remove invisible views from tab order.dbeam@chromium.org2013-10-175-38/+161
| | | | | | | | | | | | | | | | | | | | AutofillDialogViews::Layout() and AutofillDialogViews::GetPreferredSize() short-circuit logic when either the loading shield or sign-in webview are showing. Unfortunately this has the side-effect of keeping any focusable input in the dialog in the tab order. Recently I made suggested buttons (down arrows) focusable so this became more noticeable, but the problem has always been there (if you currently change all sections to add mode and attempt to sign in you'll have tons of invisible elements to focus). This CL makes visually invisible nodes also !visible() to remove them from the tab order (see: views::View::IsFocusable()). R=isherman@chromium.org BUG=306484 Review URL: https://codereview.chromium.org/27085002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229111 0039d316-1c4b-4281-b951-d872f2087c98
* Remove NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED from web contents modal ↵avi@chromium.org2013-10-103-48/+18
| | | | | | | | | | | dialogs. BUG=170921 TEST=everything still works Review URL: https://codereview.chromium.org/26554002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227985 0039d316-1c4b-4281-b951-d872f2087c98
* Don't enforce maximum dialog size for browser modal dialogs.rfevang@chromium.org2013-10-094-46/+66
| | | | | | | | | | These dialogs are not contained by the browser window, so allow them to have whatever size they want to have. BUG=288493 Review URL: https://codereview.chromium.org/24265007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227820 0039d316-1c4b-4281-b951-d872f2087c98
* [Cleanup] rename WebContentsModalDialogManager::IsShowingDialog() to ↵wittman@chromium.org2013-09-103-16/+14
| | | | | | | | | | | | | | IsDialogActive() The function tests whether web contents modal dialogs are active, rather than if they are actually showing. This updates the name accordingly and resolves the TODO. BUG=157161 Review URL: https://chromiumcodereview.appspot.com/23815006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222289 0039d316-1c4b-4281-b951-d872f2087c98
* Provide configurable closing of web contents modal dialogs on interstitial ↵wittman@chromium.org2013-09-063-11/+87
| | | | | | | | | | | | | | | | webui Allow individual web contents modal dialog users to specify that dialogs should be closed when encountering interstitial webui (e.g. due to SSL warnings). Future CLs will enable use of this functionality for most dialogs. BUG=240575 Review URL: https://chromiumcodereview.appspot.com/23981002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221575 0039d316-1c4b-4281-b951-d872f2087c98
* Limit constrained windows to the size of the parent view.rfevang@chromium.org2013-09-061-2/+8
| | | | | | | | | | | | | | | | | | | | | | Constrained windows would get drawn partially outside the browser window, obscuring some of the contents. This CL limits their size so everything is in view. This mimics the behavior of the old style dialogs. This CL also changes the size request to use the current preferred size of the view, instead of reusing the existing size. Some dialogs (like the print preview) changes their size preferences when the browser window size changes, so the old size might not be optimal any more. Additionally, added a GetMinimumSize to the bubble frame view, as previously GetPreferredSize would get used, effectively undoing the additional restrictions placed based on Window sizes. BUG=272760,274236,276150 Review URL: https://chromiumcodereview.appspot.com/22903022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221573 0039d316-1c4b-4281-b951-d872f2087c98
* Add WebContentsModalDialogManager unit testswittman@chromium.org2013-09-052-38/+271
| | | | | | | | | | | | | Implement additional tests covering most of the functionality of WebContentsModalDialogManager. Refactor common setup into the test fixture. BUG=157161 R=sky@chromium.org Review URL: https://codereview.chromium.org/23475022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221483 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup WebContentsModalDialogManagerTest.thestig@chromium.org2013-08-231-13/+16
| | | | | | Review URL: https://chromiumcodereview.appspot.com/22957011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219192 0039d316-1c4b-4281-b951-d872f2087c98
* Observe WebContentsModalDialogHost from NativeWebContentsModalDialogManagerViewswittman@chromium.org2013-08-211-0/+1
| | | | | | | | | | | | | | | | | | Replace per-Widget observers of WebContentsModalDialogHost with a single observer for all web contents modal dialogs associated with the same WebContents. This is a step towards reducing dependencies of web contents modal dialog creation, to support future changes to move the creation code within ui/views. Also add WebContentsModalDialogHostObserver::OnHostDestroying(). This is needed since NativeWebContentsModalDialogManagerViews can be destroyed after the WebContentsModalDialogHost. BUG=271746 Review URL: https://chromiumcodereview.appspot.com/23201010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218640 0039d316-1c4b-4281-b951-d872f2087c98
* Reland: Add components/web_modal OWNERSwittman@chromium.org2013-08-201-0/+2
| | | | | | | | | | | | | Fixed executable bits. BUG=157161 R=joi@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=218518 Review URL: https://codereview.chromium.org/22947010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218539 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 218518 "Add components/web_modal OWNERS"stevenjb@chromium.org2013-08-201-2/+0
| | | | | | | | | | | | | | | | | | This breaks the perms check: http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Full/builds/24178/steps/check_perms/logs/stdio > Add components/web_modal OWNERS > > BUG=157161 > R=joi@chromium.org > > Review URL: https://codereview.chromium.org/22947010 TBR=wittman@chromium.org Review URL: https://codereview.chromium.org/22964007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218529 0039d316-1c4b-4281-b951-d872f2087c98
* Add NativeWebContentsModalDialogManager::HostChanged()wittman@chromium.org2013-08-204-1/+15
| | | | | | | | | | | | | | Add a mechanism to notify platform-specific web contents modal dialog managers that the hosting view has changed. To be used by future changes to support a single host observer for all dialogs on a WebContents, rather than one per dialog. BUG=271746 R=asargent@chromium.org, joi@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/22897008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218524 0039d316-1c4b-4281-b951-d872f2087c98
* Add components/web_modal OWNERSwittman@chromium.org2013-08-201-0/+2
| | | | | | | | | BUG=157161 R=joi@chromium.org Review URL: https://codereview.chromium.org/22947010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218518 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 212329 "Reland "Close web contents modal dialogs on conte..."wittman@chromium.org2013-07-312-68/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Causes several problems related to the print preview dialog: http://crbug.com/262023 http://crbug.com/262916 http://crbug.com/265427 > Reland "Close web contents modal dialogs on content load start" > > Address the failure of some web contents modal dialogs to close when > interstitial WebUI is displayed by closing the dialogs on content load start. > Remove existing ad hoc support in dialogs for closing on page loading in favor > of a uniform approach. > > I'm using load start as the trigger for dialog close as this seems to be the > point in time at which the user first perceives the page to be changing. > > Notes on the print preview changes: with this change the dialog is closed when > load starts and the initiator tab gets removed via RemovePreviewDialog, so there > is no longer a need to handle NOTIFICATION_NAV_ENTRY_COMITTED for the initiator > tab. The PrintViewManager::PrintPreviewDone() DCHECK is removed since now > PrintViewManager::RenderViewGone() may be invoked and print_preview_state_ reset > due to WebContents closure before the dialog is destroyed and PrintPreviewDone() > is invoked. > > BUG=240575 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=211058 > > Review URL: https://chromiumcodereview.appspot.com/17500003 TBR=wittman@chromium.org Review URL: https://codereview.chromium.org/21372006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214775 0039d316-1c4b-4281-b951-d872f2087c98
* Reland "Close web contents modal dialogs on content load start"wittman@chromium.org2013-07-182-32/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | Address the failure of some web contents modal dialogs to close when interstitial WebUI is displayed by closing the dialogs on content load start. Remove existing ad hoc support in dialogs for closing on page loading in favor of a uniform approach. I'm using load start as the trigger for dialog close as this seems to be the point in time at which the user first perceives the page to be changing. Notes on the print preview changes: with this change the dialog is closed when load starts and the initiator tab gets removed via RemovePreviewDialog, so there is no longer a need to handle NOTIFICATION_NAV_ENTRY_COMITTED for the initiator tab. The PrintViewManager::PrintPreviewDone() DCHECK is removed since now PrintViewManager::RenderViewGone() may be invoked and print_preview_state_ reset due to WebContents closure before the dialog is destroyed and PrintPreviewDone() is invoked. BUG=240575 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=211058 Review URL: https://chromiumcodereview.appspot.com/17500003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212329 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 211058 "Close web contents modal dialogs on content load ..."wittman@chromium.org2013-07-122-18/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change breaks autocheckout. > Close web contents modal dialogs on content load start > > Address the failure of some web contents modal dialogs to close when > interstitial WebUI is displayed by closing the dialogs on content load start. > Remove existing ad hoc support in dialogs for closing on page loading in favor > of a uniform approach. > > I'm using load start as the trigger for dialog close as this seems to be the > point in time at which the user first perceives the page to be changing. > > Notes on the print preview changes: with this change the dialog is closed when > load starts and the initiator tab gets removed via RemovePreviewDialog, so there > is no longer a need to handle NOTIFICATION_NAV_ENTRY_COMITTED for the initiator > tab. The PrintViewManager::PrintPreviewDone() DCHECK is removed since now > PrintViewManager::RenderViewGone() may be invoked and print_preview_state_ reset > due to WebContents closure before the dialog is destroyed and PrintPreviewDone() > is invoked. > > BUG=240575 > > Review URL: https://chromiumcodereview.appspot.com/17500003 TBR=wittman@chromium.org Review URL: https://codereview.chromium.org/18560008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211420 0039d316-1c4b-4281-b951-d872f2087c98
* Close web contents modal dialogs on content load startwittman@chromium.org2013-07-112-23/+18
| | | | | | | | | | | | | | | | | | | | | | | | Address the failure of some web contents modal dialogs to close when interstitial WebUI is displayed by closing the dialogs on content load start. Remove existing ad hoc support in dialogs for closing on page loading in favor of a uniform approach. I'm using load start as the trigger for dialog close as this seems to be the point in time at which the user first perceives the page to be changing. Notes on the print preview changes: with this change the dialog is closed when load starts and the initiator tab gets removed via RemovePreviewDialog, so there is no longer a need to handle NOTIFICATION_NAV_ENTRY_COMITTED for the initiator tab. The PrintViewManager::PrintPreviewDone() DCHECK is removed since now PrintViewManager::RenderViewGone() may be invoked and print_preview_state_ reset due to WebContents closure before the dialog is destroyed and PrintPreviewDone() is invoked. BUG=240575 Review URL: https://chromiumcodereview.appspot.com/17500003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211058 0039d316-1c4b-4281-b951-d872f2087c98
* Add TestBrowserThreadBundle into RenderViewHostTestHarness. Kill some ↵ajwong@chromium.org2013-06-061-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | unnecessary real threads. This CL creates a new class, TestBrowserThreadBundle, that creates a TestBrowserThread for the most commonly needed BrowserThreads. It also adds this thread bundle into RenderViewHostTestHarness because most tests that use this harness need these threads in order to run. To support TestBrowserThreadBundle, BrowserThreadImpl's test construction was also modified to understand a NULL message_loop. Aside from introducing the new class, this CL also removes: (1) unnecessary constructors in test (2) DISALLOW_COPY_AND_ASSIGNS in test fixtures* (3) now redundant TestBrowserThreads from tests (4) bad access-level changes for SetUp() and TearDown() (5) using declarations that root off the global scope (6) uses of MessageLoop's RunUntilIdle() and Quit() (7) as many real threads as possible There are also a changes to MediaCaptureDevicesDispatcher and OneClickSigninHelper that allow unittests to cut dependencies on IO thread activity. DesktopNotificationServiceTest (and a couple of others) were also made single threaded because the synchronization logic required for a non-flaky test meant the parallelism only really exercised the extra code in the test that forced the serialization. * DISALLOW_COPY_AND_ASSIGN does not serve much purpose in GTest fixture types. However, using it removes the compile-provided default constructor which forces the fixture writer to provide an empty default constructor. Since GTest recommends the default constructor as the preferred method to do setup for a test (as opposed to the SetUp() method), it's confusing to have bunch of classes with both SetUp() and a default constructor. It's simpler and uses less code to just remove the DISALLOW_COPY_AND_ASSIGN. An alternative would be to use the default constructor for initialization, but this is not possible because of our test harnesses are inheritance based which means it is impossible for a derived fixture to perform initialization before the harness if we use the GTest preferred default constructor initialization pattern. TBR=avi,battre,ben,benwells,brettw,dbeam,dimich,joi,joth,mad,marja,markusheintz,noelallen,phajdan,rdsmith,satorux,scherkus,sky,stevenjb,stuartmorgan,timsteele BUG=159193 Review URL: https://chromiumcodereview.appspot.com/14197014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204603 0039d316-1c4b-4281-b951-d872f2087c98
* components: Create web_modal component.sadrul@chromium.org2013-05-1610-0/+592
Notable changes: * Move WebContentsModalDialog related classes into components/web_modal/ * Use namespace web_modal * Move the logic for sending the Chrome IPC message out of WebContentsModalDialogManager, and into ChromeModalDialogManager. Have Browser and ShellWindow subclass ChromeModalDialogManager, instead of directly from WebContentsModalDialogManager, to be able to send the IPC. * Introduce WebContentsModalDialogManagerDelegate::IsWebContentsVisibile. This is necessary to remove the dependency on platform_util. BUG=241278 R=ben@chromium.org, wittman@chromium.org Review URL: https://codereview.chromium.org/14969012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200448 0039d316-1c4b-4281-b951-d872f2087c98