summaryrefslogtreecommitdiffstats
path: root/chrome/browser/find_bar_controller.cc
Commit message (Collapse)AuthorAgeFilesLines
* Do not prepopulate the findbar with incognito search terms.rohitrao@chromium.org2010-04-091-2/+5
| | | | | | | | BUG=32021 TEST=On win/linux, open an incognito window and search for some term. Then open a new normal tab and press Ctrl-F. Findbar should not be prepopoulated with your incognito search term. Review URL: http://codereview.chromium.org/1561018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44104 0039d316-1c4b-4281-b951-d872f2087c98
* Fix prepopulate value for Find and add browser tests for it.finnur@chromium.org2010-04-051-20/+28
| | | | | | | | | | | | | | | Notable changes: FindBarController now sets the prepopulate text during Show for the Find dialog, to fix regression 40121. It also checks not just the current find string (find_text()) but the previous one also (previous_find_text()) in MaybeSetPrepopulateText() because the current find string is blanked out when closing the Find window. And TabContents now makes sure previous_find_text() is never overwritten with an empty find_text value (to prevent the last search from being cleared if you open Find, close it without searching and open it again). This changelist also adds automated tests for the codepaths above, which results in adding a GetFindText method to the FindBarTesting interface, to allow the tests to check what string is being shown to the user when the Find box opens. BUG=40121 TEST=FindInPageControllerTest.Prepopulate* (three tests) Review URL: http://codereview.chromium.org/1560012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43620 0039d316-1c4b-4281-b951-d872f2087c98
* Move RTL related functions from app/l10n_util to base/i18n/rtlben@chromium.org2010-03-201-3/+3
| | | | | | | | | | TBR=darin BUG=none TEST=none Review URL: http://codereview.chromium.org/1073005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42182 0039d316-1c4b-4281-b951-d872f2087c98
* Allow users to close the find session and activate the current link via ↵estade@chromium.org2010-03-111-4/+3
| | | | | | | | | | | | | | | | | | ctrl-enter. this only hooks up ctrl-enter on gtk for now, but adding it on windows/mac should be trivial webkit side, which needs to land first, is here: https://bugs.webkit.org/show_bug.cgi?id=35407 This also enables the FindInPageControllerTest tests on linux/gtk. BUG=29500 TEST=FindInPageControllerTest.ActivateLinkNavigatesPage Review URL: http://codereview.chromium.org/660137 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41291 0039d316-1c4b-4281-b951-d872f2087c98
* Simplified the api by replacing them with single Show(false) call and ↵oshima@chromium.org2010-01-081-3/+2
| | | | | | | | | | | cleaned up linux/mac code. BUG=22036 TEST=None Review URL: http://codereview.chromium.org/523125 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35803 0039d316-1c4b-4281-b951-d872f2087c98
* Find-in-page should not ding while deleting characters.finnur@chromium.org2009-10-261-1/+4
| | | | | | | | | BUG=18120 TEST=Open google.com, type Ctrl+F, type in garbage. Erase one letter at a time and there should be no beeping while you erase. Try it again, but this time use shift-delete to cut a few letters off the end. It should not ding. Now Copy the whole find string, press Esc, open Find again and on Paste it should not ding. Review URL: http://codereview.chromium.org/338005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30092 0039d316-1c4b-4281-b951-d872f2087c98
* Let cmd-f/cmd-g use the findboard.thakis@chromium.org2009-09-231-0/+6
| | | | | | | | | | | | | | | | In a nutshell, this means that the find bars honor the global find pasteboard, which is like a clipboard, but for searches. See the TEST section below for consequences, and also see the bug for more information. BUG=14562 TEST= * Select some text, hit cmd-e, cmd-g. This should search for the marked text and open the find bar if it's not open. * Open TextEdit, hit cmd-f. Enter some text, hit enter. Switch back to Chrome with an open find bar. The find bar should now contain the text you entered in TextEdit * Enter different text into chrome's find bar, switch back to TextEdit. Its find window should now contain the new text. * Search for something in one tab, switch to another tab. It should contain the same text in the findbar as the first one. * Open the findbar, select some text, hit cmd-e. The find bar should be updated with the selected text and this text should be highlighted in the web page. Find bars in other tabs should be updated with that text as well. Review URL: http://codereview.chromium.org/206035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27015 0039d316-1c4b-4281-b951-d872f2087c98
* First cut at implementation of FindBar for views / gtkdavemoore@chromium.org2009-09-091-1/+1
| | | | | | | Also had to implement change notification for TextField on views / gtk Review URL: http://codereview.chromium.org/200035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25819 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure we don't set focus to the findbar until after the focus is ↵estade@chromium.org2009-08-111-4/+0
| | | | | | | | | | restored to the tab contents. BUG=18294 Review URL: http://codereview.chromium.org/160566 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22988 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: move the findbar out of the way when it covers a find result.estade@chromium.org2009-07-291-0/+44
| | | | | | | | BUG=15875 Review URL: http://codereview.chromium.org/160350 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22012 0039d316-1c4b-4281-b951-d872f2087c98
* Use a NotificationRegistrar to listen for notifications.pkasting@chromium.org2009-05-221-14/+5
| | | | | | | BUG=2381 Review URL: http://codereview.chromium.org/114039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16703 0039d316-1c4b-4281-b951-d872f2087c98
* Add match count text to the GTK find bar. This also makes the bar wider.brettw@chromium.org2009-05-141-41/+63
| | | | | | | | | | | | | | | | The match count text doesn't currently show up realiably because the data in the find reply is bad. I believe this is bug 11761. The clicker checking code has been moved to the cross-platform FindBarController so it doesn't have to be duplicated for each platform. This also add IntToString16. I didnt add all the variants now. The *Wstring versions should all eventually be changed to string16. http://crbug.com/11750 Review URL: http://codereview.chromium.org/114023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16058 0039d316-1c4b-4281-b951-d872f2087c98
* Find bar:estade@chromium.org2009-05-061-1/+4
| | | | | | | | | - system bell for linux find bar when search not found - move "not found" logic to find bar controller Review URL: http://codereview.chromium.org/112002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15382 0039d316-1c4b-4281-b951-d872f2087c98
* FindBarView::UpdateForResult is not a good place to finnur@chromium.org2009-05-051-0/+1
| | | | | | | | | | | | | | | | | beep if nothing was found on the page. The reason is that it is gets called when you switch from one tab to the other. I've added a function to FindBar that the controller can call and each platform can implement whatever sound they want to use. BUG=10823 TEST=Open google.com, search for z0, it should beep (no matches). Open new tab, switch back to the old tab and it should not beep. Review URL: http://codereview.chromium.org/99372 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15269 0039d316-1c4b-4281-b951-d872f2087c98
* Replace all occurrances of WebContents with TabContents.brettw@chromium.org2009-05-041-30/+30
| | | | | | Review URL: http://codereview.chromium.org/99177 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15194 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land my change to clean up TabContents/WebContents ownership. Thisbrettw@chromium.org2009-04-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | is the same except in tab_strip_model_unittest I fixed a leak by making a WebContents on the stack, I added a factory to the SiteInstance unittest to prevent another leak, and I re-added a NULL set to the external_tab_container. Fix the ownership model of TabContents and NavigationController. Previously the NavigationController owned the TabContents, and there were extra steps required at creation and destruction to clean everything up properly. NavigationController is now a member of TabContents, and there is no setup or tear down necessary other than the constructor and destructor. I could remove the tab contents creation in the NavigationController, as well as all the weird destruction code in WebContents which got moved to the destructor. I made the controller getter return a reference since the ownership is clear and there is no possibility of NULL. This required changing a lot of tiles, but many of them were simplified since they no longer have to NULL check. Previous review URL: http://codereview.chromium.org/69043 Review URL: http://codereview.chromium.org/67294 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14053 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 14005.brettw@chromium.org2009-04-181-3/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14006 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the ownership model of TabContents and NavigationController. Previously thebrettw@chromium.org2009-04-181-3/+3
| | | | | | | | | | | | | | | | | NavigationController owned the TabContents, and there were extra steps required at creation and destruction to clean everything up properly. NavigationController is now a member of TabContents, and there is no setup or tear down necessary other than the constructor and destructor. I could remove the tab contents creation in the NavigationController, as well as all the weird destruction code in WebContents which got moved to the destructor. I made the controller getter return a reference since the ownership is clear and there is no possibility of NULL. This required changing a lot of tiles, but many of them were simplified since they no longer have to NULL check. Review URL: http://codereview.chromium.org/69043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14005 0039d316-1c4b-4281-b951-d872f2087c98
* Once you search for something in a tab, you are very likely to search for ↵finnur@chromium.org2009-04-131-1/+8
| | | | | | | | | | the same thing in another tab. Therefore, if you haven't searched for anything within that tab then Chrome should prepopulate the Find box with the last string you searched for (in any tab). BUG=876 TEST=Open google.com, Ctrl+F, search for 'e'. Open a new tab/new window/open a link in a new window. In all of those new tabs the Find box should be prepopulated with 'e' that is selected (for easy overwriting). Review URL: http://codereview.chromium.org/67066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13613 0039d316-1c4b-4281-b951-d872f2087c98
* Bug 2220 lists two cases where the inactive highlighting doesn't reappear on ↵finnur@chromium.org2009-04-021-4/+9
| | | | | | | | | | FindNext. This is a simple fix for one of those cases (user presses Refresh after Find). BUG=2220 TEST=Open google.com, press Find, press e, press Refresh, press F3 (or FindNext button in UI). Then make sure the inactive matches are highlighted (not just the active match). Review URL: http://codereview.chromium.org/56193 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13028 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing a few minor issues found during static analysis of the Chromium codebase.finnur@chromium.org2009-03-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | find_bar_controller.cc: Unused local variable created. hwnd_view.cc: The local definition of parent overshadows param passed in. google_update.cc: Uninitialized member variable. webframe_impl.cc: The if was overly constrained. At the top of the function there is an if (reset) { ... return; } so we don't need to check for !reset in the next if statement. This functionality is covered by a ui_test, which passes with this change. Review URL: http://codereview.chromium.org/42321 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11964 0039d316-1c4b-4281-b951-d872f2087c98
* Some work in refactoring FindBarWin/FindBarView sotc@google.com2009-03-121-0/+136
we can share code across platforms. See http://code.google.com/p/chromium/wiki/FindBarRefactoring for more information about the design. Review URL: http://codereview.chromium.org/42057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11544 0039d316-1c4b-4281-b951-d872f2087c98