Delay the unresponsive event shortly.

It could happen that a window became responsive immediately after the
unresponsive message is sent, like after showing a context menu
synchronously.
This commit is contained in:
Cheng Zhao 2014-03-25 18:10:51 +08:00
parent 679959eeb5
commit 7a83b16cc4
2 changed files with 31 additions and 16 deletions

View file

@ -248,6 +248,12 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
gfx::Image icon_;
private:
// Schedule a notification unresponsive event.
void ScheduleUnresponsiveEvent(int ms);
// Dispatch unresponsive event to observers.
void NotifyWindowUnresponsive();
// Called when CapturePage has done.
void OnCapturePageDone(const CapturePageCallback& callback,
bool succeed,