Make the Linter happy.
This commit is contained in:
parent
3a9a1d35d7
commit
88805ec7e2
7 changed files with 27 additions and 19 deletions
|
@ -250,7 +250,9 @@ void App::OnFinishLaunching() {
|
||||||
Emit("ready");
|
Emit("ready");
|
||||||
}
|
}
|
||||||
|
|
||||||
void App::OnContinueUserActivity(bool* handled, const std::string& type, const std::map<std::string, std::string>& user_info) {
|
void App::OnContinueUserActivity(bool* handled,
|
||||||
|
const std::string& type,
|
||||||
|
const std::map<std::string, std::string>& user_info) {
|
||||||
*handled = Emit("continue-activity", type, user_info);
|
*handled = Emit("continue-activity", type, user_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -465,7 +467,8 @@ void App::BuildPrototype(
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
.SetMethod("hide", base::Bind(&Browser::Hide, browser))
|
.SetMethod("hide", base::Bind(&Browser::Hide, browser))
|
||||||
.SetMethod("show", base::Bind(&Browser::Show, browser))
|
.SetMethod("show", base::Bind(&Browser::Show, browser))
|
||||||
.SetMethod("setUserActivity", base::Bind(&Browser::SetUserActivity, browser))
|
.SetMethod("setUserActivity",
|
||||||
|
base::Bind(&Browser::SetUserActivity, browser))
|
||||||
#endif
|
#endif
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
.SetMethod("setUserTasks",
|
.SetMethod("setUserTasks",
|
||||||
|
|
|
@ -72,7 +72,9 @@ class App : public AtomBrowserClient::Delegate,
|
||||||
void OnWillFinishLaunching() override;
|
void OnWillFinishLaunching() override;
|
||||||
void OnFinishLaunching() override;
|
void OnFinishLaunching() override;
|
||||||
void OnLogin(LoginHandler* login_handler) override;
|
void OnLogin(LoginHandler* login_handler) override;
|
||||||
void OnContinueUserActivity(bool* handled, const std::string& type, const std::map<std::string, std::string>& user_info) override;
|
void OnContinueUserActivity(bool* handled,
|
||||||
|
const std::string& type,
|
||||||
|
const std::map<std::string, std::string>& user_info) override;
|
||||||
|
|
||||||
// content::ContentBrowserClient:
|
// content::ContentBrowserClient:
|
||||||
void AllowCertificateError(
|
void AllowCertificateError(
|
||||||
|
|
|
@ -138,12 +138,14 @@ void Browser::Activate(bool has_visible_windows) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
bool Browser::ContinueUserActivity(const std::string& type, const std::map<std::string, std::string>& user_info) {
|
bool Browser::ContinueUserActivity(const std::string& type,
|
||||||
|
const std::map<std::string,
|
||||||
|
std::string>& user_info) {
|
||||||
bool handled = false;
|
bool handled = false;
|
||||||
FOR_EACH_OBSERVER(BrowserObserver,
|
FOR_EACH_OBSERVER(BrowserObserver,
|
||||||
observers_,
|
observers_,
|
||||||
OnContinueUserActivity(&handled, type, user_info));
|
OnContinueUserActivity(&handled, type, user_info));
|
||||||
|
|
||||||
return handled;
|
return handled;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -94,10 +94,12 @@ class Browser : public WindowListObserver {
|
||||||
void Show();
|
void Show();
|
||||||
|
|
||||||
// Creates an activity and sets it as the one currently in use.
|
// Creates an activity and sets it as the one currently in use.
|
||||||
void SetUserActivity(const std::string& type, const std::map<std::string, std::string>& user_info);
|
void SetUserActivity(const std::string& type,
|
||||||
|
const std::map<std::string, std::string>& user_info);
|
||||||
|
|
||||||
// Resumes an activity via hand-off.
|
// Resumes an activity via hand-off.
|
||||||
bool ContinueUserActivity(const std::string& type, const std::map<std::string, std::string>& user_info);
|
bool ContinueUserActivity(const std::string& type,
|
||||||
|
const std::map<std::string, std::string>& user_info);
|
||||||
|
|
||||||
// Bounce the dock icon.
|
// Bounce the dock icon.
|
||||||
enum BounceType {
|
enum BounceType {
|
||||||
|
|
|
@ -48,8 +48,8 @@ class BrowserObserver {
|
||||||
|
|
||||||
// The browser wants to resume a user activity via handoff. (OS X only)
|
// The browser wants to resume a user activity via handoff. (OS X only)
|
||||||
virtual void OnContinueUserActivity(bool* handled,
|
virtual void OnContinueUserActivity(bool* handled,
|
||||||
const std::string& type,
|
const std::string& type,
|
||||||
const std::map<std::string, std::string>& user_info) {}
|
const std::map<std::string, std::string>& user_info) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~BrowserObserver() {}
|
virtual ~BrowserObserver() {}
|
||||||
|
|
|
@ -6,10 +6,9 @@
|
||||||
|
|
||||||
namespace mate {
|
namespace mate {
|
||||||
|
|
||||||
bool Converter<std::map<std::string, std::string>>::FromV8(v8::Isolate* isolate,
|
bool Converter<std::map<std::string, std::string>>::FromV8(v8::Isolate* isolate,
|
||||||
v8::Local<v8::Value> val,
|
v8::Local<v8::Value> val,
|
||||||
std::map<std::string, std::string>* out) {
|
std::map<std::string, std::string>* out) {
|
||||||
|
|
||||||
if (!val->IsObject())
|
if (!val->IsObject())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -22,9 +21,9 @@ bool Converter<std::map<std::string, std::string>>::FromV8(v8::Isolate* isolate,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
v8::Local<v8::Value> Converter<std::map<std::string, std::string>>::ToV8(v8::Isolate* isolate,
|
v8::Local<v8::Value> Converter<std::map<std::string, std::string>>::ToV8(
|
||||||
|
v8::Isolate* isolate,
|
||||||
const std::map<std::string, std::string>& in) {
|
const std::map<std::string, std::string>& in) {
|
||||||
|
|
||||||
mate::Dictionary dict(isolate, v8::Object::New(isolate));
|
mate::Dictionary dict(isolate, v8::Object::New(isolate));
|
||||||
|
|
||||||
for (auto const &pair : in) {
|
for (auto const &pair : in) {
|
||||||
|
@ -34,4 +33,4 @@ v8::Local<v8::Value> Converter<std::map<std::string, std::string>>::ToV8(v8::Iso
|
||||||
return dict.GetHandle();
|
return dict.GetHandle();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace mate
|
} // namespace mate
|
||||||
|
|
|
@ -20,9 +20,9 @@ struct Converter<std::map<std::string, std::string>> {
|
||||||
std::map<std::string, std::string>* out);
|
std::map<std::string, std::string>* out);
|
||||||
|
|
||||||
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
||||||
const std::map<std::string, std::string>& in);
|
const std::map<std::string, std::string>& in);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace mate
|
} // namespace mate
|
||||||
|
|
||||||
#endif // ATOM_COMMON_NATIVE_MATE_CONVERTERS_STRING_MAP_CONVERTER_H_
|
#endif // ATOM_COMMON_NATIVE_MATE_CONVERTERS_STRING_MAP_CONVERTER_H_
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue