return v8::Undefined();
}
+// static
+v8::Handle<v8::Value> App::Focus(const v8::Arguments &args) {
+ v8::HandleScope scope;
+
+ Browser::Get()->Focus();
+
+ return v8::Undefined();
+}
+
// static
v8::Handle<v8::Value> App::AppendSwitch(const v8::Arguments &args) {
v8::HandleScope scope;
NODE_SET_PROTOTYPE_METHOD(t, "quit", Quit);
NODE_SET_PROTOTYPE_METHOD(t, "exit", Exit);
NODE_SET_PROTOTYPE_METHOD(t, "terminate", Terminate);
+ NODE_SET_PROTOTYPE_METHOD(t, "focus", Focus);
target->Set(v8::String::NewSymbol("Application"), t->GetFunction());
static v8::Handle<v8::Value> Quit(const v8::Arguments &args);
static v8::Handle<v8::Value> Exit(const v8::Arguments &args);
static v8::Handle<v8::Value> Terminate(const v8::Arguments &args);
+ static v8::Handle<v8::Value> Focus(const v8::Arguments &args);
static v8::Handle<v8::Value> AppendSwitch(const v8::Arguments &args);
static v8::Handle<v8::Value> AppendArgument(const v8::Arguments &args);
// Quit the application immediately without cleanup work.
void Terminate();
+ // Focus the application.
+ void Focus();
+
// Tell the application to open a file.
bool OpenFile(const std::string& file_path);