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

Side by Side Diff: ios/web/public/test/test_web_state.h

Issue 2094633004: [ios] Added DialogsSuppression public API to WebState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed compilation Created 4 years, 5 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | ios/web/public/test/test_web_state.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_TEST_TEST_WEB_STATE_H_ 5 #ifndef IOS_WEB_PUBLIC_TEST_TEST_WEB_STATE_H_
6 #define IOS_WEB_PUBLIC_TEST_TEST_WEB_STATE_H_ 6 #define IOS_WEB_PUBLIC_TEST_TEST_WEB_STATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "ios/web/public/web_state/url_verification_constants.h" 13 #include "ios/web/public/web_state/url_verification_constants.h"
14 #include "ios/web/public/web_state/web_state.h" 14 #include "ios/web/public/web_state/web_state.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace web { 17 namespace web {
18 18
19 // Minimal implementation of WebState, to be used in tests. 19 // Minimal implementation of WebState, to be used in tests.
20 class TestWebState : public WebState { 20 class TestWebState : public WebState {
21 public: 21 public:
22 TestWebState(); 22 TestWebState();
23 ~TestWebState() override; 23 ~TestWebState() override;
24 24
25 // WebState implementation. 25 // WebState implementation.
26 WebStateDelegate* GetDelegate() override; 26 WebStateDelegate* GetDelegate() override;
27 void SetDelegate(WebStateDelegate* delegate) override; 27 void SetDelegate(WebStateDelegate* delegate) override;
28 bool IsWebUsageEnabled() const override; 28 bool IsWebUsageEnabled() const override;
29 void SetWebUsageEnabled(bool enabled) override; 29 void SetWebUsageEnabled(bool enabled) override;
30 bool ShouldSuppressDialogs() const override;
31 void SetShouldSuppressDialogs(bool should_suppress) override;
30 UIView* GetView() override; 32 UIView* GetView() override;
31 BrowserState* GetBrowserState() const override; 33 BrowserState* GetBrowserState() const override;
32 void OpenURL(const OpenURLParams& params) override {} 34 void OpenURL(const OpenURLParams& params) override {}
33 const NavigationManager* GetNavigationManager() const override; 35 const NavigationManager* GetNavigationManager() const override;
34 NavigationManager* GetNavigationManager() override; 36 NavigationManager* GetNavigationManager() override;
35 CRWJSInjectionReceiver* GetJSInjectionReceiver() const override; 37 CRWJSInjectionReceiver* GetJSInjectionReceiver() const override;
36 void ExecuteJavaScript(const base::string16& javascript) override; 38 void ExecuteJavaScript(const base::string16& javascript) override;
37 void ExecuteJavaScript(const base::string16& javascript, 39 void ExecuteJavaScript(const base::string16& javascript,
38 const JavaScriptResultCallback& callback) override; 40 const JavaScriptResultCallback& callback) override;
39 const std::string& GetContentsMimeType() const override; 41 const std::string& GetContentsMimeType() const override;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 base::string16 title_; 82 base::string16 title_;
81 URLVerificationTrustLevel trust_level_; 83 URLVerificationTrustLevel trust_level_;
82 bool content_is_html_; 84 bool content_is_html_;
83 std::string mime_type_; 85 std::string mime_type_;
84 std::string content_language_; 86 std::string content_language_;
85 }; 87 };
86 88
87 } // namespace web 89 } // namespace web
88 90
89 #endif // IOS_WEB_PUBLIC_TEST_TEST_WEB_STATE_H_ 91 #endif // IOS_WEB_PUBLIC_TEST_TEST_WEB_STATE_H_
OLDNEW
« no previous file with comments | « no previous file | ios/web/public/test/test_web_state.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698