Chromium Code Reviews| 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 the current load is to a different document. Only valid | |
| 265 // if IsLoading() returns true. | |
| 266 virtual bool IsLoadToDifferentDocument() const = 0; | |
|
Nico
2014/05/20 21:25:31
All callers of this check for `IsLoading() && IsLo
Avi (use Gerrit)
2014/05/20 22:00:42
That's actually not true; IsWaitingForResponse is
| |
| 267 | |
| 264 // Returns whether this WebContents is waiting for a first-response for the | 268 // Returns whether this WebContents is waiting for a first-response for the |
| 265 // main resource of the page. | 269 // main resource of the page. |
| 266 virtual bool IsWaitingForResponse() const = 0; | 270 virtual bool IsWaitingForResponse() const = 0; |
| 267 | 271 |
| 268 // Return the current load state and the URL associated with it. | 272 // Returns the current load state and the URL associated with it. |
| 269 virtual const net::LoadStateWithParam& GetLoadState() const = 0; | 273 virtual const net::LoadStateWithParam& GetLoadState() const = 0; |
| 270 virtual const base::string16& GetLoadStateHost() const = 0; | 274 virtual const base::string16& GetLoadStateHost() const = 0; |
| 271 | 275 |
| 272 // Return the upload progress. | 276 // Returns the upload progress. |
| 273 virtual uint64 GetUploadSize() const = 0; | 277 virtual uint64 GetUploadSize() const = 0; |
| 274 virtual uint64 GetUploadPosition() const = 0; | 278 virtual uint64 GetUploadPosition() const = 0; |
| 275 | 279 |
| 276 // Returns a set of the site URLs currently committed in this tab. | 280 // Returns a set of the site URLs currently committed in this tab. |
| 277 virtual std::set<GURL> GetSitesInTab() const = 0; | 281 virtual std::set<GURL> GetSitesInTab() const = 0; |
| 278 | 282 |
| 279 // Return the character encoding of the page. | 283 // Returns the character encoding of the page. |
| 280 virtual const std::string& GetEncoding() const = 0; | 284 virtual const std::string& GetEncoding() const = 0; |
| 281 | 285 |
| 282 // True if this is a secure page which displayed insecure content. | 286 // True if this is a secure page which displayed insecure content. |
| 283 virtual bool DisplayedInsecureContent() const = 0; | 287 virtual bool DisplayedInsecureContent() const = 0; |
| 284 | 288 |
| 285 // Internal state ------------------------------------------------------------ | 289 // Internal state ------------------------------------------------------------ |
| 286 | 290 |
| 287 // Indicates whether the WebContents is being captured (e.g., for screenshots | 291 // Indicates whether the WebContents is being captured (e.g., for screenshots |
| 288 // or mirroring). Increment calls must be balanced with an equivalent number | 292 // or mirroring). Increment calls must be balanced with an equivalent number |
| 289 // of decrement calls. |capture_size| specifies the capturer's video | 293 // of decrement calls. |capture_size| specifies the capturer's video |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 605 | 609 |
| 606 private: | 610 private: |
| 607 // This interface should only be implemented inside content. | 611 // This interface should only be implemented inside content. |
| 608 friend class WebContentsImpl; | 612 friend class WebContentsImpl; |
| 609 WebContents() {} | 613 WebContents() {} |
| 610 }; | 614 }; |
| 611 | 615 |
| 612 } // namespace content | 616 } // namespace content |
| 613 | 617 |
| 614 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 618 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |