| 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 // this WebContents. | 251 // this WebContents. |
| 252 virtual int32 GetMaxPageIDForSiteInstance(SiteInstance* site_instance) = 0; | 252 virtual int32 GetMaxPageIDForSiteInstance(SiteInstance* site_instance) = 0; |
| 253 | 253 |
| 254 // Returns the SiteInstance associated with the current page. | 254 // Returns the SiteInstance associated with the current page. |
| 255 virtual SiteInstance* GetSiteInstance() const = 0; | 255 virtual SiteInstance* GetSiteInstance() const = 0; |
| 256 | 256 |
| 257 // Returns the SiteInstance for the pending navigation, if any. Otherwise | 257 // Returns the SiteInstance for the pending navigation, if any. Otherwise |
| 258 // returns the current SiteInstance. | 258 // returns the current SiteInstance. |
| 259 virtual SiteInstance* GetPendingSiteInstance() const = 0; | 259 virtual SiteInstance* GetPendingSiteInstance() const = 0; |
| 260 | 260 |
| 261 // Return whether this WebContents is loading a resource. | 261 // Returns whether this WebContents is loading a resource. |
| 262 virtual bool IsLoading() const = 0; | 262 virtual bool IsLoading() const = 0; |
| 263 | 263 |
| 264 // Returns whether this WebContents is loading and and the load is to a |
| 265 // different top-level document (rather than being a navigation within the |
| 266 // same document). This being true implies that IsLoading() is also true. |
| 267 virtual bool IsLoadingToDifferentDocument() const = 0; |
| 268 |
| 264 // Returns whether this WebContents is waiting for a first-response for the | 269 // Returns whether this WebContents is waiting for a first-response for the |
| 265 // main resource of the page. | 270 // main resource of the page. |
| 266 virtual bool IsWaitingForResponse() const = 0; | 271 virtual bool IsWaitingForResponse() const = 0; |
| 267 | 272 |
| 268 // Return the current load state and the URL associated with it. | 273 // Returns the current load state and the URL associated with it. |
| 269 virtual const net::LoadStateWithParam& GetLoadState() const = 0; | 274 virtual const net::LoadStateWithParam& GetLoadState() const = 0; |
| 270 virtual const base::string16& GetLoadStateHost() const = 0; | 275 virtual const base::string16& GetLoadStateHost() const = 0; |
| 271 | 276 |
| 272 // Return the upload progress. | 277 // Returns the upload progress. |
| 273 virtual uint64 GetUploadSize() const = 0; | 278 virtual uint64 GetUploadSize() const = 0; |
| 274 virtual uint64 GetUploadPosition() const = 0; | 279 virtual uint64 GetUploadPosition() const = 0; |
| 275 | 280 |
| 276 // Returns a set of the site URLs currently committed in this tab. | 281 // Returns a set of the site URLs currently committed in this tab. |
| 277 virtual std::set<GURL> GetSitesInTab() const = 0; | 282 virtual std::set<GURL> GetSitesInTab() const = 0; |
| 278 | 283 |
| 279 // Return the character encoding of the page. | 284 // Returns the character encoding of the page. |
| 280 virtual const std::string& GetEncoding() const = 0; | 285 virtual const std::string& GetEncoding() const = 0; |
| 281 | 286 |
| 282 // True if this is a secure page which displayed insecure content. | 287 // True if this is a secure page which displayed insecure content. |
| 283 virtual bool DisplayedInsecureContent() const = 0; | 288 virtual bool DisplayedInsecureContent() const = 0; |
| 284 | 289 |
| 285 // Internal state ------------------------------------------------------------ | 290 // Internal state ------------------------------------------------------------ |
| 286 | 291 |
| 287 // Indicates whether the WebContents is being captured (e.g., for screenshots | 292 // Indicates whether the WebContents is being captured (e.g., for screenshots |
| 288 // or mirroring). Increment calls must be balanced with an equivalent number | 293 // or mirroring). Increment calls must be balanced with an equivalent number |
| 289 // of decrement calls. |capture_size| specifies the capturer's video | 294 // of decrement calls. |capture_size| specifies the capturer's video |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 | 610 |
| 606 private: | 611 private: |
| 607 // This interface should only be implemented inside content. | 612 // This interface should only be implemented inside content. |
| 608 friend class WebContentsImpl; | 613 friend class WebContentsImpl; |
| 609 WebContents() {} | 614 WebContents() {} |
| 610 }; | 615 }; |
| 611 | 616 |
| 612 } // namespace content | 617 } // namespace content |
| 613 | 618 |
| 614 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 619 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |