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_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 virtual WebContents* GetEmbedderWebContents() const OVERRIDE; | 187 virtual WebContents* GetEmbedderWebContents() const OVERRIDE; |
188 virtual int GetEmbeddedInstanceID() const OVERRIDE; | 188 virtual int GetEmbeddedInstanceID() const OVERRIDE; |
189 virtual int GetRoutingID() const OVERRIDE; | 189 virtual int GetRoutingID() const OVERRIDE; |
190 virtual RenderWidgetHostView* GetRenderWidgetHostView() const OVERRIDE; | 190 virtual RenderWidgetHostView* GetRenderWidgetHostView() const OVERRIDE; |
191 virtual WebContentsView* GetView() const OVERRIDE; | 191 virtual WebContentsView* GetView() const OVERRIDE; |
192 virtual WebUI* CreateWebUI(const GURL& url) OVERRIDE; | 192 virtual WebUI* CreateWebUI(const GURL& url) OVERRIDE; |
193 virtual WebUI* GetWebUI() const OVERRIDE; | 193 virtual WebUI* GetWebUI() const OVERRIDE; |
194 virtual WebUI* GetCommittedWebUI() const OVERRIDE; | 194 virtual WebUI* GetCommittedWebUI() const OVERRIDE; |
195 virtual void SetUserAgentOverride(const std::string& override) OVERRIDE; | 195 virtual void SetUserAgentOverride(const std::string& override) OVERRIDE; |
196 virtual const std::string& GetUserAgentOverride() const OVERRIDE; | 196 virtual const std::string& GetUserAgentOverride() const OVERRIDE; |
| 197 virtual void SetWindowName(const std::string& name) OVERRIDE; |
| 198 virtual const std::string& GetWindowName() const OVERRIDE; |
197 virtual const string16& GetTitle() const OVERRIDE; | 199 virtual const string16& GetTitle() const OVERRIDE; |
198 virtual int32 GetMaxPageID() OVERRIDE; | 200 virtual int32 GetMaxPageID() OVERRIDE; |
199 virtual int32 GetMaxPageIDForSiteInstance( | 201 virtual int32 GetMaxPageIDForSiteInstance( |
200 SiteInstance* site_instance) OVERRIDE; | 202 SiteInstance* site_instance) OVERRIDE; |
201 virtual SiteInstance* GetSiteInstance() const OVERRIDE; | 203 virtual SiteInstance* GetSiteInstance() const OVERRIDE; |
202 virtual SiteInstance* GetPendingSiteInstance() const OVERRIDE; | 204 virtual SiteInstance* GetPendingSiteInstance() const OVERRIDE; |
203 virtual bool IsLoading() const OVERRIDE; | 205 virtual bool IsLoading() const OVERRIDE; |
204 virtual bool IsWaitingForResponse() const OVERRIDE; | 206 virtual bool IsWaitingForResponse() const OVERRIDE; |
205 virtual const net::LoadStateWithParam& GetLoadState() const OVERRIDE; | 207 virtual const net::LoadStateWithParam& GetLoadState() const OVERRIDE; |
206 virtual const string16& GetLoadStateHost() const OVERRIDE; | 208 virtual const string16& GetLoadStateHost() const OVERRIDE; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 virtual void UpdateTargetURL(int32 page_id, const GURL& url) OVERRIDE; | 323 virtual void UpdateTargetURL(int32 page_id, const GURL& url) OVERRIDE; |
322 virtual void Close(RenderViewHost* render_view_host) OVERRIDE; | 324 virtual void Close(RenderViewHost* render_view_host) OVERRIDE; |
323 virtual void RequestMove(const gfx::Rect& new_bounds) OVERRIDE; | 325 virtual void RequestMove(const gfx::Rect& new_bounds) OVERRIDE; |
324 virtual void SwappedOut(RenderViewHost* render_view_host) OVERRIDE; | 326 virtual void SwappedOut(RenderViewHost* render_view_host) OVERRIDE; |
325 virtual void DidStartLoading(RenderViewHost* render_view_host) OVERRIDE; | 327 virtual void DidStartLoading(RenderViewHost* render_view_host) OVERRIDE; |
326 virtual void DidStopLoading(RenderViewHost* render_view_host) OVERRIDE; | 328 virtual void DidStopLoading(RenderViewHost* render_view_host) OVERRIDE; |
327 virtual void DidCancelLoading() OVERRIDE; | 329 virtual void DidCancelLoading() OVERRIDE; |
328 virtual void DidChangeLoadProgress(double progress) OVERRIDE; | 330 virtual void DidChangeLoadProgress(double progress) OVERRIDE; |
329 virtual void DidDisownOpener(RenderViewHost* rvh) OVERRIDE; | 331 virtual void DidDisownOpener(RenderViewHost* rvh) OVERRIDE; |
330 virtual void DidUpdateFrameTree(RenderViewHost* rvh) OVERRIDE; | 332 virtual void DidUpdateFrameTree(RenderViewHost* rvh) OVERRIDE; |
| 333 virtual void DidUpdateFrameName(RenderViewHost* rvh, |
| 334 int frame_id, |
| 335 bool is_top_level, |
| 336 const std::string& name) OVERRIDE; |
331 virtual void DocumentAvailableInMainFrame( | 337 virtual void DocumentAvailableInMainFrame( |
332 RenderViewHost* render_view_host) OVERRIDE; | 338 RenderViewHost* render_view_host) OVERRIDE; |
333 virtual void DocumentOnLoadCompletedInMainFrame( | 339 virtual void DocumentOnLoadCompletedInMainFrame( |
334 RenderViewHost* render_view_host, | 340 RenderViewHost* render_view_host, |
335 int32 page_id) OVERRIDE; | 341 int32 page_id) OVERRIDE; |
336 virtual void RequestOpenURL(RenderViewHost* rvh, | 342 virtual void RequestOpenURL(RenderViewHost* rvh, |
337 const GURL& url, | 343 const GURL& url, |
338 const Referrer& referrer, | 344 const Referrer& referrer, |
339 WindowOpenDisposition disposition, | 345 WindowOpenDisposition disposition, |
340 int64 source_frame_id, | 346 int64 source_frame_id, |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 | 717 |
712 // A list of observers notified when page state changes. Weak references. | 718 // A list of observers notified when page state changes. Weak references. |
713 // This MUST be listed above render_manager_ since at destruction time the | 719 // This MUST be listed above render_manager_ since at destruction time the |
714 // latter might cause RenderViewHost's destructor to call us and we might use | 720 // latter might cause RenderViewHost's destructor to call us and we might use |
715 // the observer list then. | 721 // the observer list then. |
716 ObserverList<WebContentsObserver> observers_; | 722 ObserverList<WebContentsObserver> observers_; |
717 | 723 |
718 // The tab that opened this tab, if any. Will be set to null if the opener | 724 // The tab that opened this tab, if any. Will be set to null if the opener |
719 // is closed. | 725 // is closed. |
720 WebContentsImpl* opener_; | 726 WebContentsImpl* opener_; |
| 727 // The name of the window according to window.name. |
| 728 std::string window_name_; |
721 | 729 |
722 // Helper classes ------------------------------------------------------------ | 730 // Helper classes ------------------------------------------------------------ |
723 | 731 |
724 // Manages creation and swapping of render views. | 732 // Manages creation and swapping of render views. |
725 RenderViewHostManager render_manager_; | 733 RenderViewHostManager render_manager_; |
726 | 734 |
727 #if defined(ENABLE_JAVA_BRIDGE) | 735 #if defined(ENABLE_JAVA_BRIDGE) |
728 // Manages injecting Java objects into all RenderViewHosts associated with | 736 // Manages injecting Java objects into all RenderViewHosts associated with |
729 // this WebContentsImpl. | 737 // this WebContentsImpl. |
730 scoped_ptr<JavaBridgeDispatcherHostManager> | 738 scoped_ptr<JavaBridgeDispatcherHostManager> |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 // Maps the ids of pending image downloads to their callbacks | 882 // Maps the ids of pending image downloads to their callbacks |
875 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap; | 883 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap; |
876 ImageDownloadMap image_download_map_; | 884 ImageDownloadMap image_download_map_; |
877 | 885 |
878 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 886 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
879 }; | 887 }; |
880 | 888 |
881 } // namespace content | 889 } // namespace content |
882 | 890 |
883 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 891 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |