| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_PUBLIC_WEB_STATE_WEB_STATE_DELEGATE_H_ | 5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_DELEGATE_H_ |
| 6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_DELEGATE_H_ | 6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 | 11 |
| 12 namespace net { | |
| 13 class SSLInfo; | |
| 14 } | |
| 15 | |
| 16 namespace web { | 12 namespace web { |
| 17 | 13 |
| 18 struct ContextMenuParams; | 14 struct ContextMenuParams; |
| 19 class JavaScriptDialogPresenter; | 15 class JavaScriptDialogPresenter; |
| 20 struct SSLStatus; | |
| 21 class WebState; | 16 class WebState; |
| 22 | 17 |
| 23 // Objects implement this interface to get notified about changes in the | 18 // Objects implement this interface to get notified about changes in the |
| 24 // WebState and to provide necessary functionality. | 19 // WebState and to provide necessary functionality. |
| 25 class WebStateDelegate { | 20 class WebStateDelegate { |
| 26 public: | 21 public: |
| 27 WebStateDelegate(); | 22 WebStateDelegate(); |
| 28 | 23 |
| 29 // Notifies the delegate that the page has made some progress loading. | 24 // Notifies the delegate that the page has made some progress loading. |
| 30 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully | 25 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully |
| (...skipping 24 matching lines...) Expand all Loading... |
| 55 // Called when |this| is no longer the WebStateDelegate for |source|. | 50 // Called when |this| is no longer the WebStateDelegate for |source|. |
| 56 void Detach(WebState* source); | 51 void Detach(WebState* source); |
| 57 | 52 |
| 58 // The WebStates for which |this| is currently a delegate. | 53 // The WebStates for which |this| is currently a delegate. |
| 59 std::set<WebState*> attached_states_; | 54 std::set<WebState*> attached_states_; |
| 60 }; | 55 }; |
| 61 | 56 |
| 62 } // namespace web | 57 } // namespace web |
| 63 | 58 |
| 64 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_DELEGATE_H_ | 59 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_DELEGATE_H_ |
| OLD | NEW |