Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Unified Diff: ios/chrome/browser/web/web_controller_provider_impl.h

Issue 2527123003: [iOS] Upstream web_controller_provider_impl.{h,mm}. (Closed)
Patch Set: Fix downstream build. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/web/web_controller_provider_impl.h
diff --git a/ios/chrome/browser/web/web_controller_provider_impl.h b/ios/chrome/browser/web/web_controller_provider_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..697bd564e5222f9db43ac3aade399676dd4ed14c
--- /dev/null
+++ b/ios/chrome/browser/web/web_controller_provider_impl.h
@@ -0,0 +1,36 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_INTERNAL_CHROME_BROWSER_WEB_WEB_CONTROLLER_PROVIDER_IMPL_H_
rohitrao (ping after 24h) 2016/11/25 12:11:32 IOS_CHROME_etc
+#define IOS_INTERNAL_CHROME_BROWSER_WEB_WEB_CONTROLLER_PROVIDER_IMPL_H_
+
+#include <memory>
+
+#import "ios/public/provider/web/web_controller_provider.h"
+
+namespace web {
+class WebStateImpl;
+}
+
+// Concrete implementation of ios::WebControllerProvider.
+class WebControllerProviderImpl : public ios::WebControllerProvider {
+ public:
+ explicit WebControllerProviderImpl(web::BrowserState* browser_state);
+ ~WebControllerProviderImpl() override;
+
+ // ios::WebControllerProvider implementation.
+ bool SuppressesDialogs() const override;
+ void SetSuppressesDialogs(bool should_suppress_dialogs) override;
+ void LoadURL(const GURL& url) override;
+ web::WebState* GetWebState() const override;
+ void InjectScript(const std::string& script,
+ web::JavaScriptResultBlock completion) override;
+
+ private:
+ std::unique_ptr<web::WebStateImpl> web_state_impl_;
+ GURL last_requested_url_;
+ bool suppresses_dialogs_;
+};
+
+#endif // IOS_INTERNAL_CHROME_BROWSER_WEB_WEB_CONTROLLER_PROVIDER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698