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