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

Side by Side Diff: ios/web/web_state/ui/crw_debug_web_view.h

Issue 1048613002: Upstream ios/web/web_state/ui support classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
(Empty)
1 // Copyright 2011 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.
4 #ifndef IOS_WEB_WEB_STATE_UI_CRW_DEBUG_WEB_VIEW_H_
5 #define IOS_WEB_WEB_STATE_UI_CRW_DEBUG_WEB_VIEW_H_
6
7 // This class is only available in debug mode. It uses private API.
8 #if !defined(NDEBUG)
9
10 #import <UIKit/UIKit.h>
11
12 // All part of webkit API, but it is private on iOS.
13 @class WebFrame;
14 @class WebScriptCallFrame;
15 @class WebView;
16
17 @protocol CRWDebugWebView_WebViewScriptDelegate
18 @optional
19 // Called when a javascript statement want to write on the console.
20 - (void)webView:(WebView*)webView addMessageToConsole:(NSDictionary*)dict;
21
22 // Some source was parsed, establishing a "source ID" (>= 0) for future
23 // reference
24 - (void)webView:(WebView *)webView didParseSource:(NSString*)source
Eugene But (OOO till 7-30) 2015/03/30 05:03:58 NIT: No space before *
stuartmorgan 2015/03/30 14:17:57 Done. Also fixed the missing break before didParse
25 baseLineNumber:(NSUInteger)lineNumber
26 fromURL:(NSURL*)url
27 sourceId:(int)sid
28 forWebFrame:(WebFrame*)webFrame;
29
30 // Called if a loaded javascript file fail to parse.
31 - (void)webView:(WebView*)webView
32 failedToParseSource:(NSString*)source
33 baseLineNumber:(unsigned)lineNumber
34 fromURL:(NSURL*)url
35 withError:(NSError*)error
36 forWebFrame:(WebFrame*)webFrame;
37
38 // Called if an exception is raised in Javascript.
39 - (void)webView:(WebView*)webView
40 exceptionWasRaised:(WebScriptCallFrame*)frame
41 sourceId:(int)sid
42 line:(int)lineno
43 forWebFrame:(WebFrame*)webFrame;
44
45 @end
46
47 // Simply use like a regular UIWebView. It just logs javascript information on
48 // the console.
49 @interface CRWDebugWebView : UIWebView
50
51 // Webview delegate API, which the superclass is. Used to set the script
52 // delegate on the same webview the superclass is delegate of.
53 - (void)webView:(id)sender didClearWindowObject:(id)windowObject
Eugene But (OOO till 7-30) 2015/03/30 05:03:58 Optional NIT: align :
stuartmorgan 2015/03/30 14:17:57 Done, and also fixed the missing break.
54 forFrame:(WebFrame*)frame;
55
56 @end
57
58 #endif // !defined(NDEBUG)
59 #endif // IOS_WEB_WEB_STATE_UI_CRW_DEBUG_WEB_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698