Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / content / public / browser / render_frame_host.h
index 1ea7d30..25ad4d3 100644 (file)
@@ -12,6 +12,7 @@
 #include "ipc/ipc_listener.h"
 #include "ipc/ipc_sender.h"
 #include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/rect.h"
 #include "url/gurl.h"
 
 namespace base {
@@ -21,8 +22,8 @@ class Value;
 namespace content {
 class RenderProcessHost;
 class RenderViewHost;
+class ServiceRegistry;
 class SiteInstance;
-struct CustomContextMenuContext;
 
 // The interface provides a communication conduit with a frame in the renderer.
 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener,
@@ -65,45 +66,6 @@ class CONTENT_EXPORT RenderFrameHost : public IPC::Listener,
   // Returns the associated widget's native view.
   virtual gfx::NativeView GetNativeView() = 0;
 
-  // Runs the beforeunload handler for this frame.  The result will be returned
-  // via FrameMsg_BeforeUnload_ACK.  Currently only used for the main frame.
-  // See also ClosePage and SwapOut in RenderViewHost, which run the unload
-  // handler.
-  //
-  // |for_cross_site_transition| indicates whether this call is for the current
-  // frame during a cross-process navigation.  False means we're closing the
-  // entire tab.
-  //
-  // TODO(creis): We should run the beforeunload handler for every frame that
-  // has one.
-  // TODO(creis): This should be public on the Navigator interface instead of
-  // RenderFrameHost, since callers outside content shouldn't need to call this
-  // directly on subframes.
-  virtual void DispatchBeforeUnload(bool for_cross_site_transition) = 0;
-
-  // Let the renderer know that the menu has been closed.
-  virtual void NotifyContextMenuClosed(
-      const CustomContextMenuContext& context) = 0;
-
-  // Executes custom context menu action that was provided from Blink.
-  virtual void ExecuteCustomContextMenuCommand(
-      int action, const CustomContextMenuContext& context) = 0;
-
-  // Edit operations.
-  virtual void Undo() = 0;
-  virtual void Redo() = 0;
-  virtual void Cut() = 0;
-  virtual void Copy() = 0;
-  virtual void CopyToFindPboard() = 0;
-  virtual void Paste() = 0;
-  virtual void PasteAndMatchStyle() = 0;
-  virtual void Delete() = 0;
-  virtual void SelectAll() = 0;
-  virtual void Unselect() = 0;
-
-  // Requests the renderer to insert CSS into the frame's document.
-  virtual void InsertCSS(const std::string& css) = 0;
-
   // Runs some JavaScript in this frame's context. If a callback is provided, it
   // will be used to return the result, when the result is available.
   typedef base::Callback<void(const base::Value*)> JavaScriptResultCallback;
@@ -111,9 +73,24 @@ class CONTENT_EXPORT RenderFrameHost : public IPC::Listener,
   virtual void ExecuteJavaScript(const base::string16& javascript,
                                  const JavaScriptResultCallback& callback) = 0;
 
+  // ONLY FOR TESTS: Same as above but adds a fake UserGestureIndicator around
+  // execution. (crbug.com/408426)
+  virtual void ExecuteJavaScriptForTests(const base::string16& javascript) = 0;
+
+  // Accessibility actions.
+  virtual void AccessibilitySetFocus(int acc_obj_id) = 0;
+  virtual void AccessibilityDoDefaultAction(int acc_obj_id) = 0;
+  virtual void AccessibilityScrollToMakeVisible(
+      int acc_obj_id, const gfx::Rect& subfocus) = 0;
+  virtual void AccessibilitySetTextSelection(
+      int acc_obj_id, int start_offset, int end_offset) = 0;
+
   // Temporary until we get rid of RenderViewHost.
   virtual RenderViewHost* GetRenderViewHost() = 0;
 
+  // Returns the ServiceRegistry for this frame.
+  virtual ServiceRegistry* GetServiceRegistry() = 0;
+
  private:
   // This interface should only be implemented inside content.
   friend class RenderFrameHostImpl;