| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef EXTENSIONS_RENDERER_API_AUTOMATION_AUTOMATION_API_HELPER_H_ | 5 #ifndef EXTENSIONS_RENDERER_API_AUTOMATION_AUTOMATION_API_HELPER_H_ |
| 6 #define EXTENSIONS_RENDERER_API_AUTOMATION_AUTOMATION_API_HELPER_H_ | 6 #define EXTENSIONS_RENDERER_API_AUTOMATION_AUTOMATION_API_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "content/public/renderer/render_view_observer.h" | 10 #include "content/public/renderer/render_view_observer.h" |
| 11 | 11 |
| 12 namespace extensions { | 12 namespace extensions { |
| 13 | 13 |
| 14 // Renderer-side implementation for chrome.automation API (for the few pieces | 14 // Renderer-side implementation for chrome.automation API (for the few pieces |
| 15 // which aren't built in to the existing accessibility system). | 15 // which aren't built in to the existing accessibility system). |
| 16 class AutomationApiHelper : public content::RenderViewObserver { | 16 class AutomationApiHelper : public content::RenderViewObserver { |
| 17 public: | 17 public: |
| 18 explicit AutomationApiHelper(content::RenderView* render_view); | 18 explicit AutomationApiHelper(content::RenderView* render_view); |
| 19 ~AutomationApiHelper() override; | 19 ~AutomationApiHelper() override; |
| 20 | 20 |
| 21 private: | 21 private: |
| 22 // RenderViewObserver implementation. | 22 // RenderViewObserver implementation. |
| 23 bool OnMessageReceived(const IPC::Message& message) override; | 23 bool OnMessageReceived(const IPC::Message& message) override; |
| 24 void OnDestruct() override; |
| 24 | 25 |
| 25 void OnQuerySelector(int acc_obj_id, | 26 void OnQuerySelector(int acc_obj_id, |
| 26 int request_id, | 27 int request_id, |
| 27 const base::string16& selector); | 28 const base::string16& selector); |
| 28 | 29 |
| 29 DISALLOW_COPY_AND_ASSIGN(AutomationApiHelper); | 30 DISALLOW_COPY_AND_ASSIGN(AutomationApiHelper); |
| 30 }; | 31 }; |
| 31 | 32 |
| 32 } // namespace extensions | 33 } // namespace extensions |
| 33 | 34 |
| 34 #endif // EXTENSIONS_RENDERER_API_AUTOMATION_AUTOMATION_API_HELPER_H_ | 35 #endif // EXTENSIONS_RENDERER_API_AUTOMATION_AUTOMATION_API_HELPER_H_ |
| OLD | NEW |