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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 415633002: Simplify access to LegacyRenderWidgetHostHWND. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@render_frame_ax_4
Patch Set: Rebase and fix style issue Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index ad9fffb58881488ee7895c078cb31e83bcbbfc2d..3c770cd553922fd23f25911d4a145488c1d548a2 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1042,12 +1042,6 @@ void RenderWidgetHostViewAura::OnSwapCompositorFrame(
#if defined(OS_WIN)
void RenderWidgetHostViewAura::SetParentNativeViewAccessible(
gfx::NativeViewAccessible accessible_parent) {
- BrowserAccessibilityManager* manager =
- host_->GetRootBrowserAccessibilityManager();
- if (manager) {
- manager->ToBrowserAccessibilityManagerWin()
- ->set_parent_iaccessible(accessible_parent);
- }
}
gfx::NativeViewId RenderWidgetHostViewAura::GetParentForWindowlessPlugin()
@@ -1197,10 +1191,7 @@ RenderWidgetHostViewAura::CreateBrowserAccessibilityManager(
BrowserAccessibilityDelegate* delegate) {
BrowserAccessibilityManager* manager = NULL;
#if defined(OS_WIN)
- gfx::NativeViewAccessible accessible_parent =
- host_->GetParentNativeViewAccessible();
manager = new BrowserAccessibilityManagerWin(
- legacy_render_widget_host_HWND_, accessible_parent,
BrowserAccessibilityManagerWin::GetEmptyDocument(), delegate);
#else
manager = BrowserAccessibilityManager::Create(
@@ -1209,6 +1200,25 @@ RenderWidgetHostViewAura::CreateBrowserAccessibilityManager(
return manager;
}
+gfx::AcceleratedWidget
+RenderWidgetHostViewAura::AccessibilityGetAcceleratedWidget() {
+#if defined(OS_WIN)
+ if (legacy_render_widget_host_HWND_)
+ return legacy_render_widget_host_HWND_->hwnd();
+#endif
+ return gfx::kNullAcceleratedWidget;
+}
+
+gfx::NativeViewAccessible
+RenderWidgetHostViewAura::AccessibilityGetNativeViewAccessible() {
+#if defined(OS_WIN)
+ if (legacy_render_widget_host_HWND_)
+ return legacy_render_widget_host_HWND_->window_accessible();
+#endif
+ return NULL;
+
+}
+
gfx::GLSurfaceHandle RenderWidgetHostViewAura::GetCompositingSurface() {
return ImageTransportFactory::GetInstance()->GetSharedSurfaceHandle();
}
@@ -2309,12 +2319,6 @@ void RenderWidgetHostViewAura::InternalSetBounds(const gfx::Rect& rect) {
// here.
if (!host_->is_hidden())
legacy_render_widget_host_HWND_->Show();
-
- BrowserAccessibilityManagerWin* manager =
- static_cast<BrowserAccessibilityManagerWin*>(
- host_->GetRootBrowserAccessibilityManager());
- if (manager)
- manager->SetAccessibleHWND(legacy_render_widget_host_HWND_);
}
}

Powered by Google App Engine
This is Rietveld 408576698