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

Issue 151083002: Create a visible window with class name Chrome_RenderWidgetHostHWND which corresponds to the bounds… (Closed)

Created:
6 years, 10 months ago by ananta
Modified:
6 years, 9 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, yusukes+watch_chromium.org, plundblad+watch_chromium.org, yukishiino+watch_chromium.org, aboxhall+watch_chromium.org, yoshiki+watch_chromium.org, jam, penghuang+watch_chromium.org, yuzo+watch_chromium.org, sievers+watch_chromium.org, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, James Su, tfarina, miu+watch_chromium.org
Visibility:
Public.

Description

Create a visible window with class name Chrome_RenderWidgetHostHWND which corresponds to the bounds of the web contents. This is done to ensure that legacy drivers for trackpoints/trackpads and others which use track gestures for back forward navigations work. These drivers call the WindowFromPoint API and get the process name. For Chrome they look for the old Window class Chrome_RenderWidgetHostHWND. They use this to determine whether to send mouse wheels and special keyboard message for back forward navigations, etc. With Aura we don't have this window class anymore causing Chrome to not work well for a number of users. To workaround this in the shortterm, a dummy HWND with the Chrome_RenderWidgetHostHWND class name is created. This window is visible and handles mouse events. It is transparent to ensure that it does not need to draw. To ensure that we don't mess wit mouse events too much we set capture to the parent window as needed. This window also serves as the parent to windowless NPAPI plugins like Flash. Additionally the dummy accessibility window with this class name has been removed and the functionality has been consolidated into the newly added LegacyRenderWidgetHostHWND class which provides this functionality. BUG=326022, 335941 R=cpu@chromium.org, scottmg@chromium.org, sky@chromium.org, cpu, scottmg TBR=jam Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=249537

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Total comments: 4

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Total comments: 14

Patch Set 13 : #

Patch Set 14 : #

Patch Set 15 : #

Total comments: 12

Patch Set 16 : #

Patch Set 17 : #

Total comments: 9

Patch Set 18 : #

Patch Set 19 : #

Patch Set 20 : #

Patch Set 21 : #

Total comments: 4

Patch Set 22 : #

Total comments: 4

Patch Set 23 : #

Patch Set 24 : #

Patch Set 25 : #

Patch Set 26 : #

Patch Set 27 : #

Total comments: 2

Patch Set 28 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+415 lines, -164 lines) Patch
M content/browser/accessibility/browser_accessibility_manager_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_manager_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 3 chunks +11 lines, -92 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 4 chunks +11 lines, -3 lines 0 comments Download
A content/browser/renderer_host/legacy_render_widget_host_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +128 lines, -0 lines 0 comments Download
A content/browser/renderer_host/legacy_render_widget_host_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +181 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +0 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +0 lines, -18 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 2 chunks +10 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 14 chunks +65 lines, -38 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
ananta
6 years, 10 months ago (2014-01-31 01:46:14 UTC) #1
ananta
+shrikant
6 years, 10 months ago (2014-01-31 01:52:39 UTC) #2
scottmg
Scary! Is there any way we could do this on only when necessary? I guess ...
6 years, 10 months ago (2014-01-31 17:28:47 UTC) #3
ananta
As per a discussion with cpu on Wed, we decided to put this CL up ...
6 years, 10 months ago (2014-01-31 18:25:29 UTC) #4
scottmg
I patched it in, and seems to be ok, so I guess... lgtm-ish. :) This ...
6 years, 10 months ago (2014-01-31 21:52:00 UTC) #5
scottmg
Oh, also touch events I guess. Do we need to do anything explicit to forward ...
6 years, 10 months ago (2014-01-31 22:15:24 UTC) #6
dmazzoni at google
Ananta, can you confirm that the transparent HWND doesn't mess up accessible hit testing using ...
6 years, 10 months ago (2014-01-31 23:13:04 UTC) #7
ananta
Keyboard events go directly to the parent window, very likely because the child is transparent. ...
6 years, 10 months ago (2014-01-31 23:56:25 UTC) #8
ananta
On 2014/01/31 23:13:04, dmazzoni at google wrote: > Ananta, can you confirm that the transparent ...
6 years, 10 months ago (2014-01-31 23:58:33 UTC) #9
ananta
+sky
6 years, 10 months ago (2014-02-03 21:17:33 UTC) #10
ananta
Update the patchset to not subclass the parent and capture mouse events. We now send ...
6 years, 10 months ago (2014-02-04 01:58:29 UTC) #11
cpu_(ooo_6.6-7.5)
https://codereview.chromium.org/151083002/diff/1610001/content/browser/accessibility/browser_accessibility_manager_win.cc File content/browser/accessibility/browser_accessibility_manager_win.cc (right): https://codereview.chromium.org/151083002/diff/1610001/content/browser/accessibility/browser_accessibility_manager_win.cc#newcode39 content/browser/accessibility/browser_accessibility_manager_win.cc:39: parent_hwnd_(accessible_hwnd->parent()), I don't think parent_hwnd_ is used except in ...
6 years, 10 months ago (2014-02-04 22:35:58 UTC) #12
ananta
https://codereview.chromium.org/151083002/diff/1610001/content/browser/renderer_host/legacy_render_widget_host_win.cc File content/browser/renderer_host/legacy_render_widget_host_win.cc (right): https://codereview.chromium.org/151083002/diff/1610001/content/browser/renderer_host/legacy_render_widget_host_win.cc#newcode19 content/browser/renderer_host/legacy_render_widget_host_win.cc:19: Create(parent, rect, L"Chrome Legacy Helper", On 2014/02/04 22:35:58, cpu ...
6 years, 10 months ago (2014-02-04 23:30:45 UTC) #13
ananta
https://codereview.chromium.org/151083002/diff/1610001/content/browser/accessibility/browser_accessibility_manager_win.cc File content/browser/accessibility/browser_accessibility_manager_win.cc (right): https://codereview.chromium.org/151083002/diff/1610001/content/browser/accessibility/browser_accessibility_manager_win.cc#newcode39 content/browser/accessibility/browser_accessibility_manager_win.cc:39: parent_hwnd_(accessible_hwnd->parent()), On 2014/02/04 22:35:58, cpu wrote: > I don't ...
6 years, 10 months ago (2014-02-04 23:31:57 UTC) #14
cpu_(ooo_6.6-7.5)
lgtm I am both scared and excited to land this.
6 years, 10 months ago (2014-02-05 03:07:58 UTC) #15
sky
https://codereview.chromium.org/151083002/diff/890002/content/browser/renderer_host/legacy_render_widget_host_win.cc File content/browser/renderer_host/legacy_render_widget_host_win.cc (right): https://codereview.chromium.org/151083002/diff/890002/content/browser/renderer_host/legacy_render_widget_host_win.cc#newcode21 content/browser/renderer_host/legacy_render_widget_host_win.cc:21: CheckWindowCreated(hwnd()) https://codereview.chromium.org/151083002/diff/890002/content/browser/renderer_host/legacy_render_widget_host_win.cc#newcode26 content/browser/renderer_host/legacy_render_widget_host_win.cc:26: HRESULT hr = ::CreateStdAccessibleObject( Did you ...
6 years, 10 months ago (2014-02-05 15:22:43 UTC) #16
ananta
https://codereview.chromium.org/151083002/diff/890002/content/browser/renderer_host/legacy_render_widget_host_win.cc File content/browser/renderer_host/legacy_render_widget_host_win.cc (right): https://codereview.chromium.org/151083002/diff/890002/content/browser/renderer_host/legacy_render_widget_host_win.cc#newcode21 content/browser/renderer_host/legacy_render_widget_host_win.cc:21: On 2014/02/05 15:22:44, sky wrote: > CheckWindowCreated(hwnd()) Cannot use ...
6 years, 10 months ago (2014-02-05 16:35:50 UTC) #17
sky
https://codereview.chromium.org/151083002/diff/2400001/content/browser/renderer_host/legacy_render_widget_host_win.cc File content/browser/renderer_host/legacy_render_widget_host_win.cc (right): https://codereview.chromium.org/151083002/diff/2400001/content/browser/renderer_host/legacy_render_widget_host_win.cc#newcode21 content/browser/renderer_host/legacy_render_widget_host_win.cc:21: // The window creation could fail if we are ...
6 years, 10 months ago (2014-02-05 18:16:47 UTC) #18
ananta
https://codereview.chromium.org/151083002/diff/2400001/content/browser/renderer_host/legacy_render_widget_host_win.cc File content/browser/renderer_host/legacy_render_widget_host_win.cc (right): https://codereview.chromium.org/151083002/diff/2400001/content/browser/renderer_host/legacy_render_widget_host_win.cc#newcode21 content/browser/renderer_host/legacy_render_widget_host_win.cc:21: // The window creation could fail if we are ...
6 years, 10 months ago (2014-02-05 19:52:35 UTC) #19
sky
https://codereview.chromium.org/151083002/diff/2400001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/151083002/diff/2400001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode3529 content/browser/renderer_host/render_widget_host_view_aura.cc:3529: if (legacy_render_widget_host_HWND_ && GetNativeViewId()) { On 2014/02/05 19:52:36, ananta ...
6 years, 10 months ago (2014-02-05 21:56:15 UTC) #20
sky
LGTM with a comment
6 years, 10 months ago (2014-02-05 22:09:12 UTC) #21
ananta
On 2014/02/05 21:56:15, sky wrote: > https://codereview.chromium.org/151083002/diff/2400001/content/browser/renderer_host/render_widget_host_view_aura.cc > File content/browser/renderer_host/render_widget_host_view_aura.cc (right): > > https://codereview.chromium.org/151083002/diff/2400001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode3529 > ...
6 years, 10 months ago (2014-02-05 22:20:25 UTC) #22
ananta
On 2014/02/05 22:20:25, ananta wrote: > On 2014/02/05 21:56:15, sky wrote: > > > https://codereview.chromium.org/151083002/diff/2400001/content/browser/renderer_host/render_widget_host_view_aura.cc ...
6 years, 10 months ago (2014-02-05 22:52:20 UTC) #23
sky
https://codereview.chromium.org/151083002/diff/2630003/content/browser/renderer_host/legacy_render_widget_host_win.h File content/browser/renderer_host/legacy_render_widget_host_win.h (right): https://codereview.chromium.org/151083002/diff/2630003/content/browser/renderer_host/legacy_render_widget_host_win.h#newcode58 content/browser/renderer_host/legacy_render_widget_host_win.h:58: static LegacyRenderWidgetHostHWND* Create(HWND parent); nit: make this return a ...
6 years, 10 months ago (2014-02-05 23:56:40 UTC) #24
ananta
https://codereview.chromium.org/151083002/diff/2630003/content/browser/renderer_host/legacy_render_widget_host_win.h File content/browser/renderer_host/legacy_render_widget_host_win.h (right): https://codereview.chromium.org/151083002/diff/2630003/content/browser/renderer_host/legacy_render_widget_host_win.h#newcode58 content/browser/renderer_host/legacy_render_widget_host_win.h:58: static LegacyRenderWidgetHostHWND* Create(HWND parent); On 2014/02/05 23:56:41, sky wrote: ...
6 years, 10 months ago (2014-02-06 00:42:03 UTC) #25
sky
LGTM https://codereview.chromium.org/151083002/diff/3140001/content/browser/renderer_host/legacy_render_widget_host_win.cc File content/browser/renderer_host/legacy_render_widget_host_win.cc (right): https://codereview.chromium.org/151083002/diff/3140001/content/browser/renderer_host/legacy_render_widget_host_win.cc#newcode17 content/browser/renderer_host/legacy_render_widget_host_win.cc:17: scoped_ptr<LegacyRenderWidgetHostHWND> LegacyRenderWidgetHostHWND::Create(HWND parent) { nit: > 80 https://codereview.chromium.org/151083002/diff/3140001/content/browser/renderer_host/legacy_render_widget_host_win.h ...
6 years, 10 months ago (2014-02-06 00:58:40 UTC) #26
ananta
https://codereview.chromium.org/151083002/diff/3140001/content/browser/renderer_host/legacy_render_widget_host_win.cc File content/browser/renderer_host/legacy_render_widget_host_win.cc (right): https://codereview.chromium.org/151083002/diff/3140001/content/browser/renderer_host/legacy_render_widget_host_win.cc#newcode17 content/browser/renderer_host/legacy_render_widget_host_win.cc:17: scoped_ptr<LegacyRenderWidgetHostHWND> LegacyRenderWidgetHostHWND::Create(HWND parent) { On 2014/02/06 00:58:41, sky wrote: ...
6 years, 10 months ago (2014-02-06 01:15:57 UTC) #27
ananta
Added a switch disable-legacy-window to enable QA and others to verify if the addition of ...
6 years, 10 months ago (2014-02-06 20:13:44 UTC) #28
cpu_(ooo_6.6-7.5)
https://codereview.chromium.org/151083002/diff/3570003/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/151083002/diff/3570003/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode155 content/browser/renderer_host/render_widget_host_view_aura.cc:155: ::InvalidateRect(window, NULL, FALSE); do we need this? aren't we ...
6 years, 10 months ago (2014-02-06 21:23:04 UTC) #29
ananta
https://codereview.chromium.org/151083002/diff/3570003/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/151083002/diff/3570003/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode155 content/browser/renderer_host/render_widget_host_view_aura.cc:155: ::InvalidateRect(window, NULL, FALSE); On 2014/02/06 21:23:05, cpu wrote: > ...
6 years, 10 months ago (2014-02-06 21:26:10 UTC) #30
cpu_(ooo_6.6-7.5)
lgtm
6 years, 10 months ago (2014-02-06 21:26:54 UTC) #31
ananta
TBR'ing jam for content OWNERS stamp
6 years, 10 months ago (2014-02-06 23:56:24 UTC) #32
ananta
Committed patchset #28 manually as r249537.
6 years, 10 months ago (2014-02-07 00:00:33 UTC) #33
tietjen.anthony
6 years, 9 months ago (2014-03-04 17:54:36 UTC) #34
Message was sent while issue was closed.
It appears that the Chrome_RenderWidgetHostHWND (which "Visible" but
"Transparent") is in Chrome 34 Beta and 35 Canary for Windows. When using a tool
to look at the window hierarchy, there is only one of those listed as children
under the main Chrome instance. When switching tabs, it switches out the handle
of that Chrome_RenderWidgetHostHWND but still only shows one instance of it
under the main Chrome instance.

However, using a window hierarchy inspection tool on Chrome 33 Stable it reveals
multiple [Static] handles (which are not "Visible") as children of the main
Chrome instance. It seems there is one for each tab.

If I understand correctly, you made the change to use
Chrome_RenderWidgetHostHWND instead of the [Static] objects because the [Static]
objects didn't work for vendors' existing code which looks for the
Chrome_RenderWidgetHostHWND instead.

I just have a few questions:
1. Is this something that broke for vendors with the release of the Aura
versions of Chrome?
2. Did older versions of Chrome (that didn't use Aura) use
Chrome_RenderWidgetHostHWND, thus it used to work for vendors?
3. Most importantly: The description states that this is a short-term
workaround. Also, one comment indicates that it would go to QA before deciding
to drop it. Will you continue to use Chrome_RenderWidgetHostHWND in the future
releases, or is there another potential solution in the works?

Thanks in advance!

Anthony

Powered by Google App Engine
This is Rietveld 408576698