1 // Copyright 2015 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.
5 #ifndef IOS_WEB_WEB_STATE_JS_PAGE_SCRIPT_UTIL_H_
6 #define IOS_WEB_WEB_STATE_JS_PAGE_SCRIPT_UTIL_H_
8 #import <Foundation/Foundation.h>
10 #include "ios/web/public/web_view_type.h"
14 // Returns an autoreleased string containing the JavaScript loaded from a
15 // bundled resource file with the given name (excluding extension).
16 NSString
* GetPageScript(NSString
* script_file_name
);
18 // Returns an autoreleased string containing the JavaScript to be injected into
19 // the web view as early as possible. The type of a target web view must match
21 NSString
* GetEarlyPageScript(WebViewType web_view_type
);
25 #endif // IOS_WEB_WEB_STATE_JS_PAGE_SCRIPT_UTIL_H_