| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 // Returns the user browser context associated with this WebContents (via the | 197 // Returns the user browser context associated with this WebContents (via the |
| 198 // NavigationController). | 198 // NavigationController). |
| 199 virtual content::BrowserContext* GetBrowserContext() const = 0; | 199 virtual content::BrowserContext* GetBrowserContext() const = 0; |
| 200 | 200 |
| 201 // Gets the URL that is currently being displayed, if there is one. | 201 // Gets the URL that is currently being displayed, if there is one. |
| 202 // This method is deprecated. DO NOT USE! Pick either |GetVisibleURL| or | 202 // This method is deprecated. DO NOT USE! Pick either |GetVisibleURL| or |
| 203 // |GetLastCommittedURL| as appropriate. | 203 // |GetLastCommittedURL| as appropriate. |
| 204 virtual const GURL& GetURL() const = 0; | 204 virtual const GURL& GetURL() const = 0; |
| 205 | 205 |
| 206 // Gets the URL currently being displayed in the URL bar, if there is one. | 206 // Gets the virtual URL currently being displayed in the URL bar, if there is |
| 207 // This URL might be a pending navigation that hasn't committed yet, so it is | 207 // one. This URL might be a pending navigation that hasn't committed yet, so |
| 208 // not guaranteed to match the current page in this WebContents. A typical | 208 // it is not guaranteed to match the current page in this WebContents. A |
| 209 // example of this is interstitials, which show the URL of the new/loading | 209 // typical example of this is interstitials, which show the URL of the |
| 210 // page (active) but the security context is of the old page (last committed). | 210 // new/loading page (active) but the security context is of the old page (last |
| 211 // committed). |
| 211 virtual const GURL& GetVisibleURL() const = 0; | 212 virtual const GURL& GetVisibleURL() const = 0; |
| 212 | 213 |
| 213 // Gets the last committed URL. It represents the current page that is | 214 // Gets the virtual URL of the last committed page in this WebContents. |
| 214 // displayed in this WebContents. It represents the current security | 215 // Virtual URLs are meant to be displayed to the user (e.g., they include the |
| 215 // context. | 216 // "view-source:" prefix for view source URLs, unlike NavigationEntry::GetURL |
| 217 // and NavigationHandle::GetURL). The last committed page is the current |
| 218 // security context and the content that is actually displayed within the tab. |
| 219 // See also GetVisibleURL above, which may differ from this URL. |
| 216 virtual const GURL& GetLastCommittedURL() const = 0; | 220 virtual const GURL& GetLastCommittedURL() const = 0; |
| 217 | 221 |
| 218 // Return the currently active RenderProcessHost and RenderViewHost. Each of | 222 // Return the currently active RenderProcessHost and RenderViewHost. Each of |
| 219 // these may change over time. | 223 // these may change over time. |
| 220 virtual RenderProcessHost* GetRenderProcessHost() const = 0; | 224 virtual RenderProcessHost* GetRenderProcessHost() const = 0; |
| 221 | 225 |
| 222 // Returns the main frame for the currently active view. | 226 // Returns the main frame for the currently active view. |
| 223 virtual RenderFrameHost* GetMainFrame() = 0; | 227 virtual RenderFrameHost* GetMainFrame() = 0; |
| 224 | 228 |
| 225 // Returns the focused frame for the currently active view. | 229 // Returns the focused frame for the currently active view. |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 | 752 |
| 749 private: | 753 private: |
| 750 // This interface should only be implemented inside content. | 754 // This interface should only be implemented inside content. |
| 751 friend class WebContentsImpl; | 755 friend class WebContentsImpl; |
| 752 WebContents() {} | 756 WebContents() {} |
| 753 }; | 757 }; |
| 754 | 758 |
| 755 } // namespace content | 759 } // namespace content |
| 756 | 760 |
| 757 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 761 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |