OLD | NEW |
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 #import "ios/web/shell/shell_web_client.h" | 5 #import "ios/web/shell/shell_web_client.h" |
6 | 6 |
7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
8 | 8 |
9 #include "ios/web/public/user_agent.h" | 9 #include "ios/web/public/user_agent.h" |
10 #include "ios/web/shell/shell_web_main_parts.h" | 10 #include "ios/web/shell/shell_web_main_parts.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 } | 27 } |
28 | 28 |
29 ShellBrowserState* ShellWebClient::browser_state() const { | 29 ShellBrowserState* ShellWebClient::browser_state() const { |
30 return web_main_parts_->browser_state(); | 30 return web_main_parts_->browser_state(); |
31 } | 31 } |
32 | 32 |
33 std::string ShellWebClient::GetProduct() const { | 33 std::string ShellWebClient::GetProduct() const { |
34 return "CriOS/36.77.34.45"; | 34 return "CriOS/36.77.34.45"; |
35 } | 35 } |
36 | 36 |
37 std::string ShellWebClient::GetUserAgent(bool desktop_user_agent) const { | 37 std::string ShellWebClient::GetUserAgent(UserAgentType type) const { |
38 std::string product = GetProduct(); | 38 std::string product = GetProduct(); |
39 return web::BuildUserAgentFromProduct(product); | 39 return web::BuildUserAgentFromProduct(product); |
40 } | 40 } |
41 | 41 |
42 void ShellWebClient::AllowCertificateError( | 42 void ShellWebClient::AllowCertificateError( |
43 WebState*, | 43 WebState*, |
44 int /*cert_error*/, | 44 int /*cert_error*/, |
45 const net::SSLInfo&, | 45 const net::SSLInfo&, |
46 const GURL&, | 46 const GURL&, |
47 bool overridable, | 47 bool overridable, |
(...skipping 16 matching lines...) Expand all Loading... |
64 block_callback.Run(true); | 64 block_callback.Run(true); |
65 }]]; | 65 }]]; |
66 } | 66 } |
67 [[UIApplication sharedApplication].keyWindow.rootViewController | 67 [[UIApplication sharedApplication].keyWindow.rootViewController |
68 presentViewController:alert | 68 presentViewController:alert |
69 animated:YES | 69 animated:YES |
70 completion:nil]; | 70 completion:nil]; |
71 } | 71 } |
72 | 72 |
73 } // namespace web | 73 } // namespace web |
OLD | NEW |