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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 namespace net { | 36 namespace net { |
37 struct LoadStateWithParam; | 37 struct LoadStateWithParam; |
38 } | 38 } |
39 | 39 |
40 namespace content { | 40 namespace content { |
41 | 41 |
42 class BrowserContext; | 42 class BrowserContext; |
43 class InterstitialPage; | 43 class InterstitialPage; |
44 class PageState; | 44 class PageState; |
| 45 class RenderFrameHost; |
45 class RenderProcessHost; | 46 class RenderProcessHost; |
46 class RenderViewHost; | 47 class RenderViewHost; |
47 class RenderWidgetHostView; | 48 class RenderWidgetHostView; |
48 class SiteInstance; | 49 class SiteInstance; |
49 class WebContentsDelegate; | 50 class WebContentsDelegate; |
50 class WebContentsView; | 51 class WebContentsView; |
51 struct RendererPreferences; | 52 struct RendererPreferences; |
52 | 53 |
53 // WebContents is the core class in content/. A WebContents renders web content | 54 // WebContents is the core class in content/. A WebContents renders web content |
54 // (usually HTML) in a rectangular area. | 55 // (usually HTML) in a rectangular area. |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 153 |
153 // Gets the last committed URL. It represents the current page that is | 154 // Gets the last committed URL. It represents the current page that is |
154 // displayed in this WebContents. It represents the current security | 155 // displayed in this WebContents. It represents the current security |
155 // context. | 156 // context. |
156 virtual const GURL& GetLastCommittedURL() const = 0; | 157 virtual const GURL& GetLastCommittedURL() const = 0; |
157 | 158 |
158 // Return the currently active RenderProcessHost and RenderViewHost. Each of | 159 // Return the currently active RenderProcessHost and RenderViewHost. Each of |
159 // these may change over time. | 160 // these may change over time. |
160 virtual RenderProcessHost* GetRenderProcessHost() const = 0; | 161 virtual RenderProcessHost* GetRenderProcessHost() const = 0; |
161 | 162 |
| 163 // Returns the main frame for the currently active view. |
| 164 virtual RenderFrameHost* GetMainFrame() = 0; |
| 165 |
162 // Gets the current RenderViewHost for this tab. | 166 // Gets the current RenderViewHost for this tab. |
163 virtual RenderViewHost* GetRenderViewHost() const = 0; | 167 virtual RenderViewHost* GetRenderViewHost() const = 0; |
164 | 168 |
165 typedef base::Callback<void(RenderViewHost* /* render_view_host */, | 169 typedef base::Callback<void(RenderViewHost* /* render_view_host */, |
166 int /* x */, | 170 int /* x */, |
167 int /* y */)> GetRenderViewHostCallback; | 171 int /* y */)> GetRenderViewHostCallback; |
168 // Gets the RenderViewHost at coordinates (|x|, |y|) for this WebContents via | 172 // Gets the RenderViewHost at coordinates (|x|, |y|) for this WebContents via |
169 // |callback|. | 173 // |callback|. |
170 // This can be different than the current RenderViewHost if there is a | 174 // This can be different than the current RenderViewHost if there is a |
171 // BrowserPlugin at the specified position. | 175 // BrowserPlugin at the specified position. |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 | 464 |
461 private: | 465 private: |
462 // This interface should only be implemented inside content. | 466 // This interface should only be implemented inside content. |
463 friend class WebContentsImpl; | 467 friend class WebContentsImpl; |
464 WebContents() {} | 468 WebContents() {} |
465 }; | 469 }; |
466 | 470 |
467 } // namespace content | 471 } // namespace content |
468 | 472 |
469 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 473 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |