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

Unified Diff: chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h

Issue 1173523006: Re-enable WebView ChromeVox manual script injection when accessibility status changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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: chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h
diff --git a/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h
index d21d8a47adc2faace21621bd2cd0d8dab403f8d6..3c6cd0bd3d62ba0fd801ab67ed22a972418208cb 100644
--- a/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h
+++ b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h
@@ -29,6 +29,7 @@ class ChromeWebViewGuestDelegate : public WebViewGuestDelegate {
// WebViewGuestDelegate implementation.
bool HandleContextMenu(const content::ContextMenuParams& params) override;
void OnAttachWebViewHelpers(content::WebContents* contents) override;
+ void OnDidInitialize() override;
void OnGuestDestroyed() override;
void OnShowContextMenu(int request_id, const MenuItemVector* items) override;
@@ -43,14 +44,31 @@ class ChromeWebViewGuestDelegate : public WebViewGuestDelegate {
static scoped_ptr<base::ListValue> MenuModelToValue(
const ui::SimpleMenuModel& menu_model);
+ void InjectChromeVoxIfNeeded(content::RenderViewHost* render_view_host);
+
+#if defined(OS_CHROMEOS)
+ // Notification of a change in the state of an accessibility setting.
+ void OnAccessibilityStatusChanged(
+ const chromeos::AccessibilityStatusEventDetails& details);
+#endif
+
// A counter to generate a unique request id for a context menu request.
// We only need the ids to be unique for a given WebViewGuest.
int pending_context_menu_request_id_;
+ // Set to |true| if ChromeVox was already injected in main frame.
+ bool chromevox_injected_;
+
// Holds the RenderViewContextMenuBase that has been built but yet to be
// shown. This is .reset() after ShowContextMenu().
scoped_ptr<RenderViewContextMenuBase> pending_menu_;
+#if defined(OS_CHROMEOS)
+ // Subscription to receive notifications on changes to a11y settings.
+ scoped_ptr<chromeos::AccessibilityStatusSubscription>
+ accessibility_subscription_;
+#endif
+
WebViewGuest* const web_view_guest_;
// This is used to ensure pending tasks will not fire after this object is
@@ -63,3 +81,4 @@ class ChromeWebViewGuestDelegate : public WebViewGuestDelegate {
} // namespace extensions
#endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_
+

Powered by Google App Engine
This is Rietveld 408576698