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

Side by Side Diff: ios/web/web_state/web_state_delegate_bridge.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: Add unittests. Address missed comments. 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
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/public/web_state/web_state_delegate_bridge.h" 5 #import "ios/web/public/web_state/web_state_delegate_bridge.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.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 namespace web { 10 namespace web {
(...skipping 11 matching lines...) Expand all
22 22
23 bool WebStateDelegateBridge::HandleContextMenu( 23 bool WebStateDelegateBridge::HandleContextMenu(
24 WebState* source, 24 WebState* source,
25 const ContextMenuParams& params) { 25 const ContextMenuParams& params) {
26 if ([delegate_ respondsToSelector:@selector(webState:handleContextMenu:)]) { 26 if ([delegate_ respondsToSelector:@selector(webState:handleContextMenu:)]) {
27 return [delegate_ webState:source handleContextMenu:params]; 27 return [delegate_ webState:source handleContextMenu:params];
28 } 28 }
29 return NO; 29 return NO;
30 } 30 }
31 31
32 JavaScriptDialogPresenter* WebStateDelegateBridge::GetJavaScriptDialogPresenter(
33 WebState* source) {
34 if ([delegate_
35 respondsToSelector:@selector(
Eugene But (OOO till 7-30) 2016/06/28 18:14:48 Optional NIT: Could you please move SEL to a separ
michaeldo 2016/06/28 21:58:27 Done.
36 javaScriptDialogPresenterForWebState:)]) {
37 return [delegate_ javaScriptDialogPresenterForWebState:source];
38 }
39 return nullptr;
40 }
41
32 } // web 42 } // web
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698