| 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 22 matching lines...) Expand all Loading... |
| 33 struct AXActionData; | 33 struct AXActionData; |
| 34 } | 34 } |
| 35 | 35 |
| 36 namespace content { | 36 namespace content { |
| 37 class AssociatedInterfaceProvider; | 37 class AssociatedInterfaceProvider; |
| 38 class RenderProcessHost; | 38 class RenderProcessHost; |
| 39 class RenderViewHost; | 39 class RenderViewHost; |
| 40 class RenderWidgetHostView; | 40 class RenderWidgetHostView; |
| 41 class SiteInstance; | 41 class SiteInstance; |
| 42 struct FileChooserFileInfo; | 42 struct FileChooserFileInfo; |
| 43 struct FormFieldData; |
| 44 |
| 45 using FormFieldDataCallback = base::Callback<void(const FormFieldData&)>; |
| 43 | 46 |
| 44 // The interface provides a communication conduit with a frame in the renderer. | 47 // The interface provides a communication conduit with a frame in the renderer. |
| 45 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, | 48 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, |
| 46 public IPC::Sender { | 49 public IPC::Sender { |
| 47 public: | 50 public: |
| 48 // Returns the RenderFrameHost given its ID and the ID of its render process. | 51 // Returns the RenderFrameHost given its ID and the ID of its render process. |
| 49 // Returns nullptr if the IDs do not correspond to a live RenderFrameHost. | 52 // Returns nullptr if the IDs do not correspond to a live RenderFrameHost. |
| 50 static RenderFrameHost* FromID(int render_process_id, int render_frame_id); | 53 static RenderFrameHost* FromID(int render_process_id, int render_frame_id); |
| 51 | 54 |
| 52 #if defined(OS_ANDROID) | 55 #if defined(OS_ANDROID) |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 virtual bool HasSelection() = 0; | 218 virtual bool HasSelection() = 0; |
| 216 | 219 |
| 217 // Text surrounding selection. | 220 // Text surrounding selection. |
| 218 typedef base::Callback< | 221 typedef base::Callback< |
| 219 void(const base::string16& content, int start_offset, int end_offset)> | 222 void(const base::string16& content, int start_offset, int end_offset)> |
| 220 TextSurroundingSelectionCallback; | 223 TextSurroundingSelectionCallback; |
| 221 virtual void RequestTextSurroundingSelection( | 224 virtual void RequestTextSurroundingSelection( |
| 222 const TextSurroundingSelectionCallback& callback, | 225 const TextSurroundingSelectionCallback& callback, |
| 223 int max_length) = 0; | 226 int max_length) = 0; |
| 224 | 227 |
| 228 // Retrieves the text input info associated with the current form field. |
| 229 virtual void RequestFocusedFormFieldData(FormFieldDataCallback& callback) = 0; |
| 230 |
| 225 private: | 231 private: |
| 226 // This interface should only be implemented inside content. | 232 // This interface should only be implemented inside content. |
| 227 friend class RenderFrameHostImpl; | 233 friend class RenderFrameHostImpl; |
| 228 RenderFrameHost() {} | 234 RenderFrameHost() {} |
| 229 }; | 235 }; |
| 230 | 236 |
| 231 } // namespace content | 237 } // namespace content |
| 232 | 238 |
| 233 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ | 239 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
| OLD | NEW |