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

Side by Side Diff: ios/web/web_state/web_state_delegate_stub.mm

Issue 2650913008: Renamed CRWWebStateDelegateStub to CRWMockWebStateDelegate. (Closed)
Patch Set: Created 3 years, 10 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 | « ios/web/web_state/web_state_delegate_stub.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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 #import "ios/web/web_state/web_state_delegate_stub.h"
6
7 #import "ios/web/public/web_state/web_state.h"
8 #import "ios/web/public/web_state/context_menu_params.h"
9
10 @implementation CRWWebStateDelegateStub {
11 // Backs up the property with the same name.
12 std::unique_ptr<web::WebState::OpenURLParams> _openURLParams;
13 // Backs up the property with the same name.
14 std::unique_ptr<web::ContextMenuParams> _contextMenuParams;
15 // Backs up the property with the same name.
16 BOOL _javaScriptDialogPresenterRequested;
17 }
18
19 @synthesize webState = _webState;
20 @synthesize changedProgress = _changedProgress;
21 @synthesize repostFormWarningRequested = _repostFormWarningRequested;
22 @synthesize authenticationRequested = _authenticationRequested;
23
24 - (web::WebState*)webState:(web::WebState*)webState
25 openURLWithParams:(const web::WebState::OpenURLParams&)params {
26 _webState = webState;
27 _openURLParams.reset(new web::WebState::OpenURLParams(params));
28 return webState;
29 }
30
31 - (void)webState:(web::WebState*)webState didChangeProgress:(double)progress {
32 _webState = webState;
33 _changedProgress = progress;
34 }
35
36 - (BOOL)webState:(web::WebState*)webState
37 handleContextMenu:(const web::ContextMenuParams&)params {
38 _webState = webState;
39 _contextMenuParams.reset(new web::ContextMenuParams(params));
40 return YES;
41 }
42
43 - (void)webState:(web::WebState*)webState
44 runRepostFormDialogWithCompletionHandler:(void (^)(BOOL))handler {
45 _webState = webState;
46 _repostFormWarningRequested = YES;
47 }
48
49 - (web::JavaScriptDialogPresenter*)javaScriptDialogPresenterForWebState:
50 (web::WebState*)webState {
51 _webState = webState;
52 _javaScriptDialogPresenterRequested = YES;
53 return nil;
54 }
55
56 - (void)webState:(web::WebState*)webState
57 didRequestHTTPAuthForProtectionSpace:(NSURLProtectionSpace*)protectionSpace
58 proposedCredential:(NSURLCredential*)proposedCredential
59 completionHandler:(void (^)(NSString* username,
60 NSString* password))handler {
61 _webState = webState;
62 _authenticationRequested = YES;
63 }
64
65 - (const web::WebState::OpenURLParams*)openURLParams {
66 return _openURLParams.get();
67 }
68
69 - (web::ContextMenuParams*)contextMenuParams {
70 return _contextMenuParams.get();
71 }
72
73 - (BOOL)javaScriptDialogPresenterRequested {
74 return _javaScriptDialogPresenterRequested;
75 }
76
77 @end
OLDNEW
« no previous file with comments | « ios/web/web_state/web_state_delegate_stub.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698