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

Issue 10408039: status_icons: Factor out status icon observer into its own header file. (Closed)

Created:
8 years, 7 months ago by tfarina
Modified:
8 years, 7 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

status_icons: Factor out status icon observer into its own header file. R=atwilson@chromium.org TBR=pkasting@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=138473

Patch Set 1 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -36 lines) Patch
M chrome/browser/status_icons/status_icon.h View 4 chunks +9 lines, -18 lines 0 comments Download
M chrome/browser/status_icons/status_icon.cc View 2 chunks +5 lines, -4 lines 0 comments Download
A chrome/browser/status_icons/status_icon_observer.h View 1 chunk +24 lines, -0 lines 2 comments Download
M chrome/browser/status_icons/status_icon_unittest.cc View 3 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/ui/gtk/status_icons/status_tray_gtk_unittest.cc View 3 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/status_icons/status_tray_win_unittest.cc View 3 chunks +6 lines, -4 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
tfarina
8 years, 7 months ago (2012-05-19 13:49:25 UTC) #1
Andrew T Wilson (Slow)
LGTM. One question - what's the impetus for this change? Is there a style rule ...
8 years, 7 months ago (2012-05-22 00:53:56 UTC) #2
tfarina
On 2012/05/22 00:53:56, Andrew T Wilson wrote: > One question - what's the impetus for ...
8 years, 7 months ago (2012-05-23 14:58:08 UTC) #3
tfarina
8 years, 7 months ago (2012-05-23 15:01:06 UTC) #4
ash/ and content/ are also good examples of this practice.

On Wed, May 23, 2012 at 11:58 AM,  <tfarina@chromium.org> wrote:
> On 2012/05/22 00:53:56, Andrew T Wilson wrote:
>>
>> One question - what's the impetus for this change?
>
> The reason is that it allow us to forward declare StatusIconObserver instead
> of
> having to include status_icon.h. Also it doesn't pollute the header files
> with a
> bunch of unnecessary includes. sky, ben and jhawkins has been advocating
> this
> throughout.
>
> And also jam:
>
http://codereview.chromium.org/8726023/diff/1/chrome/browser/importer/externa...
>
> I have done this for many listeners/observers/delegates in ui/views/ and we
> have
> been pretty consistent in this way under ui/ directory. A good example of
> following this pattern is ui/app_list.
>
>
>> Is there a style rule that
>> says that having a nested observer interface is illegal (it has to live in
>> its
>> own file?)
>
>
> The style guide doesn't say it's illegal, but I think the preference is to
> have
> observers/listeners/delegates into its own header files.
>
> http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Nested_Classes
>
>
>
>
http://codereview.chromium.org/10408039/diff/6001/chrome/browser/status_icons...
> File chrome/browser/status_icons/status_icon_observer.h (right):
>
>
http://codereview.chromium.org/10408039/diff/6001/chrome/browser/status_icons...
> chrome/browser/status_icons/status_icon_observer.h:14: // right clicks
> on the icon to display the context menu, OnClicked will not
> On 2012/05/22 00:53:56, Andrew T Wilson wrote:
>>
>> nit: OnClicked->OnStatusIconClicked()
>
>
> Done.
>
> http://codereview.chromium.org/10408039/



-- 
Thiago

Powered by Google App Engine
This is Rietveld 408576698