Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Issue 133273029: Move LanguageState to the translate component (Closed)

Created:
6 years, 11 months ago by droger
Modified:
6 years, 11 months ago
CC:
chromium-reviews, Avi (use Gerrit), creis+watch_chromium.org, jam, joi+watch-content_chromium.org, darin-cc_chromium.org, ajwong+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Move LanguageState to the translate component This CL introduces the TranslateDriver and a content implementation of it (ContentTranslateDriver), and moves LanguageState to the translate component. LanguageState gets information from the content driver through the TranslateDriver API. BUG=335092 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=246023

Patch Set 1 : . #

Total comments: 12

Patch Set 2 : Review comments #

Total comments: 6

Patch Set 3 : Review comments + fix compilation #

Patch Set 4 : Fix more compile issues #

Total comments: 10

Patch Set 5 : Review comments #

Patch Set 6 : Update BUILD.gn #

Total comments: 1

Patch Set 7 : Review comment + rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+320 lines, -657 lines) Patch
M chrome/browser/DEPS View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_api.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/policy/policy_browsertest.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
D chrome/browser/tab_contents/language_state.h View 1 chunk +0 lines, -137 lines 0 comments Download
D chrome/browser/tab_contents/language_state.cc View 1 chunk +0 lines, -130 lines 0 comments Download
D chrome/browser/tab_contents/language_state_observer.h View 1 chunk +0 lines, -25 lines 0 comments Download
D chrome/browser/tab_contents/language_state_unittest.cc View 1 chunk +0 lines, -117 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/translate/translate_infobar_delegate.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/translate/translate_manager.cc View 12 chunks +12 lines, -12 lines 0 comments Download
M chrome/browser/translate/translate_manager_browsertest.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/translate/translate_tab_helper.h View 1 2 3 4 3 chunks +9 lines, -5 lines 0 comments Download
M chrome/browser/translate/translate_tab_helper.cc View 1 2 3 4 3 chunks +10 lines, -6 lines 0 comments Download
M chrome/browser/translate/translate_ui_delegate.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/browser.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/browser_browsertest.cc View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/browser_commands.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
A + chrome/browser/ui/browser_content_translate_driver_observer.h View 1 2 3 4 1 chunk +13 lines, -12 lines 0 comments Download
A + chrome/browser/ui/browser_content_translate_driver_observer.cc View 1 2 3 4 1 chunk +9 lines, -8 lines 0 comments Download
D chrome/browser/ui/browser_language_state_observer.h View 1 2 3 4 1 chunk +0 lines, -34 lines 0 comments Download
D chrome/browser/ui/browser_language_state_observer.cc View 1 2 3 4 1 chunk +0 lines, -35 lines 0 comments Download
M chrome/browser/ui/translate/translate_bubble_model_impl.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/translate/translate_bubble_view.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 2 chunks +1 line, -3 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 2 chunks +0 lines, -2 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M components/translate.gypi View 1 2 3 4 2 chunks +25 lines, -0 lines 0 comments Download
A + components/translate/content/DEPS View 1 0 chunks +-1 lines, --1 lines 0 comments Download
A + components/translate/content/browser/DEPS View 0 chunks +-1 lines, --1 lines 0 comments Download
A components/translate/content/browser/content_translate_driver.h View 1 2 3 4 5 6 1 chunk +62 lines, -0 lines 0 comments Download
A components/translate/content/browser/content_translate_driver.cc View 1 2 3 4 1 chunk +53 lines, -0 lines 0 comments Download
A + components/translate/core/browser/language_state.h View 1 2 3 4 5 chunks +17 lines, -30 lines 0 comments Download
A + components/translate/core/browser/language_state.cc View 1 4 chunks +16 lines, -34 lines 0 comments Download
A + components/translate/core/browser/language_state_unittest.cc View 1 3 chunks +34 lines, -37 lines 0 comments Download
A components/translate/core/browser/translate_driver.h View 1 1 chunk +23 lines, -0 lines 0 comments Download
M tools/gn/secondary/components/translate/BUILD.gn View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
droger
6 years, 11 months ago (2014-01-17 14:39:57 UTC) #1
blundell
Mostly nits The new interface/impl should be TranslateDriver and ContentTranslateDriver. The Client naming is for ...
6 years, 11 months ago (2014-01-17 15:09:38 UTC) #2
droger
Thanks, I applied the comments. https://codereview.chromium.org/133273029/diff/30003/components/translate/content/browser/DEPS File components/translate/content/browser/DEPS (right): https://codereview.chromium.org/133273029/diff/30003/components/translate/content/browser/DEPS#newcode2 components/translate/content/browser/DEPS:2: "+content/public/browser", On 2014/01/17 15:09:39, ...
6 years, 11 months ago (2014-01-17 16:14:20 UTC) #3
blundell
I'm going to do one more pass on Monday, but adding mad@ now for his ...
6 years, 11 months ago (2014-01-17 16:37:35 UTC) #4
droger
https://codereview.chromium.org/133273029/diff/150001/chrome/browser/translate/translate_tab_helper.h File chrome/browser/translate/translate_tab_helper.h (right): https://codereview.chromium.org/133273029/diff/150001/chrome/browser/translate/translate_tab_helper.h#newcode22 chrome/browser/translate/translate_tab_helper.h:22: // Information about the language the page is in ...
6 years, 11 months ago (2014-01-20 10:37:06 UTC) #5
blundell
LGTM with naming decision deferred to MAD https://codereview.chromium.org/133273029/diff/300004/chrome/browser/translate/translate_tab_helper.cc File chrome/browser/translate/translate_tab_helper.cc (right): https://codereview.chromium.org/133273029/diff/300004/chrome/browser/translate/translate_tab_helper.cc#newcode30 chrome/browser/translate/translate_tab_helper.cc:30: ContentTranslateDriver* TranslateTabHelper::GetTranslateDriver() ...
6 years, 11 months ago (2014-01-20 14:22:53 UTC) #6
MAD
I agree with the observer name/location change... And I have a few extra nits... Thanks! ...
6 years, 11 months ago (2014-01-20 16:12:24 UTC) #7
droger
Thanks for the review, I applied the comments. https://codereview.chromium.org/133273029/diff/300004/components/translate/core/browser/language_state.h File components/translate/core/browser/language_state.h (right): https://codereview.chromium.org/133273029/diff/300004/components/translate/core/browser/language_state.h#newcode25 components/translate/core/browser/language_state.h:25: LanguageState(TranslateDriver* ...
6 years, 11 months ago (2014-01-20 17:05:04 UTC) #8
MAD
LGTM with one final nit... Thanks again! BYE MAD https://codereview.chromium.org/133273029/diff/540002/components/translate/content/browser/content_translate_driver.h File components/translate/content/browser/content_translate_driver.h (right): https://codereview.chromium.org/133273029/diff/540002/components/translate/content/browser/content_translate_driver.h#newcode41 components/translate/content/browser/content_translate_driver.h:41: ...
6 years, 11 months ago (2014-01-20 21:47:35 UTC) #9
droger
+joi as OWNER for: - DEPS for content additions in -- components/translate/content/browser/DEPS -- components/translate/content/DEPS - ...
6 years, 11 months ago (2014-01-21 09:56:51 UTC) #10
droger
On 2014/01/21 09:56:51, droger wrote: > + jochen as OWNER for: > (should be only ...
6 years, 11 months ago (2014-01-21 10:01:06 UTC) #11
Jói
My bits LGTM.
6 years, 11 months ago (2014-01-21 10:16:38 UTC) #12
jochen (gone - plz use gerrit)
lgtm
6 years, 11 months ago (2014-01-21 10:20:17 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/droger@chromium.org/133273029/1010001
6 years, 11 months ago (2014-01-21 10:21:40 UTC) #14
commit-bot: I haz the power
6 years, 11 months ago (2014-01-21 12:38:30 UTC) #15
Message was sent while issue was closed.
Change committed as 246023

Powered by Google App Engine
This is Rietveld 408576698