1 // Copyright (c) 2009 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 CHROME_FRAME_CHROME_FRAME_REPORTING_H_ 6 #define CHROME_FRAME_CHROME_FRAME_REPORTING_H_ 7 8 #include "chrome_frame/scoped_initialization_manager.h" 9 10 namespace chrome_frame { 11 12 // A Traits class for a ScopedInitializationManager that starts/stops crash 13 // reporting for npchrome_frame.dll. 14 class CrashReportingTraits { 15 public: 16 static void Initialize(); 17 static void Shutdown(); 18 }; 19 20 // Manages crash reporting for the Chrome Frame dll. Crash reporting cannot be 21 // reliably started or stopped when the loader lock is held, so DllMain cannot 22 // be used to start/stop reporting. Rather, instances of this class are used in 23 // each entrypoint into the dll. 24 typedef ScopedInitializationManager<CrashReportingTraits> ScopedCrashReporting; 25 26 } // namespace chrome_frame 27 28 #endif // CHROME_FRAME_CHROME_FRAME_REPORTING_H_ 29