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