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/view_controller.h" | 5 #import "ios/web/shell/view_controller.h" |
6 | 6 |
7 #include "base/mac/objc_property_releaser.h" | 7 #include "base/mac/objc_property_releaser.h" |
8 #import "base/mac/scoped_nsobject.h" | 8 #import "base/mac/scoped_nsobject.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
286 | 286 |
287 - (void)webPageOrderedClose { | 287 - (void)webPageOrderedClose { |
288 } | 288 } |
289 - (void)goDelta:(int)delta { | 289 - (void)goDelta:(int)delta { |
290 } | 290 } |
291 - (void)openURLWithParams:(const web::WebState::OpenURLParams&)params { | 291 - (void)openURLWithParams:(const web::WebState::OpenURLParams&)params { |
292 } | 292 } |
293 - (BOOL)openExternalURL:(const GURL&)url { | 293 - (BOOL)openExternalURL:(const GURL&)url { |
294 return NO; | 294 return NO; |
295 } | 295 } |
296 | |
296 - (void)presentSSLError:(const net::SSLInfo&)info | 297 - (void)presentSSLError:(const net::SSLInfo&)info |
297 forSSLStatus:(const web::SSLStatus&)status | 298 forSSLStatus:(const web::SSLStatus&)status |
298 recoverable:(BOOL)recoverable | 299 recoverable:(BOOL)recoverable |
299 callback:(SSLErrorCallback)shouldContinue { | 300 callback:(SSLErrorCallback)shouldContinue { |
301 UIAlertController* alert = [UIAlertController | |
302 alertControllerWithTitle:@"Your connection is not private" | |
303 message:nil | |
304 preferredStyle:UIAlertControllerStyleActionSheet]; | |
305 [alert addAction:[UIAlertAction actionWithTitle:@"Cancel" | |
kkhorimoto
2015/09/28 21:49:58
s/Cancel/Go Back
Eugene But (OOO till 7-30)
2015/09/28 22:11:05
Done.
| |
306 style:UIAlertActionStyleCancel | |
307 handler:^(UIAlertAction*) { | |
308 shouldContinue(NO); | |
309 }]]; | |
310 | |
311 if (recoverable) { | |
312 [alert addAction:[UIAlertAction actionWithTitle:@"Continue" | |
313 style:UIAlertActionStyleDefault | |
314 handler:^(UIAlertAction*) { | |
315 shouldContinue(YES); | |
316 }]]; | |
317 } | |
318 [self presentViewController:alert animated:YES completion:nil]; | |
300 } | 319 } |
320 | |
301 - (void)presentSpoofingError { | 321 - (void)presentSpoofingError { |
302 } | 322 } |
303 - (void)webLoadCancelled:(const GURL&)url { | 323 - (void)webLoadCancelled:(const GURL&)url { |
304 } | 324 } |
305 - (void)webDidUpdateHistoryStateWithPageURL:(const GURL&)pageUrl { | 325 - (void)webDidUpdateHistoryStateWithPageURL:(const GURL&)pageUrl { |
306 } | 326 } |
307 - (void)webController:(CRWWebController*)webController | 327 - (void)webController:(CRWWebController*)webController |
308 retrievePlaceholderOverlayImage:(void (^)(UIImage*))block { | 328 retrievePlaceholderOverlayImage:(void (^)(UIImage*))block { |
309 } | 329 } |
310 - (void)webController:(CRWWebController*)webController | 330 - (void)webController:(CRWWebController*)webController |
(...skipping 15 matching lines...) Expand all Loading... | |
326 - (void)webDidPrepareForGoBack { | 346 - (void)webDidPrepareForGoBack { |
327 } | 347 } |
328 - (int)downloadImageAtUrl:(const GURL&)url | 348 - (int)downloadImageAtUrl:(const GURL&)url |
329 maxBitmapSize:(uint32_t)maxBitmapSize | 349 maxBitmapSize:(uint32_t)maxBitmapSize |
330 callback: | 350 callback: |
331 (const web::WebState::ImageDownloadCallback&)callback { | 351 (const web::WebState::ImageDownloadCallback&)callback { |
332 return -1; | 352 return -1; |
333 } | 353 } |
334 | 354 |
335 @end | 355 @end |
OLD | NEW |