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

Side by Side Diff: ios/web/web_state/js/crw_js_message_dynamic_manager.mm

Issue 988383002: Upstream various ios/web utilities and helpers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web-public-upstreaming
Patch Set: Created 5 years, 9 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 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/web_state/js/crw_js_message_dynamic_manager.h" 5 #import "ios/web/web_state/js/crw_js_message_dynamic_manager.h"
6 6
7 #include "base/logging.h"
7 #import "ios/web/web_state/js/crw_js_common_manager.h" 8 #import "ios/web/web_state/js/crw_js_common_manager.h"
8 #include "ios/web/web_view_util.h"
9 9
10 @implementation CRWJSMessageDynamicManager 10 @implementation CRWJSMessageDynamicManager
11 11
12 - (NSString*)scriptPath { 12 - (NSString*)scriptPath {
13 if (web::IsWKWebViewEnabled()) 13 switch ([[self receiver] webViewType]) {
14 return @"message_dynamic_wk"; 14 case web::UI_WEB_VIEW_TYPE:
15 return @"message_dynamic_ui"; 15 return @"message_dynamic_ui";
16 case web::WK_WEB_VIEW_TYPE:
17 return @"message_dynamic_wk";
18 }
19 NOTREACHED();
20 return nil;
16 } 21 }
17 22
18 - (NSString*)presenceBeacon { 23 - (NSString*)presenceBeacon {
19 return @"__gCrWeb.message_dynamic"; 24 return @"__gCrWeb.message_dynamic";
20 } 25 }
21 26
22 - (NSArray*)directDependencies { 27 - (NSArray*)directDependencies {
23 return @[ 28 return @[
24 // The 'base' manager is omitted deliberately; see <crbug.com/404640>. 29 // The 'base' manager is omitted deliberately; see <crbug.com/404640>.
25 [CRWJSCommonManager class], 30 [CRWJSCommonManager class],
26 ]; 31 ];
27 } 32 }
28 33
29 @end 34 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698