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

Issue 11009013: NTP5: Starting implementation of a native menu for showing other device sessions. (Closed)

Created:
8 years, 2 months ago by jeremycho
Modified:
8 years, 1 month ago
CC:
chromium-reviews, dbeam+watch-ntp_chromium.org, dhollowa+watch_chromium.org, arv (Not doing code reviews), estade+watch_chromium.org, tfarina
Visibility:
Public.

Description

NTP5: Starting implementation of a native menu for showing other device sessions. BUG=148770 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=164578

Patch Set 1 #

Total comments: 32

Patch Set 2 : Respond to Dave's comments. #

Total comments: 4

Patch Set 3 : Respond to Dave's comments. #

Patch Set 4 : Rebase and get rid of testing code. #

Patch Set 5 : Use screenX instead of clientX. #

Total comments: 24

Patch Set 6 : Addressing Vadim's comment. #

Total comments: 2

Patch Set 7 : Respond to comments. #

Total comments: 6

Patch Set 8 : Respond to comments. #

Total comments: 4

Patch Set 9 : Respond to comments. #

Total comments: 6

Patch Set 10 : Respond to comments. #

Total comments: 20

Patch Set 11 : Rebase #

Patch Set 12 : Respond to Dan's comments. #

Total comments: 25

Patch Set 13 : Respond to comments. #

Patch Set 14 : Decouple model from view. #

Patch Set 15 : Typo fix. #

Total comments: 2

Patch Set 16 : Respond to comments. #

Total comments: 6

Patch Set 17 : Responding to comments. #

Total comments: 2

Patch Set 18 : Rebase and respond to comments. #

Patch Set 19 : Rebase and exclude Android. #

Patch Set 20 : Fix dumb typo. #

Total comments: 12

Patch Set 21 : Respond to tfarina's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+613 lines, -94 lines) Patch
M chrome/browser/resources/ntp_search/other_devices_page.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A chrome/browser/ui/cocoa/other_device_menu_cocoa.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +36 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/other_device_menu_cocoa.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +22 lines, -0 lines 0 comments Download
A chrome/browser/ui/gtk/other_device_menu_gtk.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +34 lines, -0 lines 0 comments Download
A chrome/browser/ui/gtk/other_device_menu_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +22 lines, -0 lines 0 comments Download
A chrome/browser/ui/search/other_device_menu_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +80 lines, -0 lines 0 comments Download
A chrome/browser/ui/search/other_device_menu_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +198 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/other_device_menu_views.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +40 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/other_device_menu_views.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +38 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/ntp/foreign_session_handler.h View 1 2 3 5 chunks +18 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/ntp/foreign_session_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 7 chunks +114 lines, -88 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 16 17 18 5 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (0 generated)
jeremycho
Hi Pedro and Vadim, This is a starting point for the native menu which shows ...
8 years, 2 months ago (2012-09-29 23:21:05 UTC) #1
dhollowa
http://codereview.chromium.org/11009013/diff/1/chrome/browser/ui/search/other_device_menu.cc File chrome/browser/ui/search/other_device_menu.cc (right): http://codereview.chromium.org/11009013/diff/1/chrome/browser/ui/search/other_device_menu.cc#newcode8 chrome/browser/ui/search/other_device_menu.cc:8: #include "base/utf_string_conversions.h" This should be removed. We'll put the ...
8 years, 2 months ago (2012-10-01 17:37:38 UTC) #2
jeremycho
Thanks for the helpful comments! http://codereview.chromium.org/11009013/diff/1/chrome/browser/ui/search/other_device_menu.cc File chrome/browser/ui/search/other_device_menu.cc (right): http://codereview.chromium.org/11009013/diff/1/chrome/browser/ui/search/other_device_menu.cc#newcode8 chrome/browser/ui/search/other_device_menu.cc:8: #include "base/utf_string_conversions.h" On 2012/10/01 ...
8 years, 2 months ago (2012-10-01 22:53:40 UTC) #3
dhollowa
http://codereview.chromium.org/11009013/diff/4003/chrome/browser/ui/search/other_device_menu.cc File chrome/browser/ui/search/other_device_menu.cc (right): http://codereview.chromium.org/11009013/diff/4003/chrome/browser/ui/search/other_device_menu.cc#newcode66 chrome/browser/ui/search/other_device_menu.cc:66: if (browser) { nit: you can avoid nesting with ...
8 years, 2 months ago (2012-10-02 00:02:08 UTC) #4
jeremycho
http://codereview.chromium.org/11009013/diff/4003/chrome/browser/ui/search/other_device_menu.cc File chrome/browser/ui/search/other_device_menu.cc (right): http://codereview.chromium.org/11009013/diff/4003/chrome/browser/ui/search/other_device_menu.cc#newcode66 chrome/browser/ui/search/other_device_menu.cc:66: if (browser) { On 2012/10/02 00:02:08, dhollowa wrote: > ...
8 years, 2 months ago (2012-10-02 04:49:00 UTC) #5
jeremycho
This is ready for another look - I merged with Vadim's changes and deleted the ...
8 years, 2 months ago (2012-10-06 03:33:20 UTC) #6
vadimt
http://codereview.chromium.org/11009013/diff/18001/chrome/browser/ui/webui/ntp/foreign_session_handler.cc File chrome/browser/ui/webui/ntp/foreign_session_handler.cc (right): http://codereview.chromium.org/11009013/diff/18001/chrome/browser/ui/webui/ntp/foreign_session_handler.cc#newcode344 chrome/browser/ui/webui/ntp/foreign_session_handler.cc:344: // Extract horizontal coordinate of the click within the ...
8 years, 2 months ago (2012-10-08 18:10:18 UTC) #7
jeremycho
http://codereview.chromium.org/11009013/diff/18001/chrome/browser/ui/webui/ntp/foreign_session_handler.cc File chrome/browser/ui/webui/ntp/foreign_session_handler.cc (right): http://codereview.chromium.org/11009013/diff/18001/chrome/browser/ui/webui/ntp/foreign_session_handler.cc#newcode344 chrome/browser/ui/webui/ntp/foreign_session_handler.cc:344: // Extract horizontal coordinate of the click within the ...
8 years, 2 months ago (2012-10-08 19:07:19 UTC) #8
dhollowa
http://codereview.chromium.org/11009013/diff/18001/chrome/browser/ui/search/other_device_menu.cc File chrome/browser/ui/search/other_device_menu.cc (right): http://codereview.chromium.org/11009013/diff/18001/chrome/browser/ui/search/other_device_menu.cc#newcode14 chrome/browser/ui/search/other_device_menu.cc:14: #include "chrome/browser/sync/glue/session_model_associator.h" nit: order http://codereview.chromium.org/11009013/diff/18001/chrome/browser/ui/search/other_device_menu.cc#newcode23 chrome/browser/ui/search/other_device_menu.cc:23: using browser_sync::ForeignSessionHandler; nit: ...
8 years, 2 months ago (2012-10-08 19:15:08 UTC) #9
vadimt
http://codereview.chromium.org/11009013/diff/23001/chrome/browser/ui/webui/ntp/foreign_session_handler.cc File chrome/browser/ui/webui/ntp/foreign_session_handler.cc (right): http://codereview.chromium.org/11009013/diff/23001/chrome/browser/ui/webui/ntp/foreign_session_handler.cc#newcode346 chrome/browser/ui/webui/ntp/foreign_session_handler.cc:346: double window_x; Hi Jeremy! Thanks for the correction! However, ...
8 years, 2 months ago (2012-10-08 19:39:12 UTC) #10
jeremycho
http://codereview.chromium.org/11009013/diff/18001/chrome/browser/ui/search/other_device_menu.cc File chrome/browser/ui/search/other_device_menu.cc (right): http://codereview.chromium.org/11009013/diff/18001/chrome/browser/ui/search/other_device_menu.cc#newcode14 chrome/browser/ui/search/other_device_menu.cc:14: #include "chrome/browser/sync/glue/session_model_associator.h" On 2012/10/08 19:15:09, dhollowa wrote: > nit: ...
8 years, 2 months ago (2012-10-09 01:52:13 UTC) #11
dhollowa
http://codereview.chromium.org/11009013/diff/18001/chrome/browser/ui/webui/ntp/foreign_session_handler.cc File chrome/browser/ui/webui/ntp/foreign_session_handler.cc (right): http://codereview.chromium.org/11009013/diff/18001/chrome/browser/ui/webui/ntp/foreign_session_handler.cc#newcode122 chrome/browser/ui/webui/ntp/foreign_session_handler.cc:122: // TODO(jeremycho): Rename to tabId? On 2012/10/09 01:52:13, jeremycho ...
8 years, 2 months ago (2012-10-09 15:13:42 UTC) #12
vadimt
http://codereview.chromium.org/11009013/diff/23003/chrome/browser/ui/webui/ntp/foreign_session_handler.cc File chrome/browser/ui/webui/ntp/foreign_session_handler.cc (right): http://codereview.chromium.org/11009013/diff/23003/chrome/browser/ui/webui/ntp/foreign_session_handler.cc#newcode343 chrome/browser/ui/webui/ntp/foreign_session_handler.cc:343: // Extract horizontal coordinate of the click within the ...
8 years, 2 months ago (2012-10-09 18:21:45 UTC) #13
jeremycho
http://codereview.chromium.org/11009013/diff/18001/chrome/browser/ui/webui/ntp/foreign_session_handler.cc File chrome/browser/ui/webui/ntp/foreign_session_handler.cc (right): http://codereview.chromium.org/11009013/diff/18001/chrome/browser/ui/webui/ntp/foreign_session_handler.cc#newcode122 chrome/browser/ui/webui/ntp/foreign_session_handler.cc:122: // TODO(jeremycho): Rename to tabId? On 2012/10/09 15:13:42, dhollowa ...
8 years, 2 months ago (2012-10-09 19:45:37 UTC) #14
vadimt
lgtm
8 years, 2 months ago (2012-10-09 19:48:33 UTC) #15
dhollowa
LGTM w/ nits. http://codereview.chromium.org/11009013/diff/25004/chrome/browser/ui/search/other_device_menu.cc File chrome/browser/ui/search/other_device_menu.cc (right): http://codereview.chromium.org/11009013/diff/25004/chrome/browser/ui/search/other_device_menu.cc#newcode43 chrome/browser/ui/search/other_device_menu.cc:43: double getMaxTabTimestamp(const SessionWindow* window) { nit: ...
8 years, 2 months ago (2012-10-09 20:04:36 UTC) #16
jeremycho
Thanks for the review - very educational. Pedro - did you want to take a ...
8 years, 2 months ago (2012-10-09 20:31:05 UTC) #17
pedro (no code reviews)
On 2012/10/09 20:31:05, jeremycho wrote: > Thanks for the review - very educational. > > ...
8 years, 2 months ago (2012-10-09 20:36:17 UTC) #18
pedro (no code reviews)
lgtm LGTM with nits. http://codereview.chromium.org/11009013/diff/21006/chrome/browser/ui/search/other_device_menu.cc File chrome/browser/ui/search/other_device_menu.cc (right): http://codereview.chromium.org/11009013/diff/21006/chrome/browser/ui/search/other_device_menu.cc#newcode43 chrome/browser/ui/search/other_device_menu.cc:43: double GetMaxTabTimestamp(const SessionWindow* window) { ...
8 years, 2 months ago (2012-10-09 21:19:02 UTC) #19
jeremycho
http://codereview.chromium.org/11009013/diff/21006/chrome/browser/ui/search/other_device_menu.cc File chrome/browser/ui/search/other_device_menu.cc (right): http://codereview.chromium.org/11009013/diff/21006/chrome/browser/ui/search/other_device_menu.cc#newcode43 chrome/browser/ui/search/other_device_menu.cc:43: double GetMaxTabTimestamp(const SessionWindow* window) { On 2012/10/09 21:19:02, pedrosimonetti ...
8 years, 2 months ago (2012-10-09 22:03:38 UTC) #20
jeremycho
Hi Dan - this is ready for your review. Thanks!
8 years, 2 months ago (2012-10-09 22:05:56 UTC) #21
jeremycho
Hi Dan - this is ready for your review (sorry I previously sent it to ...
8 years, 2 months ago (2012-10-11 03:09:09 UTC) #22
Dan Beam
got part way done, flushing http://codereview.chromium.org/11009013/diff/35002/chrome/browser/ui/search/other_device_menu.cc File chrome/browser/ui/search/other_device_menu.cc (right): http://codereview.chromium.org/11009013/diff/35002/chrome/browser/ui/search/other_device_menu.cc#newcode28 chrome/browser/ui/search/other_device_menu.cc:28: static const int kMaxWidth ...
8 years, 2 months ago (2012-10-12 01:10:56 UTC) #23
jeremycho
Thanks for the comments! http://codereview.chromium.org/11009013/diff/35002/chrome/browser/ui/search/other_device_menu.cc File chrome/browser/ui/search/other_device_menu.cc (right): http://codereview.chromium.org/11009013/diff/35002/chrome/browser/ui/search/other_device_menu.cc#newcode28 chrome/browser/ui/search/other_device_menu.cc:28: static const int kMaxWidth = ...
8 years, 2 months ago (2012-10-12 03:51:08 UTC) #24
jeremycho
friendly ping.
8 years, 2 months ago (2012-10-17 19:51:02 UTC) #25
Evan Stade
does this compile on mac or linux? https://chromiumcodereview.appspot.com/11009013/diff/43003/chrome/browser/ui/webui/ntp/foreign_session_handler.cc File chrome/browser/ui/webui/ntp/foreign_session_handler.cc (right): https://chromiumcodereview.appspot.com/11009013/diff/43003/chrome/browser/ui/webui/ntp/foreign_session_handler.cc#newcode77 chrome/browser/ui/webui/ntp/foreign_session_handler.cc:77: LOG(ERROR) << ...
8 years, 2 months ago (2012-10-17 21:41:39 UTC) #26
Dan Beam
will be able to review tomorrow morning, but estade is also an owner :D
8 years, 2 months ago (2012-10-18 04:31:33 UTC) #27
Dan Beam
lg to me, but wait for Evan, he has a lot more native UI experience ...
8 years, 2 months ago (2012-10-19 04:18:47 UTC) #28
jeremycho
Hi Evan, It's not compiling on Linux. When linking other_devices_menu.cc, I'm getting error undefined reference ...
8 years, 2 months ago (2012-10-20 23:38:15 UTC) #29
Evan Stade
Views is the UI toolkit for Windows and ChromeOS. Mac uses Cocoa and Linux uses ...
8 years, 2 months ago (2012-10-22 19:06:41 UTC) #30
jeremycho
Thanks for the helpful advice. I've done the decoupling and verified it compiles on Linux. ...
8 years, 2 months ago (2012-10-23 19:46:16 UTC) #31
Evan Stade
looking better. Doesn't the view need to have some way of informing the controller when ...
8 years, 2 months ago (2012-10-24 00:48:58 UTC) #32
Evan Stade
http://codereview.chromium.org/11009013/diff/58010/chrome/browser/ui/views/other_device_menu_view.h File chrome/browser/ui/views/other_device_menu_view.h (right): http://codereview.chromium.org/11009013/diff/58010/chrome/browser/ui/views/other_device_menu_view.h#newcode23 chrome/browser/ui/views/other_device_menu_view.h:23: class OtherDeviceMenuView : public OtherDeviceMenu { nit: I would ...
8 years, 2 months ago (2012-10-24 00:49:07 UTC) #33
jeremycho
Menu runner handles the menu dismissal internally, so no additional work should be required by ...
8 years, 2 months ago (2012-10-24 01:32:29 UTC) #34
Evan Stade
I'm happy with this approach. You can proceed to make mac compile. http://codereview.chromium.org/11009013/diff/69001/chrome/browser/ui/gtk/other_device_menu_views_gtk.cc File chrome/browser/ui/gtk/other_device_menu_views_gtk.cc ...
8 years, 2 months ago (2012-10-24 22:51:34 UTC) #35
jeremycho
Added cocoa files. http://codereview.chromium.org/11009013/diff/69001/chrome/browser/ui/gtk/other_device_menu_views_gtk.cc File chrome/browser/ui/gtk/other_device_menu_views_gtk.cc (right): http://codereview.chromium.org/11009013/diff/69001/chrome/browser/ui/gtk/other_device_menu_views_gtk.cc#newcode15 chrome/browser/ui/gtk/other_device_menu_views_gtk.cc:15: void OtherDeviceMenuViews::ShowMenu(gfx::NativeWindow window, On 2012/10/24 22:51:34, ...
8 years, 2 months ago (2012-10-24 23:54:41 UTC) #36
Evan Stade
lgtm, you need some OWNERS reviews though.
8 years, 1 month ago (2012-10-25 23:37:27 UTC) #37
jeremycho
Thanks for the reviews. Scott - would you be able to review for ui/views? Thanks, ...
8 years, 1 month ago (2012-10-25 23:46:09 UTC) #38
sky
views LGTM http://codereview.chromium.org/11009013/diff/75001/chrome/browser/ui/views/other_device_menu_views.h File chrome/browser/ui/views/other_device_menu_views.h (right): http://codereview.chromium.org/11009013/diff/75001/chrome/browser/ui/views/other_device_menu_views.h#newcode30 chrome/browser/ui/views/other_device_menu_views.h:30: nit: remove newline.
8 years, 1 month ago (2012-10-26 19:34:11 UTC) #39
jeremycho
http://codereview.chromium.org/11009013/diff/75001/chrome/browser/ui/views/other_device_menu_views.h File chrome/browser/ui/views/other_device_menu_views.h (right): http://codereview.chromium.org/11009013/diff/75001/chrome/browser/ui/views/other_device_menu_views.h#newcode30 chrome/browser/ui/views/other_device_menu_views.h:30: On 2012/10/26 19:34:11, sky wrote: > nit: remove newline. ...
8 years, 1 month ago (2012-10-27 19:46:17 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremycho@chromium.org/11009013/83001
8 years, 1 month ago (2012-10-27 19:46:31 UTC) #41
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years, 1 month ago (2012-10-27 20:15:48 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremycho@chromium.org/11009013/90002
8 years, 1 month ago (2012-10-28 19:22:11 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremycho@chromium.org/11009013/89003
8 years, 1 month ago (2012-10-28 19:34:59 UTC) #44
commit-bot: I haz the power
Change committed as 164578
8 years, 1 month ago (2012-10-29 00:02:36 UTC) #45
tfarina
somehow I wasn't copied into this change :( but per WATCHLIST I should have, did ...
8 years, 1 month ago (2012-10-29 01:37:43 UTC) #46
jeremycho
8 years, 1 month ago (2012-10-29 19:55:28 UTC) #47
Hi tfarina,

Not sure why you weren't copied - I don't believe I modified cc.  I've responded
to your comments.

http://codereview.chromium.org/11009013/diff/89003/chrome/browser/ui/views/ot...
File chrome/browser/ui/views/other_device_menu_views.cc (right):

http://codereview.chromium.org/11009013/diff/89003/chrome/browser/ui/views/ot...
chrome/browser/ui/views/other_device_menu_views.cc:20: const gfx::Point&
location) {
On 2012/10/29 01:37:43, tfarina wrote:
> nit: indentation is off here!

Done.

http://codereview.chromium.org/11009013/diff/89003/chrome/browser/ui/views/ot...
chrome/browser/ui/views/other_device_menu_views.cc:35: //
OtherDeviceMenuController ---------------------------------------------------
On 2012/10/29 01:37:43, tfarina wrote:
> nit: s/OtherDeviceMenuController/OtherDeviceMenu
> 
> To be honest, I wouldn't have this useless comment at all, and I'd put this at
> the top of this file right after the includes, not a big deal though.

Done.

http://codereview.chromium.org/11009013/diff/89003/chrome/browser/ui/views/ot...
chrome/browser/ui/views/other_device_menu_views.cc:35: //
OtherDeviceMenuController ---------------------------------------------------
On 2012/10/29 01:37:43, tfarina wrote:
> nit: s/OtherDeviceMenuController/OtherDeviceMenu
> 
> To be honest, I wouldn't have this useless comment at all, and I'd put this at
> the top of this file right after the includes, not a big deal though.

Done.

http://codereview.chromium.org/11009013/diff/89003/chrome/browser/ui/views/ot...
File chrome/browser/ui/views/other_device_menu_views.h (right):

http://codereview.chromium.org/11009013/diff/89003/chrome/browser/ui/views/ot...
chrome/browser/ui/views/other_device_menu_views.h:11: namespace gfx{
On 2012/10/29 01:37:43, tfarina wrote:
> nit: one whitespace between gfx and {

Done.

http://codereview.chromium.org/11009013/diff/89003/chrome/browser/ui/views/ot...
chrome/browser/ui/views/other_device_menu_views.h:29: gfx::NativeWindow window,
const gfx::Point& location) OVERRIDE;
On 2012/10/29 01:37:43, tfarina wrote:
> nit: one arg per line!

Done.

http://codereview.chromium.org/11009013/diff/89003/chrome/browser/ui/views/ot...
chrome/browser/ui/views/other_device_menu_views.h:32: ui::SimpleMenuModel*
menu_model_;  // Owned by the controller.
On 2012/10/29 01:37:43, tfarina wrote:
> which controller? better to write the class name.

Done.

Powered by Google App Engine
This is Rietveld 408576698