summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/find_bar_view.cc
Commit message (Collapse)AuthorAgeFilesLines
* Make Textfield more portable.ben@chromium.org2009-05-281-5/+5
| | | | | | | | | | | | | Split off Windows bits into NativeTextfieldWin class obscured behind NativeTextfieldWrapper interface. The APIs aren't perfectly tidy yet but this is a good first pass. BUG=none TEST=make sure you can still edit text fields, run the view unit tests. Review URL: http://codereview.chromium.org/113940 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17112 0039d316-1c4b-4281-b951-d872f2087c98
* Move text_field.cc and rename the class to Textfield in preparation for porting.ben@chromium.org2009-05-271-10/+10
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/115825 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17014 0039d316-1c4b-4281-b951-d872f2087c98
* Makes FindBarWin buildable on linux. FindBarWin should be renamed tosky@chromium.org2009-05-231-7/+7
| | | | | | | | | | | FindBarViews, but I'm leaving it as is for now. BUG=none TEST=none Review URL: http://codereview.chromium.org/113793 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16830 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug 12468 where F3 (FindNext) in a brand new tab was not using ↵finnur@chromium.org2009-05-221-3/+6
| | | | | | | | | | | prepopulated search (what you have searched for in other tabs). TEST=Covered by in-process-browser test now. To test manually: open a tab, search for something in FindInPage, Press Ctrl+T and then F3. It should search for the same thing in the newly opened tab. BUG=12468 Review URL: http://codereview.chromium.org/115714 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16786 0039d316-1c4b-4281-b951-d872f2087c98
* Theme the find bar.glen@chromium.org2009-05-211-40/+27
| | | | | | | | | | The image resources are additional, as we don't want to mess with Linux. BUG=11702 Review URL: http://codereview.chromium.org/115613 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16647 0039d316-1c4b-4281-b951-d872f2087c98
* Try to make TextField::Controller implementors cross-platform by abstractingbrettw@chromium.org2009-05-211-15/+13
| | | | | | | | | | | | | | away the keystroke message that is passed. It turns out implementoars only ever check for enter and escape messages, so I wrote two functions in TextField that will decode the new Keyboard event. This design is not optimal. Ideally we would have something more like the WebInputEvent so that callers can check for anything in a cross-platform way. This was branched off from the original review: http://codereview.chromium.org/113639 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16577 0039d316-1c4b-4281-b951-d872f2087c98
* ChromeCanvas->gfx::Canvasben@chromium.org2009-05-151-2/+2
| | | | | | | | | | | Rename files too. TBR=brettw http://crbug.com/11387 Review URL: http://codereview.chromium.org/113443 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16148 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-22/+6
| | | | | | | | | | | | | | | | 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
* This CL updates chrome to the latest version of skia, retrieved via DEPS, andsenorblanco@chromium.org2009-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | placed in third_party. All relevant skia changes (for all 3 platforms) have been upstreamed. Most of this CL is mind-numbingly repetitive. Things of interest are: skia.gyp (now points at third_party versions), DEPS, and SkUserConfig.h. stdint.h: Skia now requires C99 integer types, which MSVC doesn't support natively. I have put typedefs in config/win/stdint.h. Note that the new version of skia appears to render rects whose coordinates are "backwards" (ie., x2 < x1 or y2 < y1), which were formerly culled. There were a couple obvious instances of this in the code which I fixed, but there may be more. There were ~35 layout test failures due to minor pixel differences which I rebaselined on Windows and Linux, and 8 genuine failures related to masks and stroked text, which I have put in text_expectations.txt and assigned to myself. (There was another change which broke ~1700 tests on each platform, but I put that change behind an #ifdef for now). R=brettw Review URL: http://codereview.chromium.org/65012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15949 0039d316-1c4b-4281-b951-d872f2087c98
* Move src/chrome/views to src/views. RS=darin http://crbug.com/11387ben@chromium.org2009-05-081-3/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15604 0039d316-1c4b-4281-b951-d872f2087c98
* Move chrome_canvas to app/gfxben@chromium.org2009-05-061-1/+1
| | | | | | | | http://crbug.com/11387 Review URL: http://codereview.chromium.org/113011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15361 0039d316-1c4b-4281-b951-d872f2087c98
* Move l10n_util to app/ben@chromium.org2009-05-051-1/+1
| | | | | | | http://crbug.com/11387 Review URL: http://codereview.chromium.org/109043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15352 0039d316-1c4b-4281-b951-d872f2087c98
* FindBarView::UpdateForResult is not a good place to finnur@chromium.org2009-05-051-1/+0
| | | | | | | | | | | | | | | | | 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
* Adds toplevel app/ directory and moves ResourceBundle into it.ben@chromium.org2009-05-051-1/+1
| | | | | | | | | | | No changes to resource bundle yet, just the move to keep this CL as compact as possible. Adds new vcproj and gyp file for app dir. http://crbug.com/11387 Review URL: http://codereview.chromium.org/100354 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15264 0039d316-1c4b-4281-b951-d872f2087c98
* Replace all occurrances of WebContents with TabContents.brettw@chromium.org2009-05-041-8/+8
| | | | | | Review URL: http://codereview.chromium.org/99177 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15194 0039d316-1c4b-4281-b951-d872f2087c98
* A fix for the Find box forwarding scroll messages to the page when it shouldn't.finnur@chromium.org2009-04-141-14/+6
| | | | | | | | TEST=Open Find on a page with scrollbars, type in 'nomatch', scroll to the middle of the page, set the cursor at the end of the Find text field and add '!', '(' and ')' to the search string. Make sure the page doesn't scroll. BUG=10509 Review URL: http://codereview.chromium.org/67135 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13696 0039d316-1c4b-4281-b951-d872f2087c98
* Find window keyboard forwarding, part 2.finnur@chromium.org2009-04-091-0/+5
| | | | | | | | | Also prevent Ctrl+Home and Ctrl+End from being eaten by the Find window. Review URL: http://codereview.chromium.org/62180 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13446 0039d316-1c4b-4281-b951-d872f2087c98
* When the Find bar has focus it eats keypresses such as PageUp, PageDown and ↵finnur@chromium.org2009-04-081-2/+13
| | | | | | | | | | | | | | | Up and Down arrow keys. It doesn't need to - instead the page should scroll even if focus is on the Find bar. This patch forwards those selected keypresses to the page for its perusal. Known issues: Just like Firefox, the page doesn't scroll if it has frames. SONG=I like to fixit fixit. I like to fixit fixit. BUG=7079 TEST=Open FindInPage on a webpage that has a vertical scrollbar. Press Down, Up, PageDown and PageUp and the page should scroll accordingly. Make sure no ding is heard while doing so. Also make sure this works if focus is on a textfield/textarea when you press Ctrl+F. Review URL: http://codereview.chromium.org/62129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13389 0039d316-1c4b-4281-b951-d872f2087c98
* Ensure the previous/next button don't get focused when clicked.jcampan@chromium.org2009-04-081-0/+5
| | | | | | | | | | We keep the button focusable so they can be tab traversed. BUG=9772 TEST=See bug Review URL: http://codereview.chromium.org/62144 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13364 0039d316-1c4b-4281-b951-d872f2087c98
* Moving the Find bar ownership to the Browser object for portability and ↵finnur@chromium.org2009-04-051-5/+5
| | | | | | | | testability purposes.BUG=None.TEST=No new functionality, just moving stuff around and as such it is covered by pre-existing tests. Review URL: http://codereview.chromium.org/60105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13134 0039d316-1c4b-4281-b951-d872f2087c98
* Move controls into their own dir under chrome/views/controlsben@chromium.org2009-03-171-2/+2
| | | | | | | | TBR=sky Review URL: http://codereview.chromium.org/48058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11841 0039d316-1c4b-4281-b951-d872f2087c98
* Rework the Button API to be saner in preparation for NativeControl ↵ben@chromium.org2009-03-161-19/+20
| | | | | | | | rejiggering.BaseButton->Button, CustomButtonButton->ImageButtonToggleButton->ToggleImageButtonRemoving SetListener (buttons take listener through ctor)Tidy up source files. No functionality changes, just naming and organization.Look at the button classes first, then everything else. Review URL: http://codereview.chromium.org/46096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11799 0039d316-1c4b-4281-b951-d872f2087c98
* Some work in refactoring FindBarWin/FindBarView sotc@google.com2009-03-121-13/+12
| | | | | | | | | | | 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
* Fixing two small regressions in the Find box:finnur@chromium.org2009-03-061-3/+11
| | | | | | | | | | | | 1) If the Find textfield is populated when the Find box is shown, the FindPrevious and FindNext buttons should also be enabled. (issue 8369) 2) If you search for something that is not on the page, you get "0 of 0" in red. Press Esc and Ctrl+F and the label is gone but the red background color for the label remains (no bug on file, found during testing). BUG=8369 TEST=Open about:blank in Chrome. Press Ctrl+F, search for 'e' (get 0 of 0), close the Find box, reopen the Find box. Observe 'e' is in box, it is highlighted and no red is visible. Also, FindPrevious and FindNext buttons should be enabled. Review URL: http://codereview.chromium.org/39233 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11063 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing crash in StartFinding (2nd attempt).finnur@google.com2009-02-261-4/+6
| | | | | | | | | | | | | | | | | | | | The first attempt to fix this was unsuccessful and crashes showed up again during the automated ui testing. I still can't reproduce locally, but when I look again at the crash dump I think that the fact that it looked like the FindBarView was destroyed is misleading and the real issue is the same as with the crash in StopFinding (that web_contents has been destroyed moments before we receive the request). I am therefore removing the code I added earlier and replacing it with a null check for web_contents. TEST=Covered by automated ui tests. BUG=8048 Review URL: http://codereview.chromium.org/27219 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10489 0039d316-1c4b-4281-b951-d872f2087c98
* We can get into a state where the automation framework sends a search ↵finnur@google.com2009-02-261-0/+4
| | | | | | | | | | | | string, which ends up in a handler in the FindBarView that has already been destroyed, causing a crash. We now explicitly null the controller for the text field when destroying the view so that if it is still receiving messages they will be ignored by the view. (I can't reproduce this bug manually or by running the automation testing locally, but this is an attempt to fix the crash by using the information gathered from looking at the crash dump). Review URL: http://codereview.chromium.org/27172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10413 0039d316-1c4b-4281-b951-d872f2087c98
* The find bar should be owned and managed from the BrowserView, not the ↵finnur@google.com2009-02-241-76/+73
| | | | | | | | | | | | | | | | | | | | | | | | WebContentsView, since it's part of the "chrome". Design Doc: http://dev.chromium.org/developers/design-documents/find-bar Things done: - Pulled all of the find bar stuff out of WebContentsView* since it's no longer needed. - Moved OnFindReply delegate method from RenderViewHostDelegate::View to RenderViewHostDelegate, since it's no longer implemented on the view. - Moved find control methods to WebContents. - Added recent find result state to WebContents. - Updated the UI tests to accommodate the changes in the state that is broadcast when results are discovered. - Updated the find bar layout to obtain its bounding box from the BrowserView, which knows about toolbars, bookmark bars etc. - Updated the find bar itself to handle the fact that it can be displayed for multiple different tabs. - Moved the find bar manipulation methods for testing from TabProxy to BrowserProxy, since the find bar is now a feature of the window, not the tab. - view.h: Don't lay out child views again if they have a layout manager, it already updated them. TEST=Find box should work as before. BUG=3245 Review URL: http://codereview.chromium.org/27025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10231 0039d316-1c4b-4281-b951-d872f2087c98
* Update include paths for grit files. Go ahead and resorttc@google.com2009-02-221-3/+2
| | | | | | | | the headers too. Review URL: http://codereview.chromium.org/21472 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10167 0039d316-1c4b-4281-b951-d872f2087c98
* Second try of landing chrome_resources project. Changes from last time:tc@google.com2009-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | - fix scons dependencies by adding a target for grit/theme_resources.h - fix mac build by adding grit to unittest include path - fix check deps by adding rules for /grit dir. Create a chrome_resources.vcproj that holds grd files that hold non-string resources. Put browser_resources.grd into this vcproj. Port theme_resources.rc/theme_resources.h to theme_resources.grd and put it in the vcproj too. I did a find/replace on the theme_resources include line. Modify grit so header files go in grit_generated_resources/grit/ so the include path can be cleaner. I'll migrate the others in follow up patches. theme_resources.rc had a conditional include of distribution_resources.rc so I had to add support for preprocessor defines to visual studio. Review URL: http://codereview.chromium.org/24011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9664 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Create a chrome_resources.vcproj that holds grd files that hold"tc@google.com2009-02-121-1/+1
| | | | | | | | | | This reverts commit r9631. TBR=deanm Review URL: http://codereview.chromium.org/23023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9634 0039d316-1c4b-4281-b951-d872f2087c98
* Create a chrome_resources.vcproj that holds grd files that holdtc@google.com2009-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | non-string resources. Put browser_resources.grd into this vcproj. Port theme_resources.rc/theme_resources.h to theme_resources.grd and put it in the vcproj too. I did a find/replace on the theme_resources include line. Modify grit so header files go in grit_generated_resources/grit/ so the include path can be cleaner. I'll migrate the others in follow up patches. theme_resources.rc had a conditional include of distribution_resources.rc so I had to add support for preprocessor defines to visual studio. Review URL: http://codereview.chromium.org/20247 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9631 0039d316-1c4b-4281-b951-d872f2087c98
* Fix regression with Find in page focus on trunk. finnur@google.com2008-12-101-0/+2
| | | | | | | | | | | | Basically, if the Find box is open, pressing Ctrl+F should set focus to the text field. This regressed when the Find box moved into web_contents_view. I have added a UI test to catch this in the future. Review URL: http://codereview.chromium.org/13721 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6748 0039d316-1c4b-4281-b951-d872f2087c98
* Rename Container->Widgetben@chromium.org2008-11-211-1/+1
| | | | | | | | | R=erg review url = http://codereview.chromium.org/11348/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5849 0039d316-1c4b-4281-b951-d872f2087c98
* Make border and background setting and getting non-virtual and use the ↵brettw@google.com2008-11-141-2/+2
| | | | | | | | correct style. I was debugging in here and this was annoying me, since there is no reason for these functions to be virtual. Review URL: http://codereview.chromium.org/10638 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5445 0039d316-1c4b-4281-b951-d872f2087c98
* Factor find in page out of WebContents and into the view, since it is almostbrettw@google.com2008-10-211-0/+493
all view specific. Rename find in page controller to be "FindBarWin", and find in page view to be "findBarView" (since this is not Windows specific, but "Views" specific). I did lots of simplification and moving around of the find in page API. I coalesced several of the show functions into one master function on the view. I removed some other sizing and window updating code from WebContents and moved it to the view. Review URL: http://codereview.chromium.org/7667 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3654 0039d316-1c4b-4281-b951-d872f2087c98