Simplify the translate infobar code some.
The primary change here is to take LanguagesMenuModel, which was used by views, unused by GTK, and only "used" by Cocoa to get the appropriate language names for a menu (which can be done by calling functions on the TranslateInfobarDelegate directly), and make it truly views-specific.
In turn this means we can get rid of the TranslateInfoBarView class, which was only ever used by views even though all platforms included it. Instead, the SetOriginalLanguage() and SetTargetLanguage() functions on the infobar delegate now become simple setters, and each platform calls Translate() as a followup directly where appropriate. (This split was necessary because views needed to maintain the current calling order, where the delegate updates the language index, then the infobar updates the button text, then Translate() is called.)
Along the way we also make a number of delegate functions unix_hacker()-style inline getters/setters, and remove some unnecessary "virtual" declarations on functions never overridden. Finally there are a bunch of other small code simplifications.
BUG=100840
TEST=none
Review URL: https://codereview.chromium.org/10952016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157889 0039d316-1c4b-4281-b951-d872f2087c98
25 files changed