| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ | 5 #ifndef IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ |
| 6 #define IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ | 6 #define IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 // Cancels all dialogs associated with this web_state. | 262 // Cancels all dialogs associated with this web_state. |
| 263 void CancelDialogs(); | 263 void CancelDialogs(); |
| 264 | 264 |
| 265 // NavigationManagerDelegate: | 265 // NavigationManagerDelegate: |
| 266 void GoToIndex(int index) override; | 266 void GoToIndex(int index) override; |
| 267 void LoadURLWithParams(const NavigationManager::WebLoadParams&) override; | 267 void LoadURLWithParams(const NavigationManager::WebLoadParams&) override; |
| 268 void OnNavigationItemsPruned(size_t pruned_item_count) override; | 268 void OnNavigationItemsPruned(size_t pruned_item_count) override; |
| 269 void OnNavigationItemChanged() override; | 269 void OnNavigationItemChanged() override; |
| 270 void OnNavigationItemCommitted( | 270 void OnNavigationItemCommitted( |
| 271 const LoadCommittedDetails& load_details) override; | 271 const LoadCommittedDetails& load_details) override; |
| 272 |
| 273 // Updates the HTTP response headers for the main page using the headers |
| 274 // passed to the OnHttpResponseHeadersReceived() function below. |
| 275 // GetHttpResponseHeaders() can be used to get the headers. |
| 276 void UpdateHttpResponseHeaders(const GURL& url); |
| 277 |
| 272 WebState* GetWebState() override; | 278 WebState* GetWebState() override; |
| 273 | 279 |
| 274 protected: | 280 protected: |
| 275 void AddObserver(WebStateObserver* observer) override; | 281 void AddObserver(WebStateObserver* observer) override; |
| 276 void RemoveObserver(WebStateObserver* observer) override; | 282 void RemoveObserver(WebStateObserver* observer) override; |
| 277 void AddPolicyDecider(WebStatePolicyDecider* decider) override; | 283 void AddPolicyDecider(WebStatePolicyDecider* decider) override; |
| 278 void RemovePolicyDecider(WebStatePolicyDecider* decider) override; | 284 void RemovePolicyDecider(WebStatePolicyDecider* decider) override; |
| 279 | 285 |
| 280 private: | 286 private: |
| 281 // The SessionStorageBuilder functions require access to private variables of | 287 // The SessionStorageBuilder functions require access to private variables of |
| 282 // WebStateImpl. | 288 // WebStateImpl. |
| 283 friend SessionStorageBuilder; | 289 friend SessionStorageBuilder; |
| 284 | 290 |
| 285 // Creates a WebUIIOS object for |url| that is owned by the caller. Returns | 291 // Creates a WebUIIOS object for |url| that is owned by the caller. Returns |
| 286 // nullptr if |url| does not correspond to a WebUI page. | 292 // nullptr if |url| does not correspond to a WebUI page. |
| 287 std::unique_ptr<web::WebUIIOS> CreateWebUIIOS(const GURL& url); | 293 std::unique_ptr<web::WebUIIOS> CreateWebUIIOS(const GURL& url); |
| 288 | 294 |
| 289 // Updates the HTTP response headers for the main page using the headers | |
| 290 // passed to the OnHttpResponseHeadersReceived() function below. | |
| 291 // GetHttpResponseHeaders() can be used to get the headers. | |
| 292 void UpdateHttpResponseHeaders(const GURL& url); | |
| 293 | |
| 294 // Returns true if |web_controller_| has been set. | 295 // Returns true if |web_controller_| has been set. |
| 295 bool Configured() const; | 296 bool Configured() const; |
| 296 | 297 |
| 297 // Delegate, not owned by this object. | 298 // Delegate, not owned by this object. |
| 298 WebStateDelegate* delegate_; | 299 WebStateDelegate* delegate_; |
| 299 | 300 |
| 300 // Stores whether the web state is currently loading a page. | 301 // Stores whether the web state is currently loading a page. |
| 301 bool is_loading_; | 302 bool is_loading_; |
| 302 | 303 |
| 303 // Stores whether the web state is currently being destroyed. | 304 // Stores whether the web state is currently being destroyed. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 | 352 |
| 352 // Mojo interface registry for this WebState. | 353 // Mojo interface registry for this WebState. |
| 353 std::unique_ptr<service_manager::InterfaceRegistry> mojo_interface_registry_; | 354 std::unique_ptr<service_manager::InterfaceRegistry> mojo_interface_registry_; |
| 354 | 355 |
| 355 DISALLOW_COPY_AND_ASSIGN(WebStateImpl); | 356 DISALLOW_COPY_AND_ASSIGN(WebStateImpl); |
| 356 }; | 357 }; |
| 357 | 358 |
| 358 } // namespace web | 359 } // namespace web |
| 359 | 360 |
| 360 #endif // IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ | 361 #endif // IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ |
| OLD | NEW |