|
@@ -93,14 +93,20 @@ gin::Handle<Tray> Tray::New(gin_helper::ErrorThrower thrower,
|
|
|
void Tray::OnClicked(const gfx::Rect& bounds,
|
|
|
const gfx::Point& location,
|
|
|
int modifiers) {
|
|
|
+ v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
|
|
+ v8::HandleScope scope(isolate);
|
|
|
EmitCustomEvent("click", CreateEventFromFlags(modifiers), bounds, location);
|
|
|
}
|
|
|
|
|
|
void Tray::OnDoubleClicked(const gfx::Rect& bounds, int modifiers) {
|
|
|
+ v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
|
|
+ v8::HandleScope scope(isolate);
|
|
|
EmitCustomEvent("double-click", CreateEventFromFlags(modifiers), bounds);
|
|
|
}
|
|
|
|
|
|
void Tray::OnRightClicked(const gfx::Rect& bounds, int modifiers) {
|
|
|
+ v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
|
|
+ v8::HandleScope scope(isolate);
|
|
|
EmitCustomEvent("right-click", CreateEventFromFlags(modifiers), bounds);
|
|
|
}
|
|
|
|
|
@@ -129,22 +135,32 @@ void Tray::OnDropText(const std::string& text) {
|
|
|
}
|
|
|
|
|
|
void Tray::OnMouseEntered(const gfx::Point& location, int modifiers) {
|
|
|
+ v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
|
|
+ v8::HandleScope scope(isolate);
|
|
|
EmitCustomEvent("mouse-enter", CreateEventFromFlags(modifiers), location);
|
|
|
}
|
|
|
|
|
|
void Tray::OnMouseExited(const gfx::Point& location, int modifiers) {
|
|
|
+ v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
|
|
+ v8::HandleScope scope(isolate);
|
|
|
EmitCustomEvent("mouse-leave", CreateEventFromFlags(modifiers), location);
|
|
|
}
|
|
|
|
|
|
void Tray::OnMouseMoved(const gfx::Point& location, int modifiers) {
|
|
|
+ v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
|
|
+ v8::HandleScope scope(isolate);
|
|
|
EmitCustomEvent("mouse-move", CreateEventFromFlags(modifiers), location);
|
|
|
}
|
|
|
|
|
|
void Tray::OnMouseUp(const gfx::Point& location, int modifiers) {
|
|
|
+ v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
|
|
+ v8::HandleScope scope(isolate);
|
|
|
EmitCustomEvent("mouse-up", CreateEventFromFlags(modifiers), location);
|
|
|
}
|
|
|
|
|
|
void Tray::OnMouseDown(const gfx::Point& location, int modifiers) {
|
|
|
+ v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
|
|
+ v8::HandleScope scope(isolate);
|
|
|
EmitCustomEvent("mouse-down", CreateEventFromFlags(modifiers), location);
|
|
|
}
|
|
|
|