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

Issue 11298004: alternate ntp: add "Recent Tabs" submenu to wrench menu (Closed)

Created:
8 years, 1 month ago by kuan
Modified:
8 years, 1 month ago
Reviewers:
jeremycho, sky, akalin
CC:
chromium-reviews, tfarina, mazda+watch_chromium.org, yusukes+watch_chromium.org, derat+watch_chromium.org, gideonwald
Visibility:
Public.

Description

alternate ntp: add "Recent Tabs" submenu to wrench menu this is a first-draft implementation of the "Recent tabs" submenu on cros/win, initial cl was created by dhollowa@ who populated menu w/ non-executable multiple recently-closed local tabs. - for local device, show "Reopen closed tab" * it's enabled if last closed tab can be restored , else it's disabled - for other devices, show tabs in all windows of all sessions * sessions and tabs of each session are ranked by recency * each session has a section header and separator * selecting a tab menu item restores tab * if tab has been loaded in history, its favicon is shown * max 3 sessions, most-recent session first * max 4 tabs per session, most recent tabs independent of what window they were from, reverse chronological and no window delineation - if there's no device, show disabled "No tabs from other devices" - added unittest, which populates SessionModelAssociator with fake foreign sessions via protocol buffer BUG=159015 TEST=verify per bug rpt Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=167362

Patch Set 1 #

Total comments: 45

Patch Set 2 : addressed scott's and cole's comments, rebased #

Patch Set 3 : addressed scott's comments, code cleanup #

Patch Set 4 : fixed build errors from tryjobs #

Patch Set 5 : fixed accel key for reopen tab - it broke unittest #

Total comments: 8

Patch Set 6 : addressed scott's and cole's comments, add unittest #

Patch Set 7 : add comment, fix test #

Patch Set 8 : fixed disposition, minor style cleanup #

Total comments: 19

Patch Set 9 : addressed scott's and fred's comments #

Patch Set 10 : remove unused function #

Patch Set 11 : addressed scott's comments #

Total comments: 14

Patch Set 12 : addressed fred's comments #

Total comments: 4

Patch Set 13 : addressed fred's comments #

Total comments: 8

Patch Set 14 : addressed scott's comments #

Patch Set 15 : addressed scott's comments #

Patch Set 16 : rebased to resolve conflicts #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1033 lines, -5 lines) Patch
M chrome/app/chrome_command_ids.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/app/generated_resources.grd View 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/session_model_associator.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_command_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +93 lines, -0 lines 0 comments Download
A chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +386 lines, -0 lines 0 comments Download
A chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +463 lines, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/wrench_menu_model.h View 1 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/ui/toolbar/wrench_menu_model.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/toolbar_view.h View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/wrench_menu.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/wrench_menu.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +47 lines, -2 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (0 generated)
kuan
sky: pls look at everything. jeremy, pls look at recent_tabs_menu_model.*. thx.
8 years, 1 month ago (2012-11-06 21:08:53 UTC) #1
sky
https://codereview.chromium.org/11298004/diff/1/chrome/browser/ui/browser_command_controller.cc File chrome/browser/ui/browser_command_controller.cc (right): https://codereview.chromium.org/11298004/diff/1/chrome/browser/ui/browser_command_controller.cc#newcode855 chrome/browser/ui/browser_command_controller.cc:855: !Profile::IsGuestSession()); I don't think we should show it for ...
8 years, 1 month ago (2012-11-07 00:10:47 UTC) #2
kuan
i've addressed scott's and cole's comments in patch set 2. regarding cole's comments, they're: - ...
8 years, 1 month ago (2012-11-07 02:29:46 UTC) #3
sky
https://codereview.chromium.org/11298004/diff/1/chrome/browser/ui/browser_command_controller.cc File chrome/browser/ui/browser_command_controller.cc (right): https://codereview.chromium.org/11298004/diff/1/chrome/browser/ui/browser_command_controller.cc#newcode855 chrome/browser/ui/browser_command_controller.cc:855: !Profile::IsGuestSession()); On 2012/11/07 02:29:46, kuan wrote: > On 2012/11/07 ...
8 years, 1 month ago (2012-11-07 14:40:12 UTC) #4
kuan
i've addressed scott's comments in patch set 3, plus some code cleanup. ptal. thx. https://codereview.chromium.org/11298004/diff/1/chrome/browser/ui/browser_command_controller.cc ...
8 years, 1 month ago (2012-11-07 16:48:51 UTC) #5
sky
https://codereview.chromium.org/11298004/diff/1/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc File chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc (right): https://codereview.chromium.org/11298004/diff/1/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc#newcode204 chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc:204: if (BuildRecentlyClosedTabItem(tab, &seen_tabs)) On 2012/11/07 02:29:46, kuan wrote: > ...
8 years, 1 month ago (2012-11-07 17:35:02 UTC) #6
kuan
https://codereview.chromium.org/11298004/diff/1/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc File chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc (right): https://codereview.chromium.org/11298004/diff/1/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc#newcode204 chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc:204: if (BuildRecentlyClosedTabItem(tab, &seen_tabs)) On 2012/11/07 17:35:02, sky wrote: > ...
8 years, 1 month ago (2012-11-07 17:38:22 UTC) #7
sky
On Wed, Nov 7, 2012 at 9:38 AM, <kuan@chromium.org> wrote: > > https://codereview.chromium.org/11298004/diff/1/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc > File ...
8 years, 1 month ago (2012-11-07 17:41:52 UTC) #8
kuan
On 2012/11/07 17:41:52, sky wrote: > On Wed, Nov 7, 2012 at 9:38 AM, <mailto:kuan@chromium.org> ...
8 years, 1 month ago (2012-11-07 17:45:54 UTC) #9
kuan
fyi, patches set 4 and 5 are fixes for errors from tryjobs, especially #5 changes ...
8 years, 1 month ago (2012-11-07 19:33:21 UTC) #10
sky
How come? Doesn't that mean if you close a single window with lots of tabs ...
8 years, 1 month ago (2012-11-07 22:31:46 UTC) #11
sky
Can you create some tests too? https://codereview.chromium.org/11298004/diff/14002/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc File chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc (right): https://codereview.chromium.org/11298004/diff/14002/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc#newcode131 chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc:131: weak_ptr_factory_.InvalidateWeakPtrs(); Isn't this ...
8 years, 1 month ago (2012-11-07 22:33:40 UTC) #12
kuan
i've addressed all comments in patch set 6; #7 is just minor cleanup. i've also ...
8 years, 1 month ago (2012-11-08 22:57:54 UTC) #13
kuan
fy, in patch set 8, i fixed disposition to restore foreign tab in a new ...
8 years, 1 month ago (2012-11-09 14:46:50 UTC) #14
akalin
https://codereview.chromium.org/11298004/diff/14005/chrome/browser/sync/glue/session_model_associator.h File chrome/browser/sync/glue/session_model_associator.h (right): https://codereview.chromium.org/11298004/diff/14005/chrome/browser/sync/glue/session_model_associator.h#newcode238 chrome/browser/sync/glue/session_model_associator.h:238: friend class SessionModelAssociatorForRecentTabsSubMenuModelTest; I'd prefer to instead expose a ...
8 years, 1 month ago (2012-11-09 18:11:58 UTC) #15
sky
https://codereview.chromium.org/11298004/diff/14005/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc File chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc (right): https://codereview.chromium.org/11298004/diff/14005/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc#newcode173 chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc:173: if (service && Check the size here. https://codereview.chromium.org/11298004/diff/14005/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc#newcode193 chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc:193: ...
8 years, 1 month ago (2012-11-09 18:13:04 UTC) #16
kuan
https://codereview.chromium.org/11298004/diff/14005/chrome/browser/sync/glue/session_model_associator.h File chrome/browser/sync/glue/session_model_associator.h (right): https://codereview.chromium.org/11298004/diff/14005/chrome/browser/sync/glue/session_model_associator.h#newcode238 chrome/browser/sync/glue/session_model_associator.h:238: friend class SessionModelAssociatorForRecentTabsSubMenuModelTest; On 2012/11/09 18:11:58, akalin wrote: > ...
8 years, 1 month ago (2012-11-09 18:17:17 UTC) #17
akalin
On 2012/11/09 18:17:17, kuan wrote: > https://codereview.chromium.org/11298004/diff/14005/chrome/browser/sync/glue/session_model_associator.h > File chrome/browser/sync/glue/session_model_associator.h (right): > > https://codereview.chromium.org/11298004/diff/14005/chrome/browser/sync/glue/session_model_associator.h#newcode238 > ...
8 years, 1 month ago (2012-11-09 18:43:23 UTC) #18
kuan
i've addressed scott's and fred's comments in patch set 9; #10 is just removal of ...
8 years, 1 month ago (2012-11-09 20:27:52 UTC) #19
sky
https://codereview.chromium.org/11298004/diff/14005/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc File chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc (right): https://codereview.chromium.org/11298004/diff/14005/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc#newcode298 chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc:298: !k ? session->session_name : std::string(), need_separator)) { On 2012/11/09 ...
8 years, 1 month ago (2012-11-09 21:44:56 UTC) #20
kuan
i've addressed all comment in patch set 11. ptal. thx. https://codereview.chromium.org/11298004/diff/14005/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc File chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc (right): https://codereview.chromium.org/11298004/diff/14005/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc#newcode298 ...
8 years, 1 month ago (2012-11-09 23:25:05 UTC) #21
akalin
https://codereview.chromium.org/11298004/diff/12012/chrome/browser/sync/glue/session_model_associator.h File chrome/browser/sync/glue/session_model_associator.h (right): https://codereview.chromium.org/11298004/diff/12012/chrome/browser/sync/glue/session_model_associator.h#newcode236 chrome/browser/sync/glue/session_model_associator.h:236: #if defined(UNIT_TEST) i don't think we should use this ...
8 years, 1 month ago (2012-11-10 00:08:40 UTC) #22
kuan
https://codereview.chromium.org/11298004/diff/12012/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc File chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc (right): https://codereview.chromium.org/11298004/diff/12012/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc#newcode136 chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc:136: const sync_pb::SessionWindow& window_pb) { On 2012/11/10 00:08:40, akalin wrote: ...
8 years, 1 month ago (2012-11-10 17:07:04 UTC) #23
akalin
> i tried implementing building the SessionSpecifics object for session, window > and tabs. unfortunately, ...
8 years, 1 month ago (2012-11-10 17:29:57 UTC) #24
kuan
i've addressed all comments in patch set 12. ptal. thx. https://codereview.chromium.org/11298004/diff/12012/chrome/browser/sync/glue/session_model_associator.h File chrome/browser/sync/glue/session_model_associator.h (right): https://codereview.chromium.org/11298004/diff/12012/chrome/browser/sync/glue/session_model_associator.h#newcode236 ...
8 years, 1 month ago (2012-11-10 19:34:46 UTC) #25
akalin
sync stuff lgtm after nits below thanks for refactoring! https://codereview.chromium.org/11298004/diff/6025/chrome/browser/sync/glue/session_model_associator.h File chrome/browser/sync/glue/session_model_associator.h (right): https://codereview.chromium.org/11298004/diff/6025/chrome/browser/sync/glue/session_model_associator.h#newcode236 chrome/browser/sync/glue/session_model_associator.h:236: ...
8 years, 1 month ago (2012-11-10 21:47:40 UTC) #26
kuan
i've addressed all comments in patch set 12. thx. https://codereview.chromium.org/11298004/diff/6025/chrome/browser/sync/glue/session_model_associator.h File chrome/browser/sync/glue/session_model_associator.h (right): https://codereview.chromium.org/11298004/diff/6025/chrome/browser/sync/glue/session_model_associator.h#newcode236 chrome/browser/sync/glue/session_model_associator.h:236: ...
8 years, 1 month ago (2012-11-11 00:17:22 UTC) #27
sky
https://codereview.chromium.org/11298004/diff/3010/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc File chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc (right): https://codereview.chromium.org/11298004/diff/3010/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc#newcode145 chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc:145: DCHECK(setup_for_test); Why the DCHECK for setup_for_test? If always true, ...
8 years, 1 month ago (2012-11-12 04:13:03 UTC) #28
kuan
i've addressed scott's comments in patch set 14. ptal. thx. https://codereview.chromium.org/11298004/diff/3010/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc File chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc (right): https://codereview.chromium.org/11298004/diff/3010/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc#newcode145 ...
8 years, 1 month ago (2012-11-12 13:24:26 UTC) #29
sky
LGTM
8 years, 1 month ago (2012-11-12 15:26:10 UTC) #30
sky
Sorry, one question. Is it possible to have only one constructor?
8 years, 1 month ago (2012-11-12 15:27:07 UTC) #31
kuan
On 2012/11/12 15:27:07, sky wrote: > Sorry, one question. Is it possible to have only ...
8 years, 1 month ago (2012-11-12 16:02:18 UTC) #32
sky
The only difference is the accelerator, right? Is there a reason you can't always do ...
8 years, 1 month ago (2012-11-12 16:25:08 UTC) #33
kuan
On 2012/11/12 16:25:08, sky wrote: > The only difference is the accelerator, right? Is there ...
8 years, 1 month ago (2012-11-12 17:25:19 UTC) #34
kuan
i've combined both constructors into 1 in patch set 15. ptal. thx.
8 years, 1 month ago (2012-11-12 17:44:14 UTC) #35
sky
LGTM
8 years, 1 month ago (2012-11-12 22:02:55 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kuan@chromium.org/11298004/11046
8 years, 1 month ago (2012-11-12 22:12:13 UTC) #37
commit-bot: I haz the power
Failed to apply patch for chrome/chrome_tests.gypi: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
8 years, 1 month ago (2012-11-12 22:12:17 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kuan@chromium.org/11298004/13039
8 years, 1 month ago (2012-11-12 22:36:04 UTC) #39
commit-bot: I haz the power
8 years, 1 month ago (2012-11-13 10:43:53 UTC) #40
Change committed as 167362

Powered by Google App Engine
This is Rietveld 408576698