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

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: clang format 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
25 didParseSource:(NSString*)source
26 baseLineNumber:(NSUInteger)lineNumber
27 fromURL:(NSURL*)url
28 sourceId:(int)sid
29 forWebFrame:(WebFrame*)webFrame;
30
31 // Called if a loaded javascript file fail to parse.
32 - (void)webView:(WebView*)webView
33 failedToParseSource:(NSString*)source
34 baseLineNumber:(unsigned)lineNumber
35 fromURL:(NSURL*)url
36 withError:(NSError*)error
37 forWebFrame:(WebFrame*)webFrame;
38
39 // Called if an exception is raised in Javascript.
40 - (void)webView:(WebView*)webView
41 exceptionWasRaised:(WebScriptCallFrame*)frame
42 sourceId:(int)sid
43 line:(int)lineno
44 forWebFrame:(WebFrame*)webFrame;
45
46 @end
47
48 // Simply use like a regular UIWebView. It just logs javascript information on
49 // the console.
50 @interface CRWDebugWebView : UIWebView
51
52 // Webview delegate API, which the superclass is. Used to set the script
53 // delegate on the same webview the superclass is delegate of.
54 - (void)webView:(id)sender
55 didClearWindowObject:(id)windowObject
56 forFrame:(WebFrame*)frame;
57
58 @end
59
60 #endif // !defined(NDEBUG)
61 #endif // IOS_WEB_WEB_STATE_UI_CRW_DEBUG_WEB_VIEW_H_
OLDNEW
« no previous file with comments | « ios/web/web_state/ui/crw_context_menu_provider.mm ('k') | ios/web/web_state/ui/crw_debug_web_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698