Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 // Returns the associated widget's native view. | 66 // Returns the associated widget's native view. |
| 67 virtual gfx::NativeView GetNativeView() = 0; | 67 virtual gfx::NativeView GetNativeView() = 0; |
| 68 | 68 |
| 69 // Runs some JavaScript in this frame's context. If a callback is provided, it | 69 // Runs some JavaScript in this frame's context. If a callback is provided, it |
| 70 // will be used to return the result, when the result is available. | 70 // will be used to return the result, when the result is available. |
| 71 typedef base::Callback<void(const base::Value*)> JavaScriptResultCallback; | 71 typedef base::Callback<void(const base::Value*)> JavaScriptResultCallback; |
| 72 virtual void ExecuteJavaScript(const base::string16& javascript) = 0; | 72 virtual void ExecuteJavaScript(const base::string16& javascript) = 0; |
| 73 virtual void ExecuteJavaScript(const base::string16& javascript, | 73 virtual void ExecuteJavaScript(const base::string16& javascript, |
| 74 const JavaScriptResultCallback& callback) = 0; | 74 const JavaScriptResultCallback& callback) = 0; |
| 75 | 75 |
| 76 // ONLY FOR TESTS: Same as above but adds a fake UserGestureIndicator before | |
|
Rick Byers
2014/08/29 13:38:38
nit: s/before/around.
Zeeshan Qureshi
2014/08/29 16:16:37
Done.
| |
| 77 // execution. (crbug.com/408426) | |
| 78 virtual void ExecuteJavaScriptForTests(const base::string16& javascript) = 0; | |
| 79 | |
| 76 // Accessibility actions. | 80 // Accessibility actions. |
| 77 virtual void AccessibilitySetFocus(int acc_obj_id) = 0; | 81 virtual void AccessibilitySetFocus(int acc_obj_id) = 0; |
| 78 virtual void AccessibilityDoDefaultAction(int acc_obj_id) = 0; | 82 virtual void AccessibilityDoDefaultAction(int acc_obj_id) = 0; |
| 79 virtual void AccessibilityScrollToMakeVisible( | 83 virtual void AccessibilityScrollToMakeVisible( |
| 80 int acc_obj_id, const gfx::Rect& subfocus) = 0; | 84 int acc_obj_id, const gfx::Rect& subfocus) = 0; |
| 81 virtual void AccessibilitySetTextSelection( | 85 virtual void AccessibilitySetTextSelection( |
| 82 int acc_obj_id, int start_offset, int end_offset) = 0; | 86 int acc_obj_id, int start_offset, int end_offset) = 0; |
| 83 | 87 |
| 84 // Temporary until we get rid of RenderViewHost. | 88 // Temporary until we get rid of RenderViewHost. |
| 85 virtual RenderViewHost* GetRenderViewHost() = 0; | 89 virtual RenderViewHost* GetRenderViewHost() = 0; |
| 86 | 90 |
| 87 // Returns the ServiceRegistry for this frame. | 91 // Returns the ServiceRegistry for this frame. |
| 88 virtual ServiceRegistry* GetServiceRegistry() = 0; | 92 virtual ServiceRegistry* GetServiceRegistry() = 0; |
| 89 | 93 |
| 90 private: | 94 private: |
| 91 // This interface should only be implemented inside content. | 95 // This interface should only be implemented inside content. |
| 92 friend class RenderFrameHostImpl; | 96 friend class RenderFrameHostImpl; |
| 93 RenderFrameHost() {} | 97 RenderFrameHost() {} |
| 94 }; | 98 }; |
| 95 | 99 |
| 96 } // namespace content | 100 } // namespace content |
| 97 | 101 |
| 98 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ | 102 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
| OLD | NEW |