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

Side by Side Diff: Source/core/page/Console.cpp

Issue 22955006: Chrome::client() should return a ChromeClient reference. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | « Source/core/page/Chrome.cpp ('k') | Source/core/page/CreateWindow.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture : 1; 72 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture : 1;
73 RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, stackSize)); 73 RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, stackSize));
74 const ScriptCallFrame& lastCaller = callStack->at(0); 74 const ScriptCallFrame& lastCaller = callStack->at(0);
75 75
76 String message; 76 String message;
77 bool gotMessage = arguments->getFirstArgumentAsString(message); 77 bool gotMessage = arguments->getFirstArgumentAsString(message);
78 InspectorInstrumentation::addMessageToConsole(page, ConsoleAPIMessageSource, type, level, message, state, arguments); 78 InspectorInstrumentation::addMessageToConsole(page, ConsoleAPIMessageSource, type, level, message, state, arguments);
79 79
80 if (gotMessage) 80 if (gotMessage)
81 page->chrome().client()->addMessageToConsole(ConsoleAPIMessageSource, ty pe, level, message, lastCaller.lineNumber(), lastCaller.sourceURL()); 81 page->chrome().client().addMessageToConsole(ConsoleAPIMessageSource, typ e, level, message, lastCaller.lineNumber(), lastCaller.sourceURL());
82 } 82 }
83 83
84 void Console::debug(ScriptState* state, PassRefPtr<ScriptArguments> arguments) 84 void Console::debug(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
85 { 85 {
86 internalAddMessage(page(), LogMessageType, DebugMessageLevel, state, argumen ts); 86 internalAddMessage(page(), LogMessageType, DebugMessageLevel, state, argumen ts);
87 } 87 }
88 88
89 void Console::error(ScriptState* state, PassRefPtr<ScriptArguments> arguments) 89 void Console::error(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
90 { 90 {
91 internalAddMessage(page(), LogMessageType, ErrorMessageLevel, state, argumen ts); 91 internalAddMessage(page(), LogMessageType, ErrorMessageLevel, state, argumen ts);
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 230 }
231 231
232 Page* Console::page() const 232 Page* Console::page() const
233 { 233 {
234 if (!m_frame) 234 if (!m_frame)
235 return 0; 235 return 0;
236 return m_frame->page(); 236 return m_frame->page();
237 } 237 }
238 238
239 } // namespace WebCore 239 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/Chrome.cpp ('k') | Source/core/page/CreateWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698