Record all objects created by API in browser.
This commit is contained in:
parent
17a9c2aea5
commit
683087fbc4
10 changed files with 163 additions and 9 deletions
|
@ -5,10 +5,15 @@
|
|||
#ifndef ATOM_BROWSER_ATOM_BROWSER_CONTEXT_H_
|
||||
#define ATOM_BROWSER_ATOM_BROWSER_CONTEXT_H_
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "brightray/browser/browser_context.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
namespace api {
|
||||
class ObjectsRegistry;
|
||||
}
|
||||
|
||||
class AtomBrowserContext : public brightray::BrowserContext {
|
||||
public:
|
||||
AtomBrowserContext();
|
||||
|
@ -17,9 +22,15 @@ class AtomBrowserContext : public brightray::BrowserContext {
|
|||
// We assume there is only one BrowserContext per browser process.
|
||||
static AtomBrowserContext* Get();
|
||||
|
||||
api::ObjectsRegistry* objects_registry() const {
|
||||
return objects_registry_.get();
|
||||
}
|
||||
|
||||
private:
|
||||
static AtomBrowserContext* self_;
|
||||
|
||||
scoped_ptr<api::ObjectsRegistry> objects_registry_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AtomBrowserContext);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue