diff options
Diffstat (limited to 'chromium/content/public/browser/web_contents.h')
-rw-r--r-- | chromium/content/public/browser/web_contents.h | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/chromium/content/public/browser/web_contents.h b/chromium/content/public/browser/web_contents.h index f968ca22bcc..ebd18a09057 100644 --- a/chromium/content/public/browser/web_contents.h +++ b/chromium/content/public/browser/web_contents.h @@ -27,6 +27,7 @@ #include "content/public/common/stop_find_action.h" #include "ipc/ipc_sender.h" #include "third_party/skia/include/core/SkColor.h" +#include "ui/accessibility/ax_tree_update.h" #include "ui/base/window_open_disposition.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/native_widget_types.h" @@ -43,6 +44,12 @@ namespace blink { struct WebFindOptions; } +namespace device { +namespace mojom { +class WakeLockContext; +} +} + namespace net { struct LoadStateWithParam; } @@ -244,9 +251,22 @@ class WebContents : public PageNavigator, virtual RenderFrameHost* GetFocusedFrame() = 0; // Returns the current RenderFrameHost for a given FrameTreeNode ID if it is - // part of this tab. See RenderFrameHost::GetFrameTreeNodeId for documentation - // on this ID. - virtual RenderFrameHost* FindFrameByFrameTreeNodeId( + // part of this frame tree, not including frames in any inner WebContents. + // Returns nullptr if |process_id| does not match the current + // RenderFrameHost's process ID, to avoid security bugs where callers do not + // realize a cross-process navigation (and thus privilege change) has taken + // place. See RenderFrameHost::GetFrameTreeNodeId for documentation on + // frame_tree_node_id. + virtual RenderFrameHost* FindFrameByFrameTreeNodeId(int frame_tree_node_id, + int process_id) = 0; + + // NOTE: This is generally unsafe to use. Use FindFrameByFrameTreeNodeId + // instead. + // Returns the current RenderFrameHost for a given FrameTreeNode ID if it is + // part of this frame tree. This may not match the caller's expectation, if a + // cross-process navigation (and thus privilege change) has taken place. + // See RenderFrameHost::GetFrameTreeNodeId for documentation on this ID. + virtual RenderFrameHost* UnsafeFindFrameByFrameTreeNodeId( int frame_tree_node_id) = 0; // Calls |on_frame| for each frame in the currently active view. @@ -278,6 +298,12 @@ class WebContents : public PageNavigator, // menus. virtual RenderWidgetHostView* GetTopLevelRenderWidgetHostView() = 0; + // Request a one-time snapshot of the accessibility tree without changing + // the accessibility mode. + using AXTreeSnapshotCallback = base::Callback<void(const ui::AXTreeUpdate&)>; + virtual void RequestAXTreeSnapshot( + const AXTreeSnapshotCallback& callback) = 0; + // Causes the current page to be closed, including running its onunload event // handler. virtual void ClosePage() = 0; @@ -586,7 +612,7 @@ class WebContents : public PageNavigator, virtual content::RendererPreferences* GetMutableRendererPrefs() = 0; // Tells the tab to close now. The tab will take care not to close until it's - // out of nested message loops. + // out of nested run loops. virtual void Close() = 0; // A render view-originated drag has ended. Informs the render view host and @@ -654,6 +680,9 @@ class WebContents : public PageNavigator, // otherwise. virtual WebContents* GetOriginalOpener() const = 0; + // Returns the WakeLockContext accociated with this WebContents. + virtual device::mojom::WakeLockContext* GetWakeLockContext() = 0; + typedef base::Callback<void( int, /* id */ int, /* HTTP status code */ |