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

Issue 394403003: Close the password bubble on the icon click. (Closed)

Created:
6 years, 5 months ago by vasilii
Modified:
6 years, 4 months ago
CC:
chromium-reviews, tfarina, gcasto+watchlist_chromium.org, mkwst+watchlist_chromium.org
Project:
chromium
Visibility:
Public.

Description

Close the password bubble on the icon click. After the password bubble became focusless we need additional code to close it by clicking the "key" icon. BUG=394680 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285641

Patch Set 1 #

Patch Set 2 : Removed the unnecessary command #

Total comments: 9

Patch Set 3 : Added a test #

Total comments: 6

Patch Set 4 : Peter's comments #

Total comments: 6

Patch Set 5 : Don't touch bubble_icon_view.h #

Total comments: 6

Patch Set 6 : rename the getter #

Messages

Total messages: 20 (0 generated)
vasilii
Hi guys, please review.
6 years, 5 months ago (2014-07-21 13:23:38 UTC) #1
Peter Kasting
I don't like the indirection of adding a browser command for this and a whole ...
6 years, 5 months ago (2014-07-21 19:57:49 UTC) #2
Mike West
On 2014/07/21 19:57:49, Peter Kasting wrote: > Why can't we just have clicks on the ...
6 years, 5 months ago (2014-07-22 07:00:57 UTC) #3
vasilii
I removed routing through the command system.
6 years, 5 months ago (2014-07-22 11:41:17 UTC) #4
Mike West
https://codereview.chromium.org/394403003/diff/20001/chrome/browser/ui/passwords/manage_passwords_bubble_model.h File chrome/browser/ui/passwords/manage_passwords_bubble_model.h (right): https://codereview.chromium.org/394403003/diff/20001/chrome/browser/ui/passwords/manage_passwords_bubble_model.h#newcode91 chrome/browser/ui/passwords/manage_passwords_bubble_model.h:91: using content::WebContentsObserver::web_contents; Nit: This seems unnecessary? https://codereview.chromium.org/394403003/diff/20001/chrome/browser/ui/views/location_bar/bubble_icon_view.cc File chrome/browser/ui/views/location_bar/bubble_icon_view.cc ...
6 years, 5 months ago (2014-07-22 12:08:40 UTC) #5
Mike West
Also: can you add a test which ensures that the bubble is closed after interaction ...
6 years, 5 months ago (2014-07-22 12:09:52 UTC) #6
vasilii
I added the test. https://codereview.chromium.org/394403003/diff/20001/chrome/browser/ui/passwords/manage_passwords_bubble_model.h File chrome/browser/ui/passwords/manage_passwords_bubble_model.h (right): https://codereview.chromium.org/394403003/diff/20001/chrome/browser/ui/passwords/manage_passwords_bubble_model.h#newcode91 chrome/browser/ui/passwords/manage_passwords_bubble_model.h:91: using content::WebContentsObserver::web_contents; On 2014/07/22 12:08:40, ...
6 years, 5 months ago (2014-07-22 14:18:51 UTC) #7
Mike West
chrome/browser/ui/passwords and chrome/browser/ui/views/passwords LGTM, thanks. https://codereview.chromium.org/394403003/diff/20001/chrome/browser/ui/views/location_bar/bubble_icon_view.cc File chrome/browser/ui/views/location_bar/bubble_icon_view.cc (right): https://codereview.chromium.org/394403003/diff/20001/chrome/browser/ui/views/location_bar/bubble_icon_view.cc#newcode38 chrome/browser/ui/views/location_bar/bubble_icon_view.cc:38: OnMousePressedIgnored(); On 2014/07/22 14:18:51, ...
6 years, 5 months ago (2014-07-22 14:23:47 UTC) #8
Peter Kasting
https://codereview.chromium.org/394403003/diff/40001/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc File chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc (right): https://codereview.chromium.org/394403003/diff/40001/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc#newcode132 chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc:132: DCHECK(ManagePasswordsBubbleView::Bubble()->web_contents() != web_contents); If this DCHECK is the only ...
6 years, 5 months ago (2014-07-22 18:55:18 UTC) #9
vasilii
https://codereview.chromium.org/394403003/diff/40001/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc File chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc (right): https://codereview.chromium.org/394403003/diff/40001/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc#newcode132 chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc:132: DCHECK(ManagePasswordsBubbleView::Bubble()->web_contents() != web_contents); On 2014/07/22 18:55:18, Peter Kasting wrote: ...
6 years, 5 months ago (2014-07-23 09:22:53 UTC) #10
Peter Kasting
https://codereview.chromium.org/394403003/diff/60001/chrome/browser/ui/views/location_bar/bubble_icon_view.h File chrome/browser/ui/views/location_bar/bubble_icon_view.h (right): https://codereview.chromium.org/394403003/diff/60001/chrome/browser/ui/views/location_bar/bubble_icon_view.h#newcode41 chrome/browser/ui/views/location_bar/bubble_icon_view.h:41: bool suppress_mouse_released_action() const { Rather than add this, we ...
6 years, 5 months ago (2014-07-23 17:58:23 UTC) #11
vasilii
https://codereview.chromium.org/394403003/diff/60001/chrome/browser/ui/views/location_bar/bubble_icon_view.h File chrome/browser/ui/views/location_bar/bubble_icon_view.h (right): https://codereview.chromium.org/394403003/diff/60001/chrome/browser/ui/views/location_bar/bubble_icon_view.h#newcode41 chrome/browser/ui/views/location_bar/bubble_icon_view.h:41: bool suppress_mouse_released_action() const { On 2014/07/23 17:58:23, Peter Kasting ...
6 years, 5 months ago (2014-07-24 15:43:18 UTC) #12
Peter Kasting
Don't worry, even if you didn't understand what I was suggesting, you did exactly what ...
6 years, 5 months ago (2014-07-24 18:18:08 UTC) #13
vasilii
https://codereview.chromium.org/394403003/diff/80001/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h File chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h (right): https://codereview.chromium.org/394403003/diff/80001/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h#newcode142 chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h:142: static const ManagePasswordsBubbleView* Bubble() { On 2014/07/24 18:18:08, Peter ...
6 years, 5 months ago (2014-07-25 08:24:35 UTC) #14
vasilii
The CQ bit was checked by vasilii@chromium.org
6 years, 5 months ago (2014-07-25 08:24:41 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vasilii@chromium.org/394403003/100001
6 years, 5 months ago (2014-07-25 08:26:01 UTC) #16
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-25 16:50:37 UTC) #17
commit-bot: I haz the power
Change committed as 285641
6 years, 5 months ago (2014-07-25 19:13:46 UTC) #18
Peter Kasting
Sigh, somehow didn't send this. Could you deal with this as a followup? https://codereview.chromium.org/394403003/diff/80001/chrome/browser/ui/views/passwords/manage_passwords_icon_view_browsertest.cc File ...
6 years, 5 months ago (2014-07-25 20:34:28 UTC) #19
vasilii
6 years, 4 months ago (2014-07-28 15:58:59 UTC) #20
Message was sent while issue was closed.
https://codereview.chromium.org/394403003/diff/80001/chrome/browser/ui/views/...
File chrome/browser/ui/views/passwords/manage_passwords_icon_view_browsertest.cc
(right):

https://codereview.chromium.org/394403003/diff/80001/chrome/browser/ui/views/...
chrome/browser/ui/views/passwords/manage_passwords_icon_view_browsertest.cc:71:
static_cast<views::View*>(view())->OnMousePressed(mouse_down);
On 2014/07/25 20:34:28, Peter Kasting wrote:
> On 2014/07/25 08:24:34, vasilii wrote:
> > On 2014/07/24 18:18:08, Peter Kasting wrote:
> > > This cast surprises me; what's the type of view() right now?  It can't be
> > "const
> > > views::View*" since static_cast can't cast away const.  So why is this
> > actually
> > > needed?
> > 
> > The type is ManagePasswordsIconView*. BubbleIconView::OnMousePressed is
> > protected. So I cast it back to View* to be able to call it.
> 
> Make OnMousePressed() public and remove this cast, then.
> 
> It's only protected right now because no one else has needed to call it
> publicly; this is a legit usage, so we should unprotect it.

Done.

Powered by Google App Engine
This is Rietveld 408576698