| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // servicing a window.open() call). | 154 // servicing a window.open() call). |
| 155 // | 155 // |
| 156 // You do not want to call this. If you think you do, make sure you completely | 156 // You do not want to call this. If you think you do, make sure you completely |
| 157 // understand when SessionStorageNamespace objects should be cloned, why | 157 // understand when SessionStorageNamespace objects should be cloned, why |
| 158 // they should not be shared by multiple WebContents, and what bad things | 158 // they should not be shared by multiple WebContents, and what bad things |
| 159 // can happen if you share the object. | 159 // can happen if you share the object. |
| 160 CONTENT_EXPORT static WebContents* CreateWithSessionStorage( | 160 CONTENT_EXPORT static WebContents* CreateWithSessionStorage( |
| 161 const CreateParams& params, | 161 const CreateParams& params, |
| 162 const SessionStorageNamespaceMap& session_storage_namespace_map); | 162 const SessionStorageNamespaceMap& session_storage_namespace_map); |
| 163 | 163 |
| 164 // Returns a WebContents that wraps the RenderViewHost, or nullptr if the | 164 // Returns the WebContents that owns the RenderViewHost, or nullptr if the |
| 165 // render view host's delegate isn't a WebContents. | 165 // render view host's delegate isn't a WebContents. |
| 166 CONTENT_EXPORT static WebContents* FromRenderViewHost( | 166 CONTENT_EXPORT static WebContents* FromRenderViewHost(RenderViewHost* rvh); |
| 167 const RenderViewHost* rvh); | |
| 168 | 167 |
| 169 CONTENT_EXPORT static WebContents* FromRenderFrameHost(RenderFrameHost* rfh); | 168 CONTENT_EXPORT static WebContents* FromRenderFrameHost(RenderFrameHost* rfh); |
| 170 | 169 |
| 171 ~WebContents() override {} | 170 ~WebContents() override {} |
| 172 | 171 |
| 173 // Intrinsic tab state ------------------------------------------------------- | 172 // Intrinsic tab state ------------------------------------------------------- |
| 174 | 173 |
| 175 // Gets/Sets the delegate. | 174 // Gets/Sets the delegate. |
| 176 virtual WebContentsDelegate* GetDelegate() = 0; | 175 virtual WebContentsDelegate* GetDelegate() = 0; |
| 177 virtual void SetDelegate(WebContentsDelegate* delegate) = 0; | 176 virtual void SetDelegate(WebContentsDelegate* delegate) = 0; |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 | 700 |
| 702 private: | 701 private: |
| 703 // This interface should only be implemented inside content. | 702 // This interface should only be implemented inside content. |
| 704 friend class WebContentsImpl; | 703 friend class WebContentsImpl; |
| 705 WebContents() {} | 704 WebContents() {} |
| 706 }; | 705 }; |
| 707 | 706 |
| 708 } // namespace content | 707 } // namespace content |
| 709 | 708 |
| 710 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 709 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |