OLD | NEW |
---|---|
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/context_menu_params.h" | |
Eugene But (OOO till 7-30)
2016/06/24 17:04:52
Could you please land this change separately :)
michaeldo
2016/06/27 20:30:10
will do :)
| |
7 #import "ios/web/public/web_state/web_state.h" | 8 #import "ios/web/public/web_state/web_state.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 } | 13 } |
14 | 14 |
15 @synthesize webState = _webState; | 15 @synthesize webState = _webState; |
16 @synthesize changedProgress = _changedProgress; | 16 @synthesize changedProgress = _changedProgress; |
17 | 17 |
18 - (void)webState:(web::WebState*)webState didChangeProgress:(double)progress { | 18 - (void)webState:(web::WebState*)webState didChangeProgress:(double)progress { |
19 _webState = webState; | 19 _webState = webState; |
20 _changedProgress = progress; | 20 _changedProgress = progress; |
21 } | 21 } |
22 | 22 |
23 - (BOOL)webState:(web::WebState*)webState | 23 - (BOOL)webState:(web::WebState*)webState |
24 handleContextMenu:(const web::ContextMenuParams&)params { | 24 handleContextMenu:(const web::ContextMenuParams&)params { |
25 _webState = webState; | 25 _webState = webState; |
26 _contextMenuParams.reset(new web::ContextMenuParams(params)); | 26 _contextMenuParams.reset(new web::ContextMenuParams(params)); |
27 return YES; | 27 return YES; |
28 } | 28 } |
29 | 29 |
30 - (web::ContextMenuParams*)contextMenuParams { | 30 - (web::ContextMenuParams*)contextMenuParams { |
31 return _contextMenuParams.get(); | 31 return _contextMenuParams.get(); |
32 } | 32 } |
33 | 33 |
34 @end | 34 @end |
OLD | NEW |