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

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

Issue 2074733002: Add public API for handling Javascript alerts and prompt. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace BOOL with bool in unittest. 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 | « ios/web/web_state/web_state_delegate_stub.h ('k') | ios/web/web_state/web_state_impl.h » ('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 2016 The Chromium Authors. All rights reserved. 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 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/web_state/web_state_delegate_stub.h" 5 #import "ios/web/web_state/web_state_delegate_stub.h"
6 6
7 #import "ios/web/public/web_state/web_state.h" 7 #import "ios/web/public/web_state/web_state.h"
8 #import "ios/web/public/web_state/context_menu_params.h" 8 #import "ios/web/public/web_state/context_menu_params.h"
9 9
10 @implementation CRWWebStateDelegateStub { 10 @implementation CRWWebStateDelegateStub {
11 // Backs up the property with the same name. 11 // Backs up the property with the same name.
12 std::unique_ptr<web::ContextMenuParams> _contextMenuParams; 12 std::unique_ptr<web::ContextMenuParams> _contextMenuParams;
13 // Backs up the property with the same name.
14 BOOL _javaScriptDialogPresenterRequested;
13 } 15 }
14 16
15 @synthesize webState = _webState; 17 @synthesize webState = _webState;
16 @synthesize changedProgress = _changedProgress; 18 @synthesize changedProgress = _changedProgress;
17 19
18 - (void)webState:(web::WebState*)webState didChangeProgress:(double)progress { 20 - (void)webState:(web::WebState*)webState didChangeProgress:(double)progress {
19 _webState = webState; 21 _webState = webState;
20 _changedProgress = progress; 22 _changedProgress = progress;
21 } 23 }
22 24
23 - (BOOL)webState:(web::WebState*)webState 25 - (BOOL)webState:(web::WebState*)webState
24 handleContextMenu:(const web::ContextMenuParams&)params { 26 handleContextMenu:(const web::ContextMenuParams&)params {
25 _webState = webState; 27 _webState = webState;
26 _contextMenuParams.reset(new web::ContextMenuParams(params)); 28 _contextMenuParams.reset(new web::ContextMenuParams(params));
27 return YES; 29 return YES;
28 } 30 }
29 31
32 - (web::JavaScriptDialogPresenter*)javaScriptDialogPresenterForWebState:
33 (web::WebState*)webState {
34 _webState = webState;
35 _javaScriptDialogPresenterRequested = YES;
36 return nil;
37 }
38
30 - (web::ContextMenuParams*)contextMenuParams { 39 - (web::ContextMenuParams*)contextMenuParams {
31 return _contextMenuParams.get(); 40 return _contextMenuParams.get();
32 } 41 }
33 42
43 - (BOOL)javaScriptDialogPresenterRequested {
44 return _javaScriptDialogPresenterRequested;
45 }
46
34 @end 47 @end
OLDNEW
« no previous file with comments | « ios/web/web_state/web_state_delegate_stub.h ('k') | ios/web/web_state/web_state_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698