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

Issue 860393004: Expose whether a frame is focused to the browser process (Closed)

Created:
5 years, 11 months ago by mlamouri (slow - plz ping)
Modified:
5 years, 10 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, michaeln
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Expose whether a frame is focused to the browser process A frame is considered focused if its associated RenderWidgetHost is focused and it is the focused frame inside its frame tree. BUG=450634 Committed: https://crrev.com/a85eb3fe83825fdc46a01ec37616e10687772884 Cr-Commit-Position: refs/heads/master@{#313085}

Patch Set 1 #

Total comments: 3

Patch Set 2 : review comments #

Total comments: 1

Patch Set 3 : add tests #

Patch Set 4 : compilation fix on Android/Mac #

Total comments: 8

Patch Set 5 : review comments #

Patch Set 6 : try to fix test on mac #

Patch Set 7 : #

Patch Set 8 : rebase #

Patch Set 9 : workaround #

Patch Set 10 : focus works for parents #

Patch Set 11 : Cleaned up #

Total comments: 2

Patch Set 12 : kenrb review comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -1 line) Patch
M content/browser/frame_host/frame_tree_node.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/frame_host/frame_tree_node.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +12 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +7 lines, -0 lines 0 comments Download
A content/browser/frame_host/render_frame_host_impl_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +81 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A content/test/data/render_frame_host/focus.html View 1 2 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (6 generated)
mlamouri (slow - plz ping)
5 years, 11 months ago (2015-01-21 16:29:14 UTC) #2
mlamouri (slow - plz ping)
https://codereview.chromium.org/860393004/diff/1/content/public/browser/render_widget_host.h File content/public/browser/render_widget_host.h (right): https://codereview.chromium.org/860393004/diff/1/content/public/browser/render_widget_host.h#newcode160 content/public/browser/render_widget_host.h:160: virtual bool IsFocused() const = 0; If preferred, I ...
5 years, 11 months ago (2015-01-21 17:29:36 UTC) #3
Charlie Reis
[+kenrb for RWH knowledge] Ken's probably a better reviewer than me here. It's not clear ...
5 years, 11 months ago (2015-01-21 17:55:33 UTC) #5
mlamouri (slow - plz ping)
On 2015/01/21 at 17:55:33, creis wrote: > [+kenrb for RWH knowledge] > > Ken's probably ...
5 years, 11 months ago (2015-01-21 18:15:33 UTC) #6
kenrb
We are talking about tab-level focus and not frame-level focus, right? i.e. when I press ...
5 years, 11 months ago (2015-01-21 18:31:46 UTC) #7
mlamouri (slow - plz ping)
On 2015/01/21 at 18:31:46, kenrb wrote: > We are talking about tab-level focus and not ...
5 years, 11 months ago (2015-01-21 21:33:16 UTC) #8
mlamouri (slow - plz ping)
creis@, PTAL? https://codereview.chromium.org/860393004/diff/1/content/browser/renderer_host/render_widget_host_impl.cc File content/browser/renderer_host/render_widget_host_impl.cc (right): https://codereview.chromium.org/860393004/diff/1/content/browser/renderer_host/render_widget_host_impl.cc#newcode659 content/browser/renderer_host/render_widget_host_impl.cc:659: is_focused_ = false; On 2015/01/21 at 17:55:33, ...
5 years, 11 months ago (2015-01-21 21:33:27 UTC) #9
Charlie Reis
On 2015/01/21 21:33:16, Mounir Lamouri wrote: > On 2015/01/21 at 18:31:46, kenrb wrote: > > ...
5 years, 11 months ago (2015-01-21 22:37:07 UTC) #10
mlamouri (slow - plz ping)
Comments applied. PTAL :)
5 years, 11 months ago (2015-01-21 23:05:37 UTC) #11
Charlie Reis
Thanks. Since it's not just a trivial bool, can you add a test for RFH::IsFocused? ...
5 years, 11 months ago (2015-01-21 23:38:51 UTC) #12
mlamouri (slow - plz ping)
I've added some tests and removed the const marker. PTAL.
5 years, 11 months ago (2015-01-22 11:33:31 UTC) #13
Charlie Reis
Great, much appreciated. LGTM with nits, but only if you're going to use this outside ...
5 years, 11 months ago (2015-01-22 17:46:05 UTC) #14
mlamouri (slow - plz ping)
Review comments applied. https://codereview.chromium.org/860393004/diff/60001/content/browser/frame_host/render_frame_host_impl_browsertest.cc File content/browser/frame_host/render_frame_host_impl_browsertest.cc (right): https://codereview.chromium.org/860393004/diff/60001/content/browser/frame_host/render_frame_host_impl_browsertest.cc#newcode1 content/browser/frame_host/render_frame_host_impl_browsertest.cc:1: // Copyright 2014 The Chromium Authors. ...
5 years, 11 months ago (2015-01-22 18:09:41 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/860393004/80001
5 years, 11 months ago (2015-01-22 18:11:33 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/25917) Try jobs failed on following ...
5 years, 11 months ago (2015-01-22 19:35:19 UTC) #19
mlamouri (slow - plz ping)
My CL has been broken by https://codereview.chromium.org/616133002/. kenrb@ and creis@, could you take a look ...
5 years, 11 months ago (2015-01-23 12:18:13 UTC) #20
mlamouri (slow - plz ping)
creis@ and kenrb@, I've updated this CL to match the recent changes in RFH and ...
5 years, 11 months ago (2015-01-23 17:50:45 UTC) #21
kenrb
One comment, but otherwise lgtm (non-owner). https://codereview.chromium.org/860393004/diff/200001/content/browser/frame_host/render_frame_host_impl.h File content/browser/frame_host/render_frame_host_impl.h (right): https://codereview.chromium.org/860393004/diff/200001/content/browser/frame_host/render_frame_host_impl.h#newcode409 content/browser/frame_host/render_frame_host_impl.h:409: // is the ...
5 years, 11 months ago (2015-01-23 18:40:12 UTC) #22
mlamouri (slow - plz ping)
https://codereview.chromium.org/860393004/diff/200001/content/browser/frame_host/render_frame_host_impl.h File content/browser/frame_host/render_frame_host_impl.h (right): https://codereview.chromium.org/860393004/diff/200001/content/browser/frame_host/render_frame_host_impl.h#newcode409 content/browser/frame_host/render_frame_host_impl.h:409: // is the parent chain of the focused frame ...
5 years, 11 months ago (2015-01-26 14:02:18 UTC) #23
jochen (gone - plz use gerrit)
rubberstamp lgtm
5 years, 11 months ago (2015-01-26 16:00:31 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/860393004/220001
5 years, 11 months ago (2015-01-26 16:02:38 UTC) #27
commit-bot: I haz the power
Committed patchset #12 (id:220001)
5 years, 11 months ago (2015-01-26 17:37:55 UTC) #28
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/a85eb3fe83825fdc46a01ec37616e10687772884 Cr-Commit-Position: refs/heads/master@{#313085}
5 years, 11 months ago (2015-01-26 17:42:36 UTC) #29
leviw_travelin_and_unemployed
5 years, 11 months ago (2015-01-27 20:08:51 UTC) #30
Message was sent while issue was closed.
On 2015/01/26 at 17:42:36, commit-bot wrote:
> Patchset 12 (id:??) landed as
https://crrev.com/a85eb3fe83825fdc46a01ec37616e10687772884
> Cr-Commit-Position: refs/heads/master@{#313085}

the IsFocused_Change test is failing on the webkit waterfall. I'm going to
disable it:
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=Ren...

Powered by Google App Engine
This is Rietveld 408576698