Move resolveProxy From app to session

This commit is contained in:
Cheng Zhao 2015-06-24 11:59:11 +08:00
parent 33c2768a77
commit ea69e91e49
4 changed files with 64 additions and 54 deletions

View file

@ -5,9 +5,14 @@
#ifndef ATOM_BROWSER_API_ATOM_API_SESSION_H_
#define ATOM_BROWSER_API_ATOM_API_SESSION_H_
#include <string>
#include "base/callback.h"
#include "native_mate/handle.h"
#include "native_mate/wrappable.h"
class GURL;
namespace atom {
class AtomBrowserContext;
@ -16,6 +21,8 @@ namespace api {
class Session: public mate::Wrappable {
public:
using ResolveProxyCallback = base::Callback<void(std::string)>;
static mate::Handle<Session> Create(v8::Isolate* isolate,
AtomBrowserContext* browser_context);
@ -28,6 +35,7 @@ class Session: public mate::Wrappable {
v8::Isolate* isolate) override;
private:
void ResolveProxy(const GURL& url, ResolveProxyCallback callback);
v8::Local<v8::Value> Cookies(v8::Isolate* isolate);
v8::Global<v8::Value> cookies_;