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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameConsole.cpp

Issue 2732113004: Remove FrameHost::consoleMessageStorage() methods (Closed)
Patch Set: Rebase Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameHost.h » ('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) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 } 63 }
64 64
65 if (addMessageToStorage(consoleMessage)) 65 if (addMessageToStorage(consoleMessage))
66 reportMessageToClient(consoleMessage->source(), consoleMessage->level(), 66 reportMessageToClient(consoleMessage->source(), consoleMessage->level(),
67 consoleMessage->message(), 67 consoleMessage->message(),
68 consoleMessage->location()); 68 consoleMessage->location());
69 } 69 }
70 70
71 bool FrameConsole::addMessageToStorage(ConsoleMessage* consoleMessage) { 71 bool FrameConsole::addMessageToStorage(ConsoleMessage* consoleMessage) {
72 if (!m_frame->document() || !m_frame->host()) 72 if (!m_frame->document() || !m_frame->page())
73 return false; 73 return false;
74 m_frame->host()->consoleMessageStorage().addConsoleMessage( 74 m_frame->page()->consoleMessageStorage().addConsoleMessage(
75 m_frame->document(), consoleMessage); 75 m_frame->document(), consoleMessage);
76 return true; 76 return true;
77 } 77 }
78 78
79 void FrameConsole::reportMessageToClient(MessageSource source, 79 void FrameConsole::reportMessageToClient(MessageSource source,
80 MessageLevel level, 80 MessageLevel level,
81 const String& message, 81 const String& message,
82 SourceLocation* location) { 82 SourceLocation* location) {
83 if (source == NetworkMessageSource) 83 if (source == NetworkMessageSource)
84 return; 84 return;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 addMessageToStorage(ConsoleMessage::createForRequest( 156 addMessageToStorage(ConsoleMessage::createForRequest(
157 NetworkMessageSource, ErrorMessageLevel, message.toString(), 157 NetworkMessageSource, ErrorMessageLevel, message.toString(),
158 error.failingURL(), requestIdentifier)); 158 error.failingURL(), requestIdentifier));
159 } 159 }
160 160
161 DEFINE_TRACE(FrameConsole) { 161 DEFINE_TRACE(FrameConsole) {
162 visitor->trace(m_frame); 162 visitor->trace(m_frame);
163 } 163 }
164 164
165 } // namespace blink 165 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameHost.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698