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

Issue 661454: Initial implementation of status tray functionality (mac-only, currently). (Closed)

Created:
10 years, 9 months ago by Andrew T Wilson (Slow)
Modified:
9 years, 7 months ago
Reviewers:
Nico
CC:
John Gregg, chromium-reviews_googlegroups.com, John Grabowski, Paweł Hajdan Jr., pam+watch_chromium.org, ben+cc_chromium.org, pink (ping after 24hrs), tfarina (gmail-do not use)
Visibility:
Public.

Description

Initial implementation of status tray functionality (mac-only, currently). Added Mac implementation of StatusIcon, and added a simple click callback that displays the "extensions" tab when clicked on, to allow us to dogfood long-lived extensions. BUG=37375 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=40847

Patch Set 1 #

Total comments: 14

Patch Set 2 : Reflecting review feedback from johnnyg #

Total comments: 20

Patch Set 3 : Code changes to reflect Nico's review feedback #

Patch Set 4 : Added unittests. #

Total comments: 5

Patch Set 5 : More changes to reflect review feedback. #

Total comments: 8

Patch Set 6 : more changes per review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+534 lines, -6 lines) Patch
M chrome/app/theme/theme_resources.grd View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/browser.h View 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/browser.cc View 1 2 3 1 chunk +6 lines, -5 lines 0 comments Download
M chrome/browser/browser_init.cc View 1 2 3 4 5 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/browser_process.h View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_impl.h View 1 2 3 4 5 3 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/status_icons/status_icon_mac.h View 1 2 3 4 5 1 chunk +48 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/status_icons/status_icon_mac.mm View 1 2 3 4 5 1 chunk +95 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/status_icons/status_icon_mac_unittest.mm View 4 5 1 chunk +57 lines, -0 lines 0 comments Download
A chrome/browser/status_icons/status_icon.h View 1 2 3 4 5 1 chunk +39 lines, -0 lines 0 comments Download
A chrome/browser/status_icons/status_tray.h View 1 2 3 4 5 1 chunk +47 lines, -0 lines 0 comments Download
A chrome/browser/status_icons/status_tray.cc View 1 2 3 1 chunk +40 lines, -0 lines 0 comments Download
A chrome/browser/status_icons/status_tray_manager.h View 1 2 3 4 5 1 chunk +30 lines, -0 lines 0 comments Download
A chrome/browser/status_icons/status_tray_manager.cc View 1 2 3 4 5 1 chunk +63 lines, -0 lines 0 comments Download
A chrome/browser/status_icons/status_tray_unittest.cc View 4 5 1 chunk +56 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/test/testing_browser_process.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
tfarina (gmail-do not use)
Is there a bug filed for this (for the other platforms)? I couldn't find one ...
10 years, 9 months ago (2010-03-03 13:08:11 UTC) #1
John Gregg
preliminary comments... http://codereview.chromium.org/661454/diff/1/10 File chrome/browser/cocoa/status_icons/status_icon_mac.mm (right): http://codereview.chromium.org/661454/diff/1/10#newcode16 chrome/browser/cocoa/status_icons/status_icon_mac.mm:16: @end // @interface StatusItemController StatusItemController is simple, ...
10 years, 9 months ago (2010-03-03 18:11:09 UTC) #2
John Gregg
http://codereview.chromium.org/661454/diff/1/10 File chrome/browser/cocoa/status_icons/status_icon_mac.mm (right): http://codereview.chromium.org/661454/diff/1/10#newcode16 chrome/browser/cocoa/status_icons/status_icon_mac.mm:16: @end // @interface StatusItemController On 2010/03/03 18:11:09, John Gregg ...
10 years, 9 months ago (2010-03-03 19:04:17 UTC) #3
Andrew T Wilson (Slow)
Not yet. On Wed, Mar 3, 2010 at 5:08 AM, <thiago.farina@gmail.com> wrote: > Is there ...
10 years, 9 months ago (2010-03-03 22:32:02 UTC) #4
Andrew T Wilson (Slow)
http://codereview.chromium.org/661454/diff/1/12 File chrome/browser/status_icons/status_tray.cc (right): http://codereview.chromium.org/661454/diff/1/12#newcode36 chrome/browser/status_icons/status_tray.cc:36: return 0; On 2010/03/03 18:11:09, John Gregg wrote: > ...
10 years, 9 months ago (2010-03-04 02:06:23 UTC) #5
Andrew T Wilson (Slow)
10 years, 9 months ago (2010-03-04 02:07:14 UTC) #6
Nico
On 2010/03/03 22:32:02, Andrew T Wilson wrote: > Not yet. Can you file a bug ...
10 years, 9 months ago (2010-03-04 02:10:27 UTC) #7
Nico
Battery empty, I'll finish this when I get home. Generally, this looks pretty good so ...
10 years, 9 months ago (2010-03-04 02:22:07 UTC) #8
Andrew T Wilson (Slow)
Logged bug: http://crbug.com/37375
10 years, 9 months ago (2010-03-04 02:38:35 UTC) #9
Nico
Is the new status code actually called anywhere in this CL? No, right? The new ...
10 years, 9 months ago (2010-03-04 04:05:38 UTC) #10
Andrew T Wilson (Slow)
This code is called as part of browser_init (we create a StatusTrayManager, which results in ...
10 years, 9 months ago (2010-03-04 20:02:41 UTC) #11
Andrew T Wilson (Slow)
OK, unittests added, and it passes mac valgrind. Please take another look.
10 years, 9 months ago (2010-03-05 18:06:31 UTC) #12
Nico
Nice tests! Almost there. http://codereview.chromium.org/661454/diff/4040/5012 File chrome/browser/browser_init.cc (right): http://codereview.chromium.org/661454/diff/4040/5012#newcode394 chrome/browser/browser_init.cc:394: // TODO(atwilson): Status tray UI ...
10 years, 9 months ago (2010-03-05 18:22:35 UTC) #13
Andrew T Wilson (Slow)
OK, made those tweaks, and changed status_icon_mac_unittest.mm to use googlemock.
10 years, 9 months ago (2010-03-06 01:55:59 UTC) #14
Nico
LG. Some final nits below, but they don't need rereview. http://codereview.chromium.org/661454/diff/4045/4058 File chrome/browser/status_icons/status_tray.h (right): http://codereview.chromium.org/661454/diff/4045/4058#newcode23 ...
10 years, 9 months ago (2010-03-06 02:52:09 UTC) #15
tfarina (gmail-do not use)
10 years, 9 months ago (2010-03-06 05:09:48 UTC) #16
http://codereview.chromium.org/661454/diff/4045/4053
File chrome/browser/cocoa/status_icons/status_icon_mac.h (right):

http://codereview.chromium.org/661454/diff/4045/4053#newcode44
chrome/browser/cocoa/status_icons/status_icon_mac.h:44:
std::vector<StatusIcon::StatusIconListener*> listeners_;
why not ObserverList<StatusIconObserver>?

http://codereview.chromium.org/661454/diff/4045/4056
File chrome/browser/status_icons/status_icon.h (right):

http://codereview.chromium.org/661454/diff/4045/4056#newcode25
chrome/browser/status_icons/status_icon.h:25: class StatusIconListener {
I would call this as StatusIconObserver.

http://codereview.chromium.org/661454/diff/4045/4056#newcode30
chrome/browser/status_icons/status_icon.h:30: virtual void Click() = 0;
And this as OnClicked

http://codereview.chromium.org/661454/diff/4045/4056#newcode34
chrome/browser/status_icons/status_icon.h:34: virtual void
AddListener(StatusIcon::StatusIconListener* listener) = 0;
Then this would be called as AddObserver(StatusIconObserver* observer)

Powered by Google App Engine
This is Rietveld 408576698