OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_WEB_CONTENT
S_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_WEB_CONTENT
S_OBSERVER_H_ |
| 7 |
| 8 #include "content/public/browser/web_contents_observer.h" |
| 9 #include "content/public/browser/web_contents_user_data.h" |
| 10 |
| 11 namespace extensions { |
| 12 |
| 13 // Helper class that receives accessibility data from |WebContents|. |
| 14 class AutomationWebContentsObserver |
| 15 : public content::WebContentsObserver, |
| 16 public content::WebContentsUserData<AutomationWebContentsObserver> { |
| 17 public: |
| 18 ~AutomationWebContentsObserver() override {} |
| 19 |
| 20 // content::WebContentsObserver overrides. |
| 21 void AccessibilityEventReceived( |
| 22 const std::vector<content::AXEventNotificationDetails>& details) |
| 23 override; |
| 24 void RenderFrameDeleted( |
| 25 content::RenderFrameHost* render_frame_host) override; |
| 26 |
| 27 private: |
| 28 friend class content::WebContentsUserData<AutomationWebContentsObserver>; |
| 29 |
| 30 explicit AutomationWebContentsObserver(content::WebContents* web_contents); |
| 31 |
| 32 content::BrowserContext* browser_context_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(AutomationWebContentsObserver); |
| 35 }; |
| 36 |
| 37 } // namespace extensions |
| 38 |
| 39 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_WEB_CONT
ENTS_OBSERVER_H_ |
OLD | NEW |