| Index: chrome/browser/extensions/api/automation_internal/automation_web_contents_observer.h
|
| diff --git a/chrome/browser/extensions/api/automation_internal/automation_web_contents_observer.h b/chrome/browser/extensions/api/automation_internal/automation_web_contents_observer.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..346bbf497a27bfcb65ad3420ea961f39294dd62e
|
| --- /dev/null
|
| +++ b/chrome/browser/extensions/api/automation_internal/automation_web_contents_observer.h
|
| @@ -0,0 +1,39 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_WEB_CONTENTS_OBSERVER_H_
|
| +#define CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_WEB_CONTENTS_OBSERVER_H_
|
| +
|
| +#include "content/public/browser/web_contents_observer.h"
|
| +#include "content/public/browser/web_contents_user_data.h"
|
| +
|
| +namespace extensions {
|
| +
|
| +// Helper class that receives accessibility data from |WebContents|.
|
| +class AutomationWebContentsObserver
|
| + : public content::WebContentsObserver,
|
| + public content::WebContentsUserData<AutomationWebContentsObserver> {
|
| + public:
|
| + ~AutomationWebContentsObserver() override {}
|
| +
|
| + // content::WebContentsObserver overrides.
|
| + void AccessibilityEventReceived(
|
| + const std::vector<content::AXEventNotificationDetails>& details)
|
| + override;
|
| + void RenderFrameDeleted(
|
| + content::RenderFrameHost* render_frame_host) override;
|
| +
|
| + private:
|
| + friend class content::WebContentsUserData<AutomationWebContentsObserver>;
|
| +
|
| + explicit AutomationWebContentsObserver(content::WebContents* web_contents);
|
| +
|
| + content::BrowserContext* browser_context_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(AutomationWebContentsObserver);
|
| +};
|
| +
|
| +} // namespace extensions
|
| +
|
| +#endif // CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_WEB_CONTENTS_OBSERVER_H_
|
|
|