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

Issue 9479008: Re-factor location bar/toolbar code to get rid of the browser dependency. (Closed)

Created:
8 years, 9 months ago by altimofeev
Modified:
8 years, 9 months ago
CC:
chromium-reviews, nkostylev+watch_chromium.org, dcheng, tfarina
Visibility:
Public.

Description

Re-factor location bar/toolbar code to get rid of the browser dependency. This CL is needed to allow code reusing by captive portal view, which will show web content using DomView. BUG=chromium-os:22630 TEST=browser_tests,unit_tests works Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=126959 Reverted because of a misprint which was hidden by overloaded method (ExecuteCommand): http://codereview.chromium.org/9703099/ Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=127145

Patch Set 1 #

Patch Set 2 : for test #

Patch Set 3 : for test #

Patch Set 4 : cache browser #

Patch Set 5 : working #

Patch Set 6 : only refactoring #

Patch Set 7 : only refactoring #

Patch Set 8 : win fix #

Total comments: 6

Patch Set 9 : code review #

Patch Set 10 : nits #

Patch Set 11 : nits #

Patch Set 12 : nits #

Patch Set 13 : override fix #

Patch Set 14 : compile fix #

Patch Set 15 : fixes #

Patch Set 16 : fixes #

Patch Set 17 : fixes #

Patch Set 18 : another approach #

Patch Set 19 : revert gtk change #

Patch Set 20 : win fix #

Total comments: 12

Patch Set 21 : codereview #

Patch Set 22 : code review #

Patch Set 23 : nit #

Total comments: 20

Patch Set 24 : code review #

Patch Set 25 : nits #

Patch Set 26 : mac fix #

Patch Set 27 : mac fix 2 #

Patch Set 28 : mac fix 3 #

Patch Set 29 : mac fix 4 #

Patch Set 30 : comments fix #

Total comments: 4

Patch Set 31 : code review #

Patch Set 32 : nit #

Patch Set 33 : unittest fix #

Patch Set 34 : ut fix #

Total comments: 12

Patch Set 35 : code review:renamed,comment,nits #

Patch Set 36 : unittest fix #

Patch Set 37 : merged #

Patch Set 38 : call right overloaded method #

Unified diffs Side-by-side diffs Delta from patch set Stats (+532 lines, -236 lines) Patch
M chrome/browser/command_updater.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 3 chunks +15 lines, -3 lines 0 comments Download
M chrome/browser/command_updater.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 1 chunk +7 lines, -1 line 0 comments Download
M chrome/browser/command_updater_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/sync/sync_global_error_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/browser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 6 chunks +20 lines, -5 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 8 chunks +121 lines, -112 lines 0 comments Download
A chrome/browser/ui/browser_content_setting_bubble_model_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 1 chunk +34 lines, -0 lines 0 comments Download
A chrome/browser/ui/browser_content_setting_bubble_model_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +25 lines, -0 lines 0 comments Download
A chrome/browser/ui/browser_toolbar_model_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 1 chunk +31 lines, -0 lines 0 comments Download
A chrome/browser/ui/browser_toolbar_model_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 1 chunk +19 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/content_settings/content_setting_bubble_model.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/content_settings/content_setting_bubble_model.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 10 chunks +26 lines, -26 lines 0 comments Download
A chrome/browser/ui/content_settings/content_setting_bubble_model_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 1 chunk +26 lines, -0 lines 0 comments Download
M chrome/browser/ui/gtk/location_bar_view_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/ui/toolbar/toolbar_model.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_model.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 4 chunks +5 lines, -5 lines 0 comments Download
A chrome/browser/ui/toolbar/toolbar_model_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 1 chunk +23 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/location_bar/click_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/location_bar/content_setting_image_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 6 chunks +44 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 13 chunks +32 lines, -34 lines 0 comments Download
M chrome/browser/ui/views/location_bar/page_action_image_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/page_action_image_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 4 chunks +11 lines, -11 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/reload_button.h View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/reload_button.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 4 chunks +8 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/toolbar_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/toolbar_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 4 chunks +30 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 3 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (0 generated)
altimofeev
Please take a look.
8 years, 9 months ago (2012-02-28 14:52:24 UTC) #1
sky
http://codereview.chromium.org/9479008/diff/9013/chrome/browser/ui/toolbar/toolbar_model.h File chrome/browser/ui/toolbar/toolbar_model.h (right): http://codereview.chromium.org/9479008/diff/9013/chrome/browser/ui/toolbar/toolbar_model.h#newcode43 chrome/browser/ui/toolbar/toolbar_model.h:43: explicit ToolbarModel(Browser* browser); I don't like having these two ...
8 years, 9 months ago (2012-02-28 18:24:24 UTC) #2
altimofeev
PTAL http://codereview.chromium.org/9479008/diff/9013/chrome/browser/ui/toolbar/toolbar_model.h File chrome/browser/ui/toolbar/toolbar_model.h (right): http://codereview.chromium.org/9479008/diff/9013/chrome/browser/ui/toolbar/toolbar_model.h#newcode43 chrome/browser/ui/toolbar/toolbar_model.h:43: explicit ToolbarModel(Browser* browser); On 2012/02/28 18:24:24, sky wrote: ...
8 years, 9 months ago (2012-02-29 18:57:29 UTC) #3
sky
http://codereview.chromium.org/9479008/diff/26010/chrome/browser/ui/content_settings/content_setting_bubble_model.h File chrome/browser/ui/content_settings/content_setting_bubble_model.h (right): http://codereview.chromium.org/9479008/diff/26010/chrome/browser/ui/content_settings/content_setting_bubble_model.h#newcode30 chrome/browser/ui/content_settings/content_setting_bubble_model.h:30: typedef BrowserShowContentRelated Delegate; Can we name this class ContentSettingsBubbleModelDelegate? ...
8 years, 9 months ago (2012-02-29 22:41:10 UTC) #4
altimofeev
Thank you for your comment. PTAL http://codereview.chromium.org/9479008/diff/26010/chrome/browser/ui/content_settings/content_setting_bubble_model.h File chrome/browser/ui/content_settings/content_setting_bubble_model.h (right): http://codereview.chromium.org/9479008/diff/26010/chrome/browser/ui/content_settings/content_setting_bubble_model.h#newcode30 chrome/browser/ui/content_settings/content_setting_bubble_model.h:30: typedef BrowserShowContentRelated Delegate; ...
8 years, 9 months ago (2012-03-01 10:05:39 UTC) #5
sky
http://codereview.chromium.org/9479008/diff/26010/chrome/browser/ui/content_settings/content_setting_bubble_model.h File chrome/browser/ui/content_settings/content_setting_bubble_model.h (right): http://codereview.chromium.org/9479008/diff/26010/chrome/browser/ui/content_settings/content_setting_bubble_model.h#newcode30 chrome/browser/ui/content_settings/content_setting_bubble_model.h:30: typedef BrowserShowContentRelated Delegate; On 2012/03/01 10:05:39, altimofeev wrote: > ...
8 years, 9 months ago (2012-03-01 16:34:47 UTC) #6
altimofeev
PTAL http://codereview.chromium.org/9479008/diff/26010/chrome/browser/ui/content_settings/content_setting_bubble_model.h File chrome/browser/ui/content_settings/content_setting_bubble_model.h (right): http://codereview.chromium.org/9479008/diff/26010/chrome/browser/ui/content_settings/content_setting_bubble_model.h#newcode30 chrome/browser/ui/content_settings/content_setting_bubble_model.h:30: typedef BrowserShowContentRelated Delegate; On 2012/03/01 16:34:47, sky wrote: ...
8 years, 9 months ago (2012-03-01 18:01:07 UTC) #7
altimofeev
Friendly ping. Also note, that this change blocks my following CL, which is not refactoring, ...
8 years, 9 months ago (2012-03-05 10:32:59 UTC) #8
altimofeev
+John: Owner approval for "chrome/browser/ui/tab_contents/*" part.
8 years, 9 months ago (2012-03-05 10:36:42 UTC) #9
sky
http://codereview.chromium.org/9479008/diff/39022/chrome/browser/ui/content_settings/content_setting_bubble_model.h File chrome/browser/ui/content_settings/content_setting_bubble_model.h (right): http://codereview.chromium.org/9479008/diff/39022/chrome/browser/ui/content_settings/content_setting_bubble_model.h#newcode31 chrome/browser/ui/content_settings/content_setting_bubble_model.h:31: }; Add a protected virtual destructor to make it ...
8 years, 9 months ago (2012-03-05 16:30:55 UTC) #10
jam
On 2012/03/05 10:36:42, altimofeev wrote: > +John: Owner approval for "chrome/browser/ui/tab_contents/*" part. you don't need ...
8 years, 9 months ago (2012-03-05 16:41:27 UTC) #11
altimofeev
Thank you for your reply. I have a question, before I start fixing your comments. ...
8 years, 9 months ago (2012-03-05 17:13:24 UTC) #12
tfarina
http://codereview.chromium.org/9479008/diff/39022/chrome/browser/ui/tab_contents/tab_contents_wrapper_container.h File chrome/browser/ui/tab_contents/tab_contents_wrapper_container.h (right): http://codereview.chromium.org/9479008/diff/39022/chrome/browser/ui/tab_contents/tab_contents_wrapper_container.h#newcode20 chrome/browser/ui/tab_contents/tab_contents_wrapper_container.h:20: TabContentsWrapperContainer() {} nit: for pure abstract class (i.e, interface) ...
8 years, 9 months ago (2012-03-05 17:30:24 UTC) #13
sky
On Mon, Mar 5, 2012 at 9:13 AM, <altimofeev@chromium.org> wrote: > Thank you for your ...
8 years, 9 months ago (2012-03-05 18:10:13 UTC) #14
altimofeev
> > Will fix hacker_style methods. > > > > Concerning the comment about the ...
8 years, 9 months ago (2012-03-05 19:49:01 UTC) #15
sky
On Mon, Mar 5, 2012 at 11:49 AM, <altimofeev@chromium.org> wrote: >> > Will fix hacker_style ...
8 years, 9 months ago (2012-03-05 22:14:47 UTC) #16
altimofeev
Why not? Actually, I don't understand how is Ben's comment related to my situation. In ...
8 years, 9 months ago (2012-03-06 08:34:02 UTC) #17
sky
On Tue, Mar 6, 2012 at 12:34 AM, <altimofeev@chromium.org> wrote: > Why not? Actually, I ...
8 years, 9 months ago (2012-03-06 17:12:47 UTC) #18
altimofeev
Thanks for the explanations! Also to not bother again, should I do the same thing ...
8 years, 9 months ago (2012-03-06 18:50:44 UTC) #19
sky
yes On Tue, Mar 6, 2012 at 10:50 AM, <altimofeev@chromium.org> wrote: > Thanks for the ...
8 years, 9 months ago (2012-03-06 19:07:32 UTC) #20
altimofeev
PTAL. http://codereview.chromium.org/9479008/diff/39022/chrome/browser/ui/content_settings/content_setting_bubble_model.h File chrome/browser/ui/content_settings/content_setting_bubble_model.h (right): http://codereview.chromium.org/9479008/diff/39022/chrome/browser/ui/content_settings/content_setting_bubble_model.h#newcode31 chrome/browser/ui/content_settings/content_setting_bubble_model.h:31: }; On 2012/03/05 16:30:56, sky wrote: > Add ...
8 years, 9 months ago (2012-03-07 21:01:39 UTC) #21
sky
http://codereview.chromium.org/9479008/diff/39022/chrome/browser/ui/tab_contents/tab_contents_wrapper_container.h File chrome/browser/ui/tab_contents/tab_contents_wrapper_container.h (right): http://codereview.chromium.org/9479008/diff/39022/chrome/browser/ui/tab_contents/tab_contents_wrapper_container.h#newcode18 chrome/browser/ui/tab_contents/tab_contents_wrapper_container.h:18: class TabContentsWrapperContainer { On 2012/03/07 21:01:39, altimofeev wrote: > ...
8 years, 9 months ago (2012-03-07 23:32:38 UTC) #22
altimofeev
PTAL http://codereview.chromium.org/9479008/diff/64001/chrome/browser/ui/content_settings/content_setting_bubble_model.h File chrome/browser/ui/content_settings/content_setting_bubble_model.h (right): http://codereview.chromium.org/9479008/diff/64001/chrome/browser/ui/content_settings/content_setting_bubble_model.h#newcode26 chrome/browser/ui/content_settings/content_setting_bubble_model.h:26: virtual ~ContentSettingBubbleModelDelegate() {} On 2012/03/07 23:32:38, sky wrote: ...
8 years, 9 months ago (2012-03-11 14:53:07 UTC) #23
sky
http://codereview.chromium.org/9479008/diff/69035/chrome/browser/command_updater.h File chrome/browser/command_updater.h (right): http://codereview.chromium.org/9479008/diff/69035/chrome/browser/command_updater.h#newcode31 chrome/browser/command_updater.h:31: WindowOpenDisposition disposition) = 0; It doesn't scale to add ...
8 years, 9 months ago (2012-03-12 15:14:05 UTC) #24
altimofeev
http://codereview.chromium.org/9479008/diff/69035/chrome/browser/command_updater.h File chrome/browser/command_updater.h (right): http://codereview.chromium.org/9479008/diff/69035/chrome/browser/command_updater.h#newcode31 chrome/browser/command_updater.h:31: WindowOpenDisposition disposition) = 0; I'm not agree with you: ...
8 years, 9 months ago (2012-03-12 15:38:42 UTC) #25
sky
On Mon, Mar 12, 2012 at 8:38 AM, <altimofeev@chromium.org> wrote: > > http://codereview.chromium.org/9479008/diff/69035/chrome/browser/command_updater.h > File ...
8 years, 9 months ago (2012-03-12 17:08:29 UTC) #26
altimofeev
Plumbing looks ugly for me because it implies a lot of files changes: LocatoinBar interface ...
8 years, 9 months ago (2012-03-12 19:20:44 UTC) #27
sky
On Mon, Mar 12, 2012 at 12:20 PM, <altimofeev@chromium.org> wrote: > Plumbing looks ugly for ...
8 years, 9 months ago (2012-03-12 20:48:17 UTC) #28
sky
Add TODO we discussed, rename ToolbarModelHost to ToolbarModelDelegate and put ContentSettingsBubbleModelDelegate in its own file ...
8 years, 9 months ago (2012-03-12 20:59:19 UTC) #29
altimofeev
PTAL http://codereview.chromium.org/9479008/diff/69035/chrome/browser/command_updater_unittest.cc File chrome/browser/command_updater_unittest.cc (right): http://codereview.chromium.org/9479008/diff/69035/chrome/browser/command_updater_unittest.cc#newcode11 chrome/browser/command_updater_unittest.cc:11: virtual void ExecuteCommandWithDisposition(int id, WindowOpenDisposition) { On 2012/03/12 ...
8 years, 9 months ago (2012-03-13 15:38:05 UTC) #30
sky
LGTM Thanks!
8 years, 9 months ago (2012-03-13 17:36:04 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/altimofeev@chromium.org/9479008/81032
8 years, 9 months ago (2012-03-13 18:39:13 UTC) #32
commit-bot: I haz the power
Presubmit check for 9479008-81032 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 9 months ago (2012-03-13 18:39:31 UTC) #33
altimofeev
atwilson@: owner approval for "chrome/browser/sync/sync_globa_error_unittest.cc" changes
8 years, 9 months ago (2012-03-13 18:44:29 UTC) #34
altimofeev
On 2012/03/13 18:44:29, altimofeev wrote: > atwilson@: owner approval for "chrome/browser/sync/sync_globa_error_unittest.cc" > changes Friendly ping
8 years, 9 months ago (2012-03-14 18:37:40 UTC) #35
Andrew T Wilson (Slow)
browser/sync LGTM
8 years, 9 months ago (2012-03-15 16:39:55 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/altimofeev@chromium.org/9479008/81032
8 years, 9 months ago (2012-03-15 16:46:22 UTC) #37
commit-bot: I haz the power
Change committed as 126959
8 years, 9 months ago (2012-03-15 19:08:15 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/altimofeev@chromium.org/9479008/86006
8 years, 9 months ago (2012-03-16 07:56:11 UTC) #39
commit-bot: I haz the power
8 years, 9 months ago (2012-03-16 10:05:36 UTC) #40
Change committed as 127145

Powered by Google App Engine
This is Rietveld 408576698