mirror of
https://github.com/electron/electron.git
synced 2026-01-25 07:18:18 -05:00
This is preventDefault by convention.
This commit is contained in:
@@ -250,10 +250,10 @@ void App::OnFinishLaunching() {
|
||||
Emit("ready");
|
||||
}
|
||||
|
||||
void App::OnContinueUserActivity(bool* handled,
|
||||
void App::OnContinueUserActivity(bool* prevent_default,
|
||||
const std::string& type,
|
||||
const std::map<std::string, std::string>& user_info) {
|
||||
*handled = Emit("continue-activity", type, user_info);
|
||||
*prevent_default = Emit("continue-activity", type, user_info);
|
||||
}
|
||||
|
||||
void App::OnLogin(LoginHandler* login_handler) {
|
||||
|
||||
@@ -72,7 +72,7 @@ class App : public AtomBrowserClient::Delegate,
|
||||
void OnWillFinishLaunching() override;
|
||||
void OnFinishLaunching() override;
|
||||
void OnLogin(LoginHandler* login_handler) override;
|
||||
void OnContinueUserActivity(bool* handled,
|
||||
void OnContinueUserActivity(bool* prevent_default,
|
||||
const std::string& type,
|
||||
const std::map<std::string, std::string>& user_info) override;
|
||||
|
||||
|
||||
@@ -141,12 +141,12 @@ void Browser::Activate(bool has_visible_windows) {
|
||||
bool Browser::ContinueUserActivity(const std::string& type,
|
||||
const std::map<std::string,
|
||||
std::string>& user_info) {
|
||||
bool handled = false;
|
||||
bool prevent_default = false;
|
||||
FOR_EACH_OBSERVER(BrowserObserver,
|
||||
observers_,
|
||||
OnContinueUserActivity(&handled, type, user_info));
|
||||
OnContinueUserActivity(&prevent_default, type, user_info));
|
||||
|
||||
return handled;
|
||||
return prevent_default;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class BrowserObserver {
|
||||
virtual void OnLogin(LoginHandler* login_handler) {}
|
||||
|
||||
// The browser wants to resume a user activity via handoff. (OS X only)
|
||||
virtual void OnContinueUserActivity(bool* handled,
|
||||
virtual void OnContinueUserActivity(bool* prevent_default,
|
||||
const std::string& type,
|
||||
const std::map<std::string, std::string>& user_info) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user