diff options
author | mkosiba@chromium.org <mkosiba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 14:14:25 +0000 |
---|---|---|
committer | mkosiba@chromium.org <mkosiba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 14:14:25 +0000 |
commit | a796f2093103d4895214b777ed2987a929c28f54 (patch) | |
tree | d9e758214515e71574bdd6195cdfd957ee3dad03 /content/public/browser/web_contents_delegate.h | |
parent | 89783ff0a8c6a6128d0ed43e4a0c516969b3a00b (diff) | |
download | chromium_src-a796f2093103d4895214b777ed2987a929c28f54.zip chromium_src-a796f2093103d4895214b777ed2987a929c28f54.tar.gz chromium_src-a796f2093103d4895214b777ed2987a929c28f54.tar.bz2 |
Handle console messages in WebContentsDelegate.
This forwards the console messages to the WebContentsDelegate.
The main motivation behind this change is to enable implementing the
WebChromeClient.onConsoleMessage Android WebView API.
BUG=none
TEST=builds
Review URL: https://chromiumcodereview.appspot.com/10332241
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139536 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public/browser/web_contents_delegate.h')
-rw-r--r-- | content/public/browser/web_contents_delegate.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h index a3e070b..a1ea0c0 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -180,6 +180,15 @@ class CONTENT_EXPORT WebContentsDelegate { // Default is false. virtual bool ShouldSuppressDialogs(); + // Add a message to the console. Returning true indicates that the delegate + // handled the message. If false is returned the default logging mechanism + // will be used for the message. + virtual bool AddMessageToConsole(WebContents* soruce, + int32 level, + const string16& message, + int32 line_no, + const string16& source_id); + // Tells us that we've finished firing this tab's beforeunload event. // The proceed bool tells us whether the user chose to proceed closing the // tab. Returns true if the tab can continue on firing its unload event. |