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

Issue 7981012: Add Mouse hover behavior to Mac Panels when minimized (Closed)

Created:
9 years, 3 months ago by Dmitry Titov
Modified:
9 years, 3 months ago
Reviewers:
jennb, prasadt, dcheng, prasadt1
CC:
chromium-reviews, jennb, jianli
Visibility:
Public.

Description

Rename PanelMouseWatcherGtk into PanelMouseWatcherTimer. Added implementation of gfx::Point GetCursorScreenPoint() on Mac. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102173

Patch Set 1 #

Patch Set 2 : compile fix #

Patch Set 3 : work in progress #

Patch Set 4 : Enabled test #

Patch Set 5 : ready for review #

Patch Set 6 : remove unused constant #

Total comments: 13

Patch Set 7 : cr feedback #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -116 lines) Patch
M chrome/browser/ui/panels/native_panel.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/panels/panel_browser_window_cocoa.mm View 1 2 3 4 5 6 6 chunks +15 lines, -7 lines 0 comments Download
M chrome/browser/ui/panels/panel_browsertest.cc View 1 2 3 4 chunks +11 lines, -3 lines 0 comments Download
M chrome/browser/ui/panels/panel_mouse_watcher.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
D chrome/browser/ui/panels/panel_mouse_watcher_gtk.cc View 1 chunk +0 lines, -77 lines 0 comments Download
A + chrome/browser/ui/panels/panel_mouse_watcher_timer.cc View 1 2 3 4 3 chunks +22 lines, -23 lines 1 comment Download
M chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm View 1 2 3 3 chunks +6 lines, -4 lines 1 comment Download
M chrome/chrome_browser.gypi View 2 chunks +2 lines, -2 lines 0 comments Download
A ui/gfx/screen_mac.mm View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
M ui/ui.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Dmitry Titov
Need another iteration before requesting formal review...
9 years, 3 months ago (2011-09-20 23:18:57 UTC) #1
Dmitry Titov
Looks ready for review! Hooked up the test as well. There are some possible cleanups ...
9 years, 3 months ago (2011-09-21 00:33:31 UTC) #2
prasadt
lgtm A few suggestions but nothing that should block the check-in. Giving lgtm as I ...
9 years, 3 months ago (2011-09-21 16:54:15 UTC) #3
jennb
http://codereview.chromium.org/7981012/diff/4011/chrome/browser/ui/panels/native_panel.h File chrome/browser/ui/panels/native_panel.h (right): http://codereview.chromium.org/7981012/diff/4011/chrome/browser/ui/panels/native_panel.h#newcode90 chrome/browser/ui/panels/native_panel.h:90: // TODO(dimich) Remove this method, there is PanelMouseWatcher::GetInstance(). On ...
9 years, 3 months ago (2011-09-21 17:48:19 UTC) #4
Dmitry Titov
Addressed feedback, run tests on Mac (the only delta since last try jobs was in ...
9 years, 3 months ago (2011-09-21 20:38:51 UTC) #5
Dmitry Titov
On 2011/09/21 17:48:19, jennb wrote: > http://codereview.chromium.org/7981012/diff/4011/ui/gfx/screen_mac.mm#newcode15 > ui/gfx/screen_mac.mm:15: NSScreen* screen = [[NSScreen screens] > ...
9 years, 3 months ago (2011-09-21 21:20:07 UTC) #6
jennb
LGTM http://codereview.chromium.org/7981012/diff/4014/chrome/browser/ui/panels/panel_mouse_watcher_timer.cc File chrome/browser/ui/panels/panel_mouse_watcher_timer.cc (right): http://codereview.chromium.org/7981012/diff/4014/chrome/browser/ui/panels/panel_mouse_watcher_timer.cc#newcode14 chrome/browser/ui/panels/panel_mouse_watcher_timer.cc:14: class PanelMouseWatcherTimer : public PanelMouseWatcher { Thanks for ...
9 years, 3 months ago (2011-09-21 21:21:26 UTC) #7
prasadt1
http://codereview.chromium.org/7981012/diff/4011/chrome/browser/ui/panels/native_panel.h File chrome/browser/ui/panels/native_panel.h (right): http://codereview.chromium.org/7981012/diff/4011/chrome/browser/ui/panels/native_panel.h#newcode90 chrome/browser/ui/panels/native_panel.h:90: // TODO(dimich) Remove this method, there is PanelMouseWatcher::GetInstance(). On ...
9 years, 3 months ago (2011-09-21 21:33:15 UTC) #8
Dmitry Titov
On 2011/09/21 21:21:26, jennb wrote: http://codereview.chromium.org/7981012/diff/4014/chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm > File chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm (right): > > http://codereview.chromium.org/7981012/diff/4014/chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm#newcode37 > chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm:37: ...
9 years, 3 months ago (2011-09-21 21:41:54 UTC) #9
Dmitry Titov
On 2011/09/21 21:33:15, prasadt1 wrote: > http://codereview.chromium.org/7981012/diff/4011/chrome/browser/ui/panels/native_panel.h > File chrome/browser/ui/panels/native_panel.h (right): > > http://codereview.chromium.org/7981012/diff/4011/chrome/browser/ui/panels/native_panel.h#newcode90 > ...
9 years, 3 months ago (2011-09-21 21:46:58 UTC) #10
Dmitry Titov
You both gave me LGTM , but there were additional quesitons, I feel I've answered ...
9 years, 3 months ago (2011-09-21 22:10:12 UTC) #11
jennb
LGTM++ On Wed, Sep 21, 2011 at 3:10 PM, <dimich@chromium.org> wrote: > You both gave ...
9 years, 3 months ago (2011-09-21 22:11:30 UTC) #12
dcheng
Drive-by comment. http://codereview.chromium.org/7981012/diff/4011/chrome/browser/ui/panels/native_panel.h File chrome/browser/ui/panels/native_panel.h (right): http://codereview.chromium.org/7981012/diff/4011/chrome/browser/ui/panels/native_panel.h#newcode90 chrome/browser/ui/panels/native_panel.h:90: // TODO(dimich) Remove this method, there is ...
9 years, 3 months ago (2011-09-21 22:12:41 UTC) #13
prasadt
9 years, 3 months ago (2011-09-21 22:15:56 UTC) #14
On 2011/09/21 21:46:58, Dmitry Titov wrote:
> On 2011/09/21 21:33:15, prasadt1 wrote:
> >
>
http://codereview.chromium.org/7981012/diff/4011/chrome/browser/ui/panels/nat...
> > File chrome/browser/ui/panels/native_panel.h (right):
> > 
> >
>
http://codereview.chromium.org/7981012/diff/4011/chrome/browser/ui/panels/nat...
> > chrome/browser/ui/panels/native_panel.h:90: // TODO(dimich) Remove this
> method,
> > there is PanelMouseWatcher::GetInstance().
> > On 2011/09/21 20:38:51, Dmitry Titov wrote:
> > > On 2011/09/21 17:48:19, jennb wrote:
> > > > On 2011/09/21 16:54:15, prasadt wrote:
> > > > > We don't compile the implementation of GetInstance into all the
> platforms.
> > 
> > > > > Using that directly in the test will make you to choose between some
not
> > so
> > > > > great alternatives:
> > > > > 1) Exclude panel_browsertest.cc on certain platforms
> > > > > 2) Add a .cc file for each platform just to include a dummy defintion.
> > > > > 3) Use #if in panel_mouse_watcher.h file to include a dummy definition
> for
> > > > some
> > > > > platforms.
> > > > > 
> > > > > Using PanelMouseWatcher::GetInstance() was what was causing the build
> > break.
> > > 
> > > > > Having this method in NativePanelTesting seemed to me the best
> > alternative. 
> > > > > Just FYI, not to say it can't be improved upon.
> > > > 
> > > > The build break was because there was no implementation of
> > > > PanelMouseWatcher::GetInstance on all platforms. Once we have that, it
> will
> > be
> > > > safe to remove this. We're not there yet, of course.
> > > 
> > > Indeed. With GetInstance() implemented on all platforms, we could just use
> > that.
> > 
> > True but "all platforms" seems to be a bit of a moving target. Do a
> > auto_hiding_desktop_bar* in the panels directory to see all the platforms
that
> > Jian had to handle to build successfully. "aura" is one of them, I don't
know
> > what exactly it is but we may not be supporting it for a while.
> > 
> > > All Singleton-based classes are usually accessed as FooBar::GetInstance(),
> we
> > > probably should do the same.
> > 
> > The platform specific implementations of these methods are only accessed
from
> > platform specific code, so there isn't an issue of unresolved symbols. The
> > platforms that refer to the method would also implement it.
> > 
> > Our case is different because we're accessing this method wich has platform
> > specific implementations, from panel_browsertest.cc which is platform
> > independent i.e it gets compiled/linked on all platforms.  This means we
need
> a
> > dummy implementation for every platform, even "aura" which we may not care
> > about.  Note that this requirement is not there for building chrome (as
> opposed
> > to browser_tests) where we access this method only from platform specific
> files.
> > 
> > Prasad
> 
> I think 'aura' is new 'views'. It's what Ben is building...
> 
> Is there a difference between PanelMouseWatcher::GetInstance() and
> Panel::CreateNativePanel()? Both are called from platform-independent code, so
> both should provide the necessary implementations.

No.  There isn't any difference between the two.  I thought this is unique but I
guess we got this covered already.

> It seems that if any Panel classes are compiled on a given platform at all,
the
> PanelMouseWatcher should have some implementation there... If I am not missing
> something.

May be I'm mis-guided in thinking of aura as a "different" platform.  Any
platform that builds one of our NativePanel implementations should build one of
the PanelMouseWatcher implementation, eventually.  I thought, likely
incorrectly, that aura is an example of a platform where none of our three
NativePanel implementations gets built.

Just to make sure you're not waiting, you already got my lgtm.

Prasad

Powered by Google App Engine
This is Rietveld 408576698