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

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

Issue 1308273007: Make classes and structures in core/inspector fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 | « Source/core/inspector/InspectorCSSAgent.h ('k') | Source/core/inspector/InspectorState.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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 InstrumentingAgents* instrumentingAgents() const { return m_instrumentingAge nts.get(); } 74 InstrumentingAgents* instrumentingAgents() const { return m_instrumentingAge nts.get(); }
75 bool isValid() const { return !!m_instrumentingAgents; } 75 bool isValid() const { return !!m_instrumentingAgents; }
76 76
77 private: 77 private:
78 RefPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents; 78 RefPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents;
79 }; 79 };
80 80
81 namespace InspectorInstrumentation { 81 namespace InspectorInstrumentation {
82 82
83 class CORE_EXPORT FrontendCounter { 83 class CORE_EXPORT FrontendCounter {
84 STATIC_ONLY(FrontendCounter);
84 private: 85 private:
85 friend void frontendCreated(); 86 friend void frontendCreated();
86 friend void frontendDeleted(); 87 friend void frontendDeleted();
87 friend bool hasFrontends(); 88 friend bool hasFrontends();
88 static int s_frontendCounter; 89 static int s_frontendCounter;
89 }; 90 };
90 91
91 inline void frontendCreated() { atomicIncrement(&FrontendCounter::s_frontendCoun ter); } 92 inline void frontendCreated() { atomicIncrement(&FrontendCounter::s_frontendCoun ter); }
92 inline void frontendDeleted() { atomicDecrement(&FrontendCounter::s_frontendCoun ter); } 93 inline void frontendDeleted() { atomicDecrement(&FrontendCounter::s_frontendCoun ter); }
93 inline bool hasFrontends() { return FrontendCounter::s_frontendCounter; } 94 inline bool hasFrontends() { return FrontendCounter::s_frontendCounter; }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 173
173 } // namespace blink 174 } // namespace blink
174 175
175 #include "core/InspectorInstrumentationInl.h" 176 #include "core/InspectorInstrumentationInl.h"
176 177
177 #include "core/inspector/InspectorInstrumentationCustomInl.h" 178 #include "core/inspector/InspectorInstrumentationCustomInl.h"
178 179
179 #include "core/InspectorOverridesInl.h" 180 #include "core/InspectorOverridesInl.h"
180 181
181 #endif // !defined(InspectorInstrumentation_h) 182 #endif // !defined(InspectorInstrumentation_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.h ('k') | Source/core/inspector/InspectorState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698