| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_INTERNAL_CHROME_BROWSER_WEB_WEB_CONTROLLER_PROVIDER_IMPL_H_ | 5 #ifndef IOS_CHROME_BROWSER_WEB_WEB_CONTROLLER_PROVIDER_IMPL_H_ |
| 6 #define IOS_INTERNAL_CHROME_BROWSER_WEB_WEB_CONTROLLER_PROVIDER_IMPL_H_ | 6 #define IOS_CHROME_BROWSER_WEB_WEB_CONTROLLER_PROVIDER_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #import "ios/public/provider/web/web_controller_provider.h" | 10 #import "ios/public/provider/web/web_controller_provider.h" |
| 11 | 11 |
| 12 namespace web { | 12 namespace web { |
| 13 class WebStateImpl; | 13 class WebStateImpl; |
| 14 } | 14 } |
| 15 | 15 |
| 16 // Concrete implementation of ios::WebControllerProvider. | 16 // Concrete implementation of ios::WebControllerProvider. |
| 17 class WebControllerProviderImpl : public ios::WebControllerProvider { | 17 class WebControllerProviderImpl : public ios::WebControllerProvider { |
| 18 public: | 18 public: |
| 19 explicit WebControllerProviderImpl(web::BrowserState* browser_state); | 19 explicit WebControllerProviderImpl(web::BrowserState* browser_state); |
| 20 ~WebControllerProviderImpl() override; | 20 ~WebControllerProviderImpl() override; |
| 21 | 21 |
| 22 // ios::WebControllerProvider implementation. | 22 // ios::WebControllerProvider implementation. |
| 23 bool SuppressesDialogs() const override; | 23 bool SuppressesDialogs() const override; |
| 24 void SetSuppressesDialogs(bool should_suppress_dialogs) override; | 24 void SetSuppressesDialogs(bool should_suppress_dialogs) override; |
| 25 void LoadURL(const GURL& url) override; | 25 void LoadURL(const GURL& url) override; |
| 26 web::WebState* GetWebState() const override; | 26 web::WebState* GetWebState() const override; |
| 27 void InjectScript(const std::string& script, | 27 void InjectScript(const std::string& script, |
| 28 web::JavaScriptResultBlock completion) override; | 28 web::JavaScriptResultBlock completion) override; |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 std::unique_ptr<web::WebStateImpl> web_state_impl_; | 31 std::unique_ptr<web::WebStateImpl> web_state_impl_; |
| 32 GURL last_requested_url_; | 32 GURL last_requested_url_; |
| 33 bool suppresses_dialogs_; | 33 bool suppresses_dialogs_; |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 #endif // IOS_INTERNAL_CHROME_BROWSER_WEB_WEB_CONTROLLER_PROVIDER_IMPL_H_ | 36 #endif // IOS_CHROME_BROWSER_WEB_WEB_CONTROLLER_PROVIDER_IMPL_H_ |
| OLD | NEW |