2013-04-21 06:53:26 +00:00
|
|
|
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2014-03-16 00:58:59 +00:00
|
|
|
#ifndef ATOM_BROWSER_API_ATOM_BROWSER_BINDINGS_H_
|
|
|
|
#define ATOM_BROWSER_API_ATOM_BROWSER_BINDINGS_H_
|
2013-04-21 06:53:26 +00:00
|
|
|
|
2013-12-10 06:14:05 +00:00
|
|
|
#include "base/strings/string16.h"
|
2014-03-16 00:30:26 +00:00
|
|
|
#include "atom/common/api/atom_bindings.h"
|
|
|
|
#include "atom/common/v8/scoped_persistent.h"
|
2013-04-21 06:53:26 +00:00
|
|
|
|
2013-04-22 13:32:48 +00:00
|
|
|
namespace base {
|
|
|
|
class ListValue;
|
|
|
|
}
|
|
|
|
|
2014-04-04 14:04:42 +00:00
|
|
|
namespace content {
|
|
|
|
class WebContents;
|
|
|
|
}
|
|
|
|
|
2013-09-22 01:52:58 +00:00
|
|
|
namespace IPC {
|
|
|
|
class Message;
|
|
|
|
}
|
|
|
|
|
2013-04-21 06:53:26 +00:00
|
|
|
namespace atom {
|
|
|
|
|
|
|
|
class AtomBrowserBindings : public AtomBindings {
|
|
|
|
public:
|
|
|
|
AtomBrowserBindings();
|
|
|
|
virtual ~AtomBrowserBindings();
|
|
|
|
|
2013-04-22 13:32:48 +00:00
|
|
|
// Called when received a message from renderer.
|
2013-04-23 04:18:07 +00:00
|
|
|
void OnRendererMessage(int process_id,
|
|
|
|
int routing_id,
|
2013-09-20 14:55:42 +00:00
|
|
|
const string16& channel,
|
2013-04-23 04:18:07 +00:00
|
|
|
const base::ListValue& args);
|
2013-04-22 13:32:48 +00:00
|
|
|
|
2013-04-23 13:52:19 +00:00
|
|
|
// Called when received a synchronous message from renderer.
|
|
|
|
void OnRendererMessageSync(int process_id,
|
|
|
|
int routing_id,
|
2013-09-20 14:55:42 +00:00
|
|
|
const string16& channel,
|
2013-04-23 13:52:19 +00:00
|
|
|
const base::ListValue& args,
|
2014-04-04 14:04:42 +00:00
|
|
|
content::WebContents* sender,
|
2013-09-22 01:52:58 +00:00
|
|
|
IPC::Message* message);
|
2013-04-23 13:52:19 +00:00
|
|
|
|
2013-04-21 06:53:26 +00:00
|
|
|
private:
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(AtomBrowserBindings);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace atom
|
|
|
|
|
2014-03-16 00:58:59 +00:00
|
|
|
#endif // ATOM_BROWSER_API_ATOM_BROWSER_BINDINGS_H_
|