summaryrefslogtreecommitdiffstats
path: root/chrome/browser/translate
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup: Remove unneeded includes of notification_service.h, part 2.thestig@chromium.org2010-12-171-1/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/5928003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69576 0039d316-1c4b-4281-b951-d872f2087c98
* Don't offer to translate the devtools.avi@chromium.org2010-12-172-4/+10
| | | | | | | | | BUG=63265 TEST=as in bug Review URL: http://codereview.chromium.org/6011001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69556 0039d316-1c4b-4281-b951-d872f2087c98
* Add a new GetInstance() method for singleton classes used in chrome/browser ↵satish@chromium.org2010-12-094-9/+17
| | | | | | | | | | | | | | | | files. This CL includes half of the files under chrome/browser using Singleton<T>. The rest of the files will be sent in a second CL. In one case I used a LazyInstance<T> instead of Singleton<T> as that was simpler and necessary since T was a typedef and can't add member functions to it. BUG=65298 TEST=all existing tests should continue to pass. Review URL: http://codereview.chromium.org/5519016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68723 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded browser_process.h includes.thestig@chromium.org2010-12-051-1/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/5512009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68323 0039d316-1c4b-4281-b951-d872f2087c98
* Move:ben@chromium.org2010-12-023-3/+3
| | | | | | | | | | | | | | | file_path_watcher into subdir profile* into profiles/ subdir login* into ui/login visitedlink* into subdir BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/5606002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68069 0039d316-1c4b-4281-b951-d872f2087c98
* Misc. cleanuppkasting@chromium.org2010-11-161-1/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/5034004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66326 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Include browser.h -> ui/browser.h [Part 1].jhawkins@chromium.org2010-11-161-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/5043001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66198 0039d316-1c4b-4281-b951-d872f2087c98
* Disable translate for FTP sites.jcivelli@chromium.org2010-11-112-2/+3
| | | | | | | | | | | | FTP sites tend to show long list of file names that can confuse the CLD. Don't translate them automatically. BUG=50173 TEST=Navigate to a ftp site that contains a text in a foreign language. Open that file in Chrome. No translation bar should be shown. Review URL: http://codereview.chromium.org/4596001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65841 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Update help URLs.derat@chromium.org2010-11-101-4/+16
| | | | | | | | | | | | This also moves some untranslatable URL strings out of .grd files and into code so we don't duplicate them per-language. BUG=chromium-os:8117 TEST=trybots; also built and ran the chrome os version Review URL: http://codereview.chromium.org/4495001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65683 0039d316-1c4b-4281-b951-d872f2087c98
* Split out command IDs from chrome_dll_resource.h.evan@chromium.org2010-11-082-2/+2
| | | | | | | | | | | | The name of this file is a leftover from Windows. Split the command ids (which are used on all platforms) out, leaving just the Windows-specific resource IDs in the original file. TEST=compiles Review URL: http://codereview.chromium.org/4710001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65453 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Even more ctor/virtual deinlining.erg@google.com2010-10-192-3/+11
| | | | | | | | | | | (Only 424k off Linux debug .a files). BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3859003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63059 0039d316-1c4b-4281-b951-d872f2087c98
* Move Stats, histograms, and field trial into a metrics subdirectory of base andbrettw@chromium.org2010-10-144-4/+4
| | | | | | | | | put them in the base namespace. TEST=it compiles BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62510 0039d316-1c4b-4281-b951-d872f2087c98
* base: Move SplitString functions into the base namespace and update the callers.tfarina@chromium.org2010-10-141-1/+1
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3750001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62483 0039d316-1c4b-4281-b951-d872f2087c98
* Replace Browser::AddTabWithURL(...) with:ben@chromium.org2010-10-051-4/+2
| | | | | | | | | | | | | | - Browser::AddSelectedTabWithURL(const GURL& url, PageTransition::Type transition) -> A good many callsites just wanted a way to open a tab somewhere and select it. - Browser::AddTabWithURL(AddTabWithURLParams* params) -> For the callsites with specialized needs, this new signature allows the parameter set to change as features are added without having to update a bunch of callers every time. BUG=none TEST=existing unit tests Review URL: http://codereview.chromium.org/3599006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61517 0039d316-1c4b-4281-b951-d872f2087c98
* Use PrefChangeRegistrar everywheredanno@chromium.org2010-09-293-14/+19
| | | | | | | | | | | BUG=54955 TEST=PrefChangeRegistrarTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=60169 Review URL: http://codereview.chromium.org/3304015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60935 0039d316-1c4b-4281-b951-d872f2087c98
* base: Finish moving the SplitString functions from string_util.h to ↵tfarina@chromium.org2010-09-241-0/+1
| | | | | | | | | | | string_split.h BUG=None TEST=trybos Review URL: http://codereview.chromium.org/3447008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60422 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 60169 - Use PrefChangeRegistrar everywheredanno@chromium.org2010-09-223-19/+14
| | | | | | | | | | | BUG=54955 TEST=PrefChangeRegistrarTest.* Review URL: http://codereview.chromium.org/3304015 TBR=danno@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60170 0039d316-1c4b-4281-b951-d872f2087c98
* Use PrefChangeRegistrar everywheredanno@chromium.org2010-09-223-14/+19
| | | | | | | | | BUG=54955 TEST=PrefChangeRegistrarTest.* Review URL: http://codereview.chromium.org/3304015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60169 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crasher with autofill infobar.jcivelli@chromium.org2010-09-211-10/+4
| | | | | | | | | | | The "save credit card" information was deleted by the AutofillManager when the form is submitted but was still pointed to by the TabContents, causing a crasher when navigating. BUG=50428 TEST=See steps in 56238. Review URL: http://codereview.chromium.org/3466006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60095 0039d316-1c4b-4281-b951-d872f2087c98
* Moves TabStripModelObserver/Delegate into their own headers.sky@chromium.org2010-09-161-0/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3425009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59733 0039d316-1c4b-4281-b951-d872f2087c98
* Relanding this:jcivelli@chromium.org2010-09-071-68/+54
| | | | | | | | | | | | | | | Don't create pending entries when a navigation is initiated by the page. If the page reloads while such a navigation happens, we could end up with the wrong pending entry. Also make sure TestTabContents::NavigateAndCommit() does commit on the right RVH. BUG=51680 TEST=See bug for steps. TBR=creis Review URL: http://codereview.chromium.org/3257002 Review URL: http://codereview.chromium.org/3346005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58701 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Don't create pending entries when a navigation is initiated by the ↵phajdan.jr@chromium.org2010-09-021-54/+68
| | | | | | | | | | page." TBR=jcivelli Review URL: http://codereview.chromium.org/3360003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58289 0039d316-1c4b-4281-b951-d872f2087c98
* Don't create pending entries when a navigation is initiated by the page.jcivelli@chromium.org2010-09-011-68/+54
| | | | | | | | | | | | If the page reloads while such a navigation happens, we could end up with the wrong pending entry. Also make sure TestTabContents::NavigateAndCommit() does commit on the right RVH. BUG=51680 TEST=See bug for steps. Review URL: http://codereview.chromium.org/3257002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58261 0039d316-1c4b-4281-b951-d872f2087c98
* Bandaid around a weird crasher were we end up with a NULL infobar.jcivelli@chromium.org2010-09-011-4/+10
| | | | | | | | | BUG=53979 TEST=None (wish I knew how to repro...) Review URL: http://codereview.chromium.org/3341004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58257 0039d316-1c4b-4281-b951-d872f2087c98
* Add --disable-translate to help Selenium/WebDriver dudes make Chromejrg@chromium.org2010-08-271-0/+7
| | | | | | | | | | | | | | more predictable for automated testing. BUG=none TEST=Launch Chrome. Go to http://www.diplomatie.gouv.fr/fr/ See translate info bar? Good. Now launch Chrome with --disable-translate and go to that page again. Make sure translate info bar never shows up. Review URL: http://codereview.chromium.org/3117044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57620 0039d316-1c4b-4281-b951-d872f2087c98
* Move prefs-related files under chrome/browser/ into a prefs/ subdir.evan@chromium.org2010-08-263-4/+4
| | | | | | | | | | | | Rename includes, resort header include order in places where the rename changed the order. BUG=50548 TEST=compiles Review URL: http://codereview.chromium.org/3203008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57434 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Minor cleanup to testing headers.erg@google.com2010-08-251-0/+2
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3136014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57345 0039d316-1c4b-4281-b951-d872f2087c98
* Ensures we don't let users translate pages that are in an unsupported ↵jcivelli@chromium.org2010-08-182-1/+16
| | | | | | | | | | | | | | language by disabling the context menu in such cases. It is OK to translate pages for which the language is unknown, as we let the server detect the language in such cases. BUG=48635 TEST=Not sure how to repro without hacking the code. You need a page in a language that the CLD detects but that Chrome does not support for translation. Review URL: http://codereview.chromium.org/3142015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56534 0039d316-1c4b-4281-b951-d872f2087c98
* Don't show the extra "Always/never translate" buttons on the "before ↵jcivelli@chromium.org2010-08-172-11/+33
| | | | | | | | | | | translate" infobar when in Incognito mode. BUG=52305 TEST=See bug. Review URL: http://codereview.chromium.org/3164016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56367 0039d316-1c4b-4281-b951-d872f2087c98
* Remove deprecated wstring DictionaryValue ↵viettrungluu@chromium.org2010-08-171-11/+10
| | | | | | | | | | | Get{Boolean,Integer,Real,Binary,Dictionary,List}(). BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3187004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56302 0039d316-1c4b-4281-b951-d872f2087c98
* Remove deprecated wstring Get(As)String() methods from Value, etc.viettrungluu@chromium.org2010-08-161-3/+2
| | | | | | | | | BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3117017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56187 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove "obviously" unneeded standard C++ library #includes.viettrungluu@chromium.org2010-08-151-1/+0
| | | | | | | | | BUG=none TEST=builds Review URL: http://codereview.chromium.org/3179017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56171 0039d316-1c4b-4281-b951-d872f2087c98
* Sites like Google Maps may trigger navigations when the user interacts with ↵jcivelli@chromium.org2010-08-132-1/+35
| | | | | | | | | | | | | the page. In such cases, we shouldn't show a new translate infobar offering to translate the page if the user already declined translation on that page. BUG=48215 TEST=See bug for URL and steps. Review URL: http://codereview.chromium.org/3183001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56072 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Forward declare everything possible in testing_profile.herg@google.com2010-08-131-0/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3129007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56053 0039d316-1c4b-4281-b951-d872f2087c98
* Clone of issue 2941001. See initial review below.twiz@google.com2010-08-121-1/+2
| | | | | | | | | | | | | | http://codereview.chromium.org/2941001 Initial submit broke the chromeos build. This patch includes the original change, and fixes to compile ChromeOs properly. BUG=None TEST=None Review URL: http://codereview.chromium.org/2819086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55951 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Translate bar crashersfeldstein@chromium.org2010-08-122-0/+5
| | | | | | | | | | | | | | | | | Disable the options menu divider so we don't fire an invalid command. the translate bar was crashing when you would use the context menu to translate a page with an unknown language. It was trying to instantiate an options menu model when it didn't need one, or have a language to populate it with. This makes it so the options menu model is not instantiated unless it needs it, and it only needs it when it actually knows the language. BUG=47303 TEST=see bug. Review URL: http://codereview.chromium.org/3080035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55947 0039d316-1c4b-4281-b951-d872f2087c98
* Don't show preference related menus in the translate infobar in incognito mode.jcivelli@chromium.org2010-08-111-11/+15
| | | | | | | | | | BUG=51214 TEST=Navigate in a non incognito window to www.google.de. The translate infobar should show. The options menu should have options to always/never translate german. Navigate again to that page but from an incognito window, the options menu in the translate infobar should not have any preference (always/never translate) related items. Review URL: http://codereview.chromium.org/3073025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55777 0039d316-1c4b-4281-b951-d872f2087c98
* Make prefs use std::string for keys rather than wstrings.viettrungluu@chromium.org2010-08-114-25/+24
| | | | | | | | | | | Much remains to be converted. BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3076037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55660 0039d316-1c4b-4281-b951-d872f2087c98
* Minor header cleanup of chrome/browser/[st]*/*.h minus c/b/sync/*.h.viettrungluu@chromium.org2010-08-062-2/+0
| | | | | | | | | | | | - Remove unnecessary forward decls. - Remove unnecessary inclusions of <set>, <map>, <vector>, <list>. BUG=none TEST=builds Review URL: http://codereview.chromium.org/3023043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55222 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-267-0/+7
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Few TranslateManager changes:jcivelli@chromium.org2010-07-223-22/+50
| | | | | | | | | | | | | - Always show a "translating..." infobar when initiating a translation from the context menu, or when the translation is automatic (always translate option). It does not make sense not to show one, as translation may take several seconds and no having any feedback during that time is confusing (also this is what translate in toolbar does). - Don't enable the translate context menu until we get the page language. This is an effort to ensure the translate infobar delegate always get an original language. - Makes the translate manager deals correctly with unknown languages to avoid a crasher (bug 49018) BUG=49018 TEST=See bug. And also, start a translation from the context menu, while the page is being translated a "translating..." infobar should be shown. Also, tests that when a language was selected for "always translate", navigating to a page in that language triggers a "translating..." infobar. Review URL: http://codereview.chromium.org/3026002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53384 0039d316-1c4b-4281-b951-d872f2087c98
* Makes the browser fetch the translate script regularly.jcivelli@chromium.org2010-07-215-42/+107
| | | | | | | | | | | | | | New versions of that script may get pushed from time to time. Fetching the script again ensures people that don't restart their browser for long periods of time still get the new versions. Also renamed the enum from constant style to macro-style, as it is the Chromium way to go from the Chromium style guide (which is in that regard different than the Google style guide). BUG=None TEST=Run the unit-tests. Review URL: http://codereview.chromium.org/3034013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53220 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 53016 - Makes the browser fetch the translate script regularly.jcivelli@chromium.org2010-07-205-107/+42
| | | | | | | | | | | | | | | | | | | | New versions of that script may get pushed from time to time. Fetching the script again ensures people that don't restart their browser for long periods of time still get the new versions. Also renamed the enum from constant style to macro-style, as it is the Chromium way to go from the Chromium style guide (which is in that regard different than the Google style guide). BUG=None TEST=Run the unit-tests. Original review: http://codereview.chromium.org/3034013/show Review URL: http://codereview.chromium.org/3041010 TBR=jcivelli@chromium.org Review URL: http://codereview.chromium.org/2881024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53019 0039d316-1c4b-4281-b951-d872f2087c98
* Makes the browser fetch the translate script regularly.jcivelli@chromium.org2010-07-205-42/+107
| | | | | | | | | | | | | | | | | New versions of that script may get pushed from time to time. Fetching the script again ensures people that don't restart their browser for long periods of time still get the new versions. Also renamed the enum from constant style to macro-style, as it is the Chromium way to go from the Chromium style guide (which is in that regard different than the Google style guide). BUG=None TEST=Run the unit-tests. Original review: http://codereview.chromium.org/3034013/show Review URL: http://codereview.chromium.org/3041010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53016 0039d316-1c4b-4281-b951-d872f2087c98
* When Chrome translates a page, the translate server might detect that the ↵jcivelli@chromium.org2010-07-193-7/+57
| | | | | | | | | | | | | | page is in a different language than the one Chrome detected. If that language is not in the list of languages that Chrome supports for translation, then we do not know what to show and we were crashing. This CL makes it so that we show an error infobar instead. Note that in the future we should improve the "after translate" infobar to support showing the original language as unknown. (http://crbug.com/9390) BUG=48918 TEST=Not sure how to test without changing the code. Review URL: http://codereview.chromium.org/3011008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52876 0039d316-1c4b-4281-b951-d872f2087c98
* Google translate supports some new languages, makes Chrome aware of them. ↵jcivelli@chromium.org2010-07-182-5/+11
| | | | | | | | | | | | | | That way the translation feature works with them. BUG=None TEST=Visit pages in the new alpha languages (see http://translate.google.com/about/intl/en_ALL/). Make sure the pages can be translated. Original review: http://codereview.chromium.org/3013010 Review URL: http://codereview.chromium.org/3024005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52843 0039d316-1c4b-4281-b951-d872f2087c98
* Adding a way for user to report errors in language detectionjcivelli@chromium.org2010-07-165-1/+58
| | | | | | | | | | Adding a menu to the translate infobar that let users report when the language of a page has been incorrectly detected. BUG=48739 TEST=Visit a page in a language that triggers the translate infobar. Select the menu to report an error. A new tab should be opened that references the page and language and let you report the error. Review URL: http://codereview.chromium.org/2911005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52683 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt four at landing the "histogram.h removed from message_loop.h" patch.erg@chromium.org2010-07-151-0/+1
| | | | | | | | | | | | | | Previously committed as r52349 and r52336. Related commits: r52367, r52364 and r52343. Rerunning trybots due to previous trybot breakage. TEST=none BUG=none Review URL: http://codereview.chromium.org/2965015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52496 0039d316-1c4b-4281-b951-d872f2087c98
* Revert everything related to the relanding.erg@chromium.org2010-07-141-1/+0
| | | | | | Review URL: http://codereview.chromium.org/2982009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52367 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r52336.erg@chromium.org2010-07-141-0/+1
| | | | | | | | | | | | | | (I accidentally committed a previous version of the patch (the fixed version was in codereview since I had switched to my mac to address this exact compile failure.) BUG=none TEST=none TBR=evan Review URL: http://codereview.chromium.org/2937010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52349 0039d316-1c4b-4281-b951-d872f2087c98