Remove existing PathWatcher when window is reloaded or closed

This commit is contained in:
Corey Johnson 2012-11-15 11:16:00 -08:00
parent 0149012efc
commit 18f4134e81
2 changed files with 10 additions and 0 deletions

View File

@ -10,6 +10,9 @@ class AtomCefRenderProcessHandler : public CefRenderProcessHandler {
virtual void OnContextCreated(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context) OVERRIDE;
virtual void OnContextReleased(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context) OVERRIDE;
virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) OVERRIDE;

View File

@ -5,6 +5,7 @@
#import "native/v8_extensions/onig_scanner.h"
#import "native/v8_extensions/git.h"
#import "native/message_translation.h"
#import "path_watcher.h"
#include <iostream>
void AtomCefRenderProcessHandler::OnWebKitInitialized() {
@ -20,6 +21,12 @@ void AtomCefRenderProcessHandler::OnContextCreated(CefRefPtr<CefBrowser> browser
CefRefPtr<CefV8Context> context) {
}
void AtomCefRenderProcessHandler::OnContextReleased(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context) {
[PathWatcher removePathWatcherForContext:context];
}
bool AtomCefRenderProcessHandler::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) {