OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WEB_CONTENTS_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
180 // Returns the main frame for the currently active view. | 180 // Returns the main frame for the currently active view. |
181 virtual RenderFrameHost* GetMainFrame() = 0; | 181 virtual RenderFrameHost* GetMainFrame() = 0; |
182 | 182 |
183 // Returns the focused frame for the currently active view. | 183 // Returns the focused frame for the currently active view. |
184 virtual RenderFrameHost* GetFocusedFrame() = 0; | 184 virtual RenderFrameHost* GetFocusedFrame() = 0; |
185 | 185 |
186 // Calls |on_frame| for each frame in the currently active view. | 186 // Calls |on_frame| for each frame in the currently active view. |
187 virtual void ForEachFrame( | 187 virtual void ForEachFrame( |
188 const base::Callback<void(RenderFrameHost*)>& on_frame) = 0; | 188 const base::Callback<void(RenderFrameHost*)>& on_frame) = 0; |
189 | 189 |
190 // Calls |on_frame| for each frame, including pending frames. | |
191 virtual void ForEachFrameAndPendingFrame( | |
192 const base::Callback<void(RenderFrameHost*)>& on_frame) = 0; | |
jam
2014/05/28 18:49:21
2 nits:
-since this is only called in content, it
dmazzoni
2014/05/28 22:01:17
Done.
| |
193 | |
190 // Sends the given IPC to all frames in the currently active view. This is a | 194 // Sends the given IPC to all frames in the currently active view. This is a |
191 // convenience method instead of calling ForEach. | 195 // convenience method instead of calling ForEach. |
192 virtual void SendToAllFrames(IPC::Message* message) = 0; | 196 virtual void SendToAllFrames(IPC::Message* message) = 0; |
193 | 197 |
194 // Gets the current RenderViewHost for this tab. | 198 // Gets the current RenderViewHost for this tab. |
195 virtual RenderViewHost* GetRenderViewHost() const = 0; | 199 virtual RenderViewHost* GetRenderViewHost() const = 0; |
196 | 200 |
197 // Returns the WebContents embedding this WebContents, if any. | 201 // Returns the WebContents embedding this WebContents, if any. |
198 // If this is a top-level WebContents then it returns NULL. | 202 // If this is a top-level WebContents then it returns NULL. |
199 virtual WebContents* GetEmbedderWebContents() const = 0; | 203 virtual WebContents* GetEmbedderWebContents() const = 0; |
(...skipping 22 matching lines...) Expand all Loading... | |
222 virtual WebUI* CreateWebUI(const GURL& url) = 0; | 226 virtual WebUI* CreateWebUI(const GURL& url) = 0; |
223 | 227 |
224 // Returns the committed WebUI if one exists, otherwise the pending one. | 228 // Returns the committed WebUI if one exists, otherwise the pending one. |
225 virtual WebUI* GetWebUI() const = 0; | 229 virtual WebUI* GetWebUI() const = 0; |
226 virtual WebUI* GetCommittedWebUI() const = 0; | 230 virtual WebUI* GetCommittedWebUI() const = 0; |
227 | 231 |
228 // Allows overriding the user agent used for NavigationEntries it owns. | 232 // Allows overriding the user agent used for NavigationEntries it owns. |
229 virtual void SetUserAgentOverride(const std::string& override) = 0; | 233 virtual void SetUserAgentOverride(const std::string& override) = 0; |
230 virtual const std::string& GetUserAgentOverride() const = 0; | 234 virtual const std::string& GetUserAgentOverride() const = 0; |
231 | 235 |
236 // Enable the accessibility tree for this WebContents in the renderer, | |
237 // but don't enable creating a native accessibility tree on the browser | |
238 // side. | |
239 virtual void EnableTreeOnlyAccessibilityMode() = 0; | |
240 | |
241 // Returns true only if "tree only" accessibility mode is on. | |
242 virtual bool IsTreeOnlyAccessibilityModeForTesting() const = 0; | |
243 | |
244 // Returns true only if complete accessibility mode is on, meaning there's | |
245 // both renderer accessibility, and a native browser accessibility tree. | |
246 virtual bool IsFullAccessibilityModeForTesting() const = 0; | |
247 | |
232 #if defined(OS_WIN) | 248 #if defined(OS_WIN) |
233 virtual void SetParentNativeViewAccessible( | 249 virtual void SetParentNativeViewAccessible( |
234 gfx::NativeViewAccessible accessible_parent) = 0; | 250 gfx::NativeViewAccessible accessible_parent) = 0; |
235 #endif | 251 #endif |
236 | 252 |
237 // Tab navigation state ------------------------------------------------------ | 253 // Tab navigation state ------------------------------------------------------ |
238 | 254 |
239 // Returns the current navigation properties, which if a navigation is | 255 // Returns the current navigation properties, which if a navigation is |
240 // pending may be provisional (e.g., the navigation could result in a | 256 // pending may be provisional (e.g., the navigation could result in a |
241 // download, in which case the URL would revert to what it was previously). | 257 // download, in which case the URL would revert to what it was previously). |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
605 | 621 |
606 private: | 622 private: |
607 // This interface should only be implemented inside content. | 623 // This interface should only be implemented inside content. |
608 friend class WebContentsImpl; | 624 friend class WebContentsImpl; |
609 WebContents() {} | 625 WebContents() {} |
610 }; | 626 }; |
611 | 627 |
612 } // namespace content | 628 } // namespace content |
613 | 629 |
614 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 630 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |