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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/MuteConsoleScope.h

Issue 1877203004: [DevTools] Follow up with cleanups for InjectedScript::Scope. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
(Empty)
1 // Copyright 2016 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 MuteConsoleScope_h
6 #define MuteConsoleScope_h
7
8 #include "platform/inspector_protocol/Allocator.h"
9 #include "platform/v8_inspector/V8DebuggerImpl.h"
10 #include "platform/v8_inspector/public/V8DebuggerClient.h"
11
12 namespace blink {
13
14 class MuteConsoleScope {
15 PROTOCOL_DISALLOW_COPY(MuteConsoleScope);
16 public:
17 explicit MuteConsoleScope(V8DebuggerImpl* debugger)
18 : m_debugger(debugger)
19 {
20 if (m_debugger)
21 m_debugger->client()->muteConsole();
22 }
23
24 ~MuteConsoleScope()
25 {
26 if (m_debugger)
27 m_debugger->client()->unmuteConsole();
28 }
29
30 private:
31 V8DebuggerImpl* m_debugger;
32 };
33
34 } // namespace blink
35
36 #endif // MuteConsoleScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698