Expose AtomController's context

This commit is contained in:
Corey Johnson
2012-03-20 16:25:24 -07:00
parent 081ec97747
commit fc1b350efd
2 changed files with 6 additions and 0 deletions

View File

@@ -19,6 +19,8 @@ class ClientHandler;
- (id)initSpecsWithAtomContext:(CefRefPtr<CefV8Context>)atomContext;
- (id)initBenchmarksWithAtomContext:(CefRefPtr<CefV8Context>)atomContext;
- (CefRefPtr<CefV8Context>)context;
- (void)createBrowser;
@property (nonatomic, retain) IBOutlet NSView *webView;

View File

@@ -60,6 +60,10 @@
CefBrowser::CreateBrowser(window_info, _clientHandler.get(), [indexURLString UTF8String], settings);
}
- (CefRefPtr<CefV8Context>)context {
return _clientHandler->GetBrowser()->GetMainFrame()->GetV8Context();
}
#pragma mark BrowserDelegate
- (void)loadStart {