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

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

Issue 2035653006: [DevTools] Move Console to v8 inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improved api a bit Created 4 years, 5 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
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 19 matching lines...) Expand all
30 #define FrameConsole_h 30 #define FrameConsole_h
31 31
32 #include "bindings/core/v8/ScriptState.h" 32 #include "bindings/core/v8/ScriptState.h"
33 #include "core/CoreExport.h" 33 #include "core/CoreExport.h"
34 #include "platform/heap/Handle.h" 34 #include "platform/heap/Handle.h"
35 #include "wtf/Forward.h" 35 #include "wtf/Forward.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class ConsoleMessage; 39 class ConsoleMessage;
40 class ConsoleMessageStorage;
41 class DocumentLoader; 40 class DocumentLoader;
42 class ResourceError; 41 class ResourceError;
43 class ResourceResponse; 42 class ResourceResponse;
44 class ScriptCallStack;
45 class WorkerInspectorProxy;
46 43
47 // FrameConsole takes per-frame console messages and routes them up through the FrameHost to the ChromeClient and Inspector. 44 // FrameConsole takes per-frame console messages and routes them up through the FrameHost to the ChromeClient and Inspector.
48 // It's meant as an abstraction around ChromeClient calls and the way that Blink core/ can add messages to the console. 45 // It's meant as an abstraction around ChromeClient calls and the way that Blink core/ can add messages to the console.
49 class CORE_EXPORT FrameConsole final : public GarbageCollected<FrameConsole> { 46 class CORE_EXPORT FrameConsole final : public GarbageCollected<FrameConsole> {
50 public: 47 public:
51 static FrameConsole* create(LocalFrame& frame) 48 static FrameConsole* create(LocalFrame& frame)
52 { 49 {
53 return new FrameConsole(frame); 50 return new FrameConsole(frame);
54 } 51 }
55 52
56 void addMessage(ConsoleMessage*); 53 void addMessage(ConsoleMessage*);
54 bool addMessageToStorage(ConsoleMessage*);
55 void reportMessageToClient(ConsoleMessage*);
57 56
58 void reportWorkerMessage(ConsoleMessage*); 57 void reportWorkerMessage(ConsoleMessage*);
59 void adoptWorkerMessage(ConsoleMessage*); 58 void adoptWorkerMessage(ConsoleMessage*);
60 59
61 void reportResourceResponseReceived(DocumentLoader*, unsigned long requestId entifier, const ResourceResponse&); 60 void reportResourceResponseReceived(DocumentLoader*, unsigned long requestId entifier, const ResourceResponse&);
62 61
63 static void mute();
64 static void unmute();
65
66 void clearMessages(); 62 void clearMessages();
67 63
68 void didFailLoading(unsigned long requestIdentifier, const ResourceError&); 64 void didFailLoading(unsigned long requestIdentifier, const ResourceError&);
69 65
70 DECLARE_TRACE(); 66 DECLARE_TRACE();
71 67
72 private: 68 private:
73 explicit FrameConsole(LocalFrame&); 69 explicit FrameConsole(LocalFrame&);
74 70
75 LocalFrame& frame() const 71 LocalFrame& frame() const
76 { 72 {
77 ASSERT(m_frame); 73 ASSERT(m_frame);
78 return *m_frame; 74 return *m_frame;
79 } 75 }
80 76
81 ConsoleMessageStorage* messageStorage();
82 bool addMessageToStorage(ConsoleMessage*);
83 void reportMessageToClient(ConsoleMessage*);
84
85 Member<LocalFrame> m_frame; 77 Member<LocalFrame> m_frame;
86 }; 78 };
87 79
88 } // namespace blink 80 } // namespace blink
89 81
90 #endif // FrameConsole_h 82 #endif // FrameConsole_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMWindow.cpp ('k') | third_party/WebKit/Source/core/frame/FrameConsole.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698