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

Side by Side Diff: Source/core/inspector/InspectorConsoleMessage.h

Issue 466753002: DevTools: Do not push to frontend messages from worker while it is alive (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address vsevik's comments Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
4 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 28 matching lines...) Expand all
39 39
40 namespace blink { 40 namespace blink {
41 41
42 class LocalDOMWindow; 42 class LocalDOMWindow;
43 class InjectedScriptManager; 43 class InjectedScriptManager;
44 class InspectorFrontend; 44 class InspectorFrontend;
45 class ScriptArguments; 45 class ScriptArguments;
46 class ScriptCallFrame; 46 class ScriptCallFrame;
47 class ScriptCallStack; 47 class ScriptCallStack;
48 class ScriptValue; 48 class ScriptValue;
49 class WorkerGlobalScopeProxy;
49 50
50 class InspectorConsoleMessage { 51 class InspectorConsoleMessage {
51 WTF_MAKE_NONCOPYABLE(InspectorConsoleMessage); WTF_MAKE_FAST_ALLOCATED; 52 WTF_MAKE_NONCOPYABLE(InspectorConsoleMessage); WTF_MAKE_FAST_ALLOCATED;
52 public: 53 public:
53 InspectorConsoleMessage(bool canGenerateCallStack, MessageSource, MessageTyp e, MessageLevel, const String& message); 54 InspectorConsoleMessage(bool canGenerateCallStack, MessageSource, MessageTyp e, MessageLevel, const String& message);
54 InspectorConsoleMessage(bool canGenerateCallStack, MessageSource, MessageTyp e, MessageLevel, const String& message, const String& url, unsigned line, unsign ed column, ScriptState*, unsigned long requestIdentifier); 55 InspectorConsoleMessage(bool canGenerateCallStack, MessageSource, MessageTyp e, MessageLevel, const String& message, const String& url, unsigned line, unsign ed column, ScriptState*, unsigned long requestIdentifier);
55 InspectorConsoleMessage(MessageSource, MessageType, MessageLevel, const Stri ng& message, PassRefPtrWillBeRawPtr<ScriptCallStack>, unsigned long requestIdent ifier); 56 InspectorConsoleMessage(MessageSource, MessageType, MessageLevel, const Stri ng& message, PassRefPtrWillBeRawPtr<ScriptCallStack>, unsigned long requestIdent ifier);
56 InspectorConsoleMessage(bool canGenerateCallStack, MessageSource, MessageTyp e, MessageLevel, const String& message, PassRefPtrWillBeRawPtr<ScriptArguments>, ScriptState*, unsigned long requestIdentifier); 57 InspectorConsoleMessage(bool canGenerateCallStack, MessageSource, MessageTyp e, MessageLevel, const String& message, PassRefPtrWillBeRawPtr<ScriptArguments>, ScriptState*, unsigned long requestIdentifier);
57 ~InspectorConsoleMessage(); 58 ~InspectorConsoleMessage();
58 59
59 void addToFrontend(InspectorFrontend::Console*, InjectedScriptManager*, bool generatePreview); 60 void addToFrontend(InspectorFrontend::Console*, InjectedScriptManager*, bool generatePreview);
60 void setTimestamp(double timestamp) { m_timestamp = timestamp; } 61 void setTimestamp(double timestamp) { m_timestamp = timestamp; }
62 void setWorkerGlobalScopeProxy(WorkerGlobalScopeProxy* proxy) { m_workerProx y = proxy; }
63 WorkerGlobalScopeProxy* getWorkerGlobalScopeProxy() { return m_workerProxy; }
vsevik 2014/08/12 15:46:07 no get* please
sergeyv 2014/08/12 16:00:58 Done.
61 64
62 MessageType type() const { return m_type; } 65 MessageType type() const { return m_type; }
63 66
64 void windowCleared(LocalDOMWindow*); 67 void windowCleared(LocalDOMWindow*);
65 68
66 unsigned argumentCount(); 69 unsigned argumentCount();
67 70
68 private: 71 private:
69 void autogenerateMetadata(bool canGenerateCallStack, ScriptState* = 0); 72 void autogenerateMetadata(bool canGenerateCallStack, ScriptState* = 0);
70 73
71 MessageSource m_source; 74 MessageSource m_source;
72 MessageType m_type; 75 MessageType m_type;
73 MessageLevel m_level; 76 MessageLevel m_level;
74 String m_message; 77 String m_message;
75 ScriptStateProtectingContext m_scriptState; 78 ScriptStateProtectingContext m_scriptState;
76 RefPtrWillBePersistent<ScriptArguments> m_arguments; 79 RefPtrWillBePersistent<ScriptArguments> m_arguments;
77 RefPtrWillBePersistent<ScriptCallStack> m_callStack; 80 RefPtrWillBePersistent<ScriptCallStack> m_callStack;
78 String m_url; 81 String m_url;
79 unsigned m_line; 82 unsigned m_line;
80 unsigned m_column; 83 unsigned m_column;
81 String m_requestId; 84 String m_requestId;
82 double m_timestamp; 85 double m_timestamp;
86 WorkerGlobalScopeProxy* m_workerProxy;
83 }; 87 };
84 88
85 } // namespace blink 89 } // namespace blink
86 90
87 #endif // InspectorConsoleMessage_h 91 #endif // InspectorConsoleMessage_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698