Don't separate node bindings into renderer and browser part.
Since we are going to use embeding thread to implement message integration on all platforms, we do not need to separate renderer and browser anymore.
This commit is contained in:
parent
bc62d8c2c5
commit
008b8d404d
11 changed files with 64 additions and 123 deletions
|
@ -20,8 +20,7 @@ namespace atom {
|
|||
|
||||
class NodeBindings {
|
||||
public:
|
||||
static NodeBindings* CreateInBrowser();
|
||||
static NodeBindings* CreateInRenderer();
|
||||
static NodeBindings* Create(bool is_browser);
|
||||
|
||||
virtual ~NodeBindings();
|
||||
|
||||
|
|
|
@ -45,13 +45,8 @@ void NodeBindingsMac::PollEvents() {
|
|||
}
|
||||
|
||||
// static
|
||||
NodeBindings* NodeBindings::CreateInBrowser() {
|
||||
return new NodeBindingsMac(true);
|
||||
}
|
||||
|
||||
// static
|
||||
NodeBindings* NodeBindings::CreateInRenderer() {
|
||||
return new NodeBindingsMac(false);
|
||||
NodeBindings* NodeBindings::Create(bool is_browser) {
|
||||
return new NodeBindingsMac(is_browser);
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
|
27
common/node_bindings_win.cc
Normal file
27
common/node_bindings_win.cc
Normal file
|
@ -0,0 +1,27 @@
|
|||
// 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.
|
||||
|
||||
#include "common/node_bindings_win.h"
|
||||
|
||||
#include "vendor/node/src/node.h"
|
||||
#include "vendor/node/src/node_internals.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
NodeBindingsWin::NodeBindingsWin(bool is_browser)
|
||||
: NodeBindings(is_browser) {
|
||||
}
|
||||
|
||||
NodeBindingsWin::~NodeBindingsWin() {
|
||||
}
|
||||
|
||||
void NodeBindingsWin::PollEvents() {
|
||||
}
|
||||
|
||||
// static
|
||||
NodeBindings* NodeBindings::Create(bool is_browser) {
|
||||
return new NodeBindingsWin(is_browser);
|
||||
}
|
||||
|
||||
} // namespace atom
|
26
common/node_bindings_win.h
Normal file
26
common/node_bindings_win.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
// 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.
|
||||
|
||||
#ifndef ATOM_COMMON_NODE_BINDINGS_WIN_
|
||||
#define ATOM_COMMON_NODE_BINDINGS_WIN_
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "common/node_bindings.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
class NodeBindingsWin : public NodeBindings {
|
||||
public:
|
||||
explicit NodeBindingsWin(bool is_browser);
|
||||
virtual ~NodeBindingsWin();
|
||||
|
||||
private:
|
||||
virtual void PollEvents() OVERRIDE;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(NodeBindingsWin);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
|
||||
#endif // ATOM_COMMON_NODE_BINDINGS_WIN_
|
Loading…
Add table
Add a link
Reference in a new issue