Make the Linter happy.

This commit is contained in:
Charlie Hess 2016-04-29 22:05:36 -07:00
parent 3a9a1d35d7
commit 88805ec7e2
7 changed files with 27 additions and 19 deletions

View file

@ -250,7 +250,9 @@ void App::OnFinishLaunching() {
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);
}
@ -465,7 +467,8 @@ void App::BuildPrototype(
#if defined(OS_MACOSX)
.SetMethod("hide", base::Bind(&Browser::Hide, browser))
.SetMethod("show", base::Bind(&Browser::Show, browser))
.SetMethod("setUserActivity", base::Bind(&Browser::SetUserActivity, browser))
.SetMethod("setUserActivity",
base::Bind(&Browser::SetUserActivity, browser))
#endif
#if defined(OS_WIN)
.SetMethod("setUserTasks",

View file

@ -72,7 +72,9 @@ class App : public AtomBrowserClient::Delegate,
void OnWillFinishLaunching() override;
void OnFinishLaunching() 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:
void AllowCertificateError(

View file

@ -138,12 +138,14 @@ void Browser::Activate(bool has_visible_windows) {
}
#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;
FOR_EACH_OBSERVER(BrowserObserver,
observers_,
FOR_EACH_OBSERVER(BrowserObserver,
observers_,
OnContinueUserActivity(&handled, type, user_info));
return handled;
}
#endif

View file

@ -94,10 +94,12 @@ class Browser : public WindowListObserver {
void Show();
// 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.
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.
enum BounceType {

View file

@ -48,8 +48,8 @@ class BrowserObserver {
// The browser wants to resume a user activity via handoff. (OS X only)
virtual void OnContinueUserActivity(bool* handled,
const std::string& type,
const std::map<std::string, std::string>& user_info) {}
const std::string& type,
const std::map<std::string, std::string>& user_info) {}
protected:
virtual ~BrowserObserver() {}

View file

@ -6,10 +6,9 @@
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,
std::map<std::string, std::string>* out) {
if (!val->IsObject())
return false;
@ -22,9 +21,9 @@ bool Converter<std::map<std::string, std::string>>::FromV8(v8::Isolate* isolate,
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) {
mate::Dictionary dict(isolate, v8::Object::New(isolate));
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();
}
} // namespace mate
} // namespace mate

View file

@ -20,9 +20,9 @@ struct Converter<std::map<std::string, std::string>> {
std::map<std::string, std::string>* out);
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
#endif // ATOM_COMMON_NATIVE_MATE_CONVERTERS_STRING_MAP_CONVERTER_H_
#endif // ATOM_COMMON_NATIVE_MATE_CONVERTERS_STRING_MAP_CONVERTER_H_