Use string16 instead of std::string when sending IPC messages.
The underlying V8::String is represented in UTF18, by using string16 in IPC messages we can avoid the overhead of encode conversion.
This commit is contained in:
parent
ef5a4b5fe0
commit
ef4b36d621
17 changed files with 68 additions and 60 deletions
|
@ -5,8 +5,7 @@
|
|||
#ifndef ATOM_BROWSER_API_ATOM_BROWSER_BINDINGS_
|
||||
#define ATOM_BROWSER_API_ATOM_BROWSER_BINDINGS_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/string16.h"
|
||||
#include "common/api/atom_bindings.h"
|
||||
|
||||
namespace base {
|
||||
|
@ -26,15 +25,15 @@ class AtomBrowserBindings : public AtomBindings {
|
|||
// Called when received a message from renderer.
|
||||
void OnRendererMessage(int process_id,
|
||||
int routing_id,
|
||||
const std::string& channel,
|
||||
const string16& channel,
|
||||
const base::ListValue& args);
|
||||
|
||||
// Called when received a synchronous message from renderer.
|
||||
void OnRendererMessageSync(int process_id,
|
||||
int routing_id,
|
||||
const std::string& channel,
|
||||
const string16& channel,
|
||||
const base::ListValue& args,
|
||||
std::string* result);
|
||||
string16* result);
|
||||
|
||||
// The require('atom').browserMainParts object.
|
||||
v8::Handle<v8::Object> browser_main_parts() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue