Emit("activate-with-no-open-windows");
}
+void App::OnActivateWithOpenWindows() {
+ Emit("activate-with-open-windows");
+}
+
void App::OnWillFinishLaunching() {
Emit("will-finish-launching");
}
void OnOpenFile(bool* prevent_default, const std::string& file_path) override;
void OnOpenURL(const std::string& url) override;
void OnActivateWithNoOpenWindows() override;
+ void OnActivateWithOpenWindows() override;
void OnWillFinishLaunching() override;
void OnFinishLaunching() override;
void OnSelectCertificate(
FOR_EACH_OBSERVER(BrowserObserver, observers_, OnActivateWithNoOpenWindows());
}
+void Browser::ActivateWithOpenWindows() {
+ FOR_EACH_OBSERVER(BrowserObserver, observers_, OnActivateWithOpenWindows());
+}
+
void Browser::WillFinishLaunching() {
FOR_EACH_OBSERVER(BrowserObserver, observers_, OnWillFinishLaunching());
}
// Tell the application that application is activated with no open windows.
void ActivateWithNoOpenWindows();
+ // Tell the application that application is activated with open windows.
+ void ActivateWithOpenWindows();
+
// Tell the application the loading has been done.
void WillFinishLaunching();
void DidFinishLaunching();
// dock icon).
virtual void OnActivateWithNoOpenWindows() {}
+ // The browser is activated with open windows (usually by clicking on the dock
+ // icon).
+ virtual void OnActivateWithOpenWindows() {}
+
// The browser has finished loading.
virtual void OnWillFinishLaunching() {}
virtual void OnFinishLaunching() {}
hasVisibleWindows:(BOOL)flag {
atom::Browser* browser = atom::Browser::Get();
if (flag) {
+ browser->ActivateWithOpenWindows();
return YES;
} else {
browser->ActivateWithNoOpenWindows();
usually happens when the user has closed all of the application's windows and
then clicks on the application's dock icon.
+### Event: activated-with-open-windows _OS X_
+
+Emitted when the application is activated while there are open windows, which
+usually happens when clicks on the applications's dock icon.
+
### Event: 'browser-window-blur'
Returns: