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 CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ |
6 #define CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ |
7 | 7 |
8 #include <vector> | |
not at google - send to devlin
2015/06/02 23:59:25
unused? also the scoped_ptr include and maybe the
dmazzoni
2015/06/04 20:07:39
Done.
| |
9 | |
8 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/containers/hash_tables.h" | |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "chrome/renderer/extensions/chrome_v8_extension_handler.h" | |
9 #include "extensions/renderer/object_backed_native_handler.h" | 14 #include "extensions/renderer/object_backed_native_handler.h" |
15 #include "ui/accessibility/ax_tree.h" | |
10 #include "v8/include/v8.h" | 16 #include "v8/include/v8.h" |
11 | 17 |
18 struct ExtensionMsg_AccessibilityEventParams; | |
19 | |
12 namespace extensions { | 20 namespace extensions { |
13 | 21 |
14 // The native component of custom bindings for the chrome.automationInternal | 22 // The native component of custom bindings for the chrome.automationInternal |
15 // API. | 23 // API. |
16 class AutomationInternalCustomBindings : public ObjectBackedNativeHandler { | 24 class AutomationInternalCustomBindings : public ObjectBackedNativeHandler, |
25 public ChromeV8ExtensionHandler { | |
not at google - send to devlin
2015/06/02 23:59:25
ChromeV8ExtensionHandler is not a nice class, it's
dmazzoni
2015/06/04 20:07:39
As discussed I'll go with a MessageFilter instead,
| |
17 public: | 26 public: |
18 explicit AutomationInternalCustomBindings(ScriptContext* context); | 27 explicit AutomationInternalCustomBindings(ScriptContext* context); |
19 | 28 |
20 ~AutomationInternalCustomBindings() override; | 29 ~AutomationInternalCustomBindings() override; |
21 | 30 |
31 // IPC::Listener | |
32 bool OnMessageReceived(const IPC::Message& message) override; | |
33 | |
22 private: | 34 private: |
23 // Returns whether this extension has the "interact" permission set (either | 35 // Returns whether this extension has the "interact" permission set (either |
24 // explicitly or implicitly after manifest parsing). | 36 // explicitly or implicitly after manifest parsing). |
25 void IsInteractPermitted(const v8::FunctionCallbackInfo<v8::Value>& args); | 37 void IsInteractPermitted(const v8::FunctionCallbackInfo<v8::Value>& args); |
26 | 38 |
27 // Returns an object with bindings that will be added to the | 39 // Returns an object with bindings that will be added to the |
28 // chrome.automation namespace. | 40 // chrome.automation namespace. |
29 void GetSchemaAdditions(const v8::FunctionCallbackInfo<v8::Value>& args); | 41 void GetSchemaAdditions(const v8::FunctionCallbackInfo<v8::Value>& args); |
30 | 42 |
43 // Handle accessibility events from the browser process. | |
44 void OnAccessibilityEvent( | |
45 const ExtensionMsg_AccessibilityEventParams& params); | |
46 | |
31 DISALLOW_COPY_AND_ASSIGN(AutomationInternalCustomBindings); | 47 DISALLOW_COPY_AND_ASSIGN(AutomationInternalCustomBindings); |
32 }; | 48 }; |
33 | 49 |
34 } // namespace extensions | 50 } // namespace extensions |
35 | 51 |
36 #endif // CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ | 52 #endif // CHROME_RENDERER_EXTENSIONS_AUTOMATION_INTERNAL_CUSTOM_BINDINGS_H_ |
OLD | NEW |