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

Side by Side Diff: chrome/renderer/extensions/console.h

Issue 12853007: Don't throw exceptions when v8 objects/contexts are missing, and catch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable test #2 Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/extensions/app_bindings.cc ('k') | chrome/renderer/extensions/console.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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
5 #ifndef CHROME_RENDERER_EXTENSIONS_CONSOLE_H_
6 #define CHROME_RENDERER_EXTENSIONS_CONSOLE_H_
7
8 #include <string>
9
10 #include "content/public/common/console_message_level.h"
11 #include "v8/include/v8.h"
12
13 namespace content {
14 class RenderView;
15 }
16
17 namespace extensions {
18
19 // Utility for logging messages to RenderViews.
20 namespace console {
21
22 // Adds |message| to the console of |render_view| at various log levels.
23 void Debug(content::RenderView* render_view, const std::string& message);
24 void Log(content::RenderView* render_view, const std::string& message);
25 void Warn(content::RenderView* render_view, const std::string& message);
26 void Error(content::RenderView* render_view, const std::string& message);
27
28 void AddMessage(content::RenderView* render_view,
29 content::ConsoleMessageLevel level,
30 const std::string& message);
31
32 // Adds |message| to the console that hosts |context|, if any.
33 void Debug(v8::Handle<v8::Context> context, const std::string& message);
34 void Log(v8::Handle<v8::Context> context, const std::string& message);
35 void Warn(v8::Handle<v8::Context> context, const std::string& message);
36 void Error(v8::Handle<v8::Context> context, const std::string& message);
37
38 void AddMessage(v8::Handle<v8::Context> context,
39 content::ConsoleMessageLevel level,
40 const std::string& message);
41
42 } // namespace console
43
44 } // namespace extensions
45
46 #endif // CHROME_RENDERER_EXTENSIONS_CONSOLE_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/app_bindings.cc ('k') | chrome/renderer/extensions/console.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698