Move global preload implementation to be session based

This commit is contained in:
Samuel Attard 2017-09-17 01:05:49 +10:00 committed by Cheng Zhao
parent 448ccc261d
commit 3b80ee0655
9 changed files with 58 additions and 61 deletions

View file

@ -81,6 +81,9 @@ class Session: public mate::TrackableObject<Session>,
void GetBlobData(const std::string& uuid,
const AtomBlobReader::CompletionCallback& callback);
void CreateInterruptedDownload(const mate::Dictionary& options);
void AddPreload(const base::FilePath::StringType& preloadPath);
void RemovePreload(const base::FilePath::StringType& preloadPath);
std::vector<base::FilePath::StringType> GetPreloads();
v8::Local<v8::Value> Cookies(v8::Isolate* isolate);
v8::Local<v8::Value> Protocol(v8::Isolate* isolate);
v8::Local<v8::Value> WebRequest(v8::Isolate* isolate);
@ -103,6 +106,7 @@ class Session: public mate::TrackableObject<Session>,
std::string devtools_network_emulation_client_id_;
scoped_refptr<AtomBrowserContext> browser_context_;
std::vector<base::FilePath::StringType> g_preloads;
DISALLOW_COPY_AND_ASSIGN(Session);
};