Skip to content

Commit

Permalink
chore: use nested namespaces (#37916)
Browse files Browse the repository at this point in the history
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
  • Loading branch information
trop[bot] and dsanders11 committed Apr 11, 2023
1 parent 675c2eb commit 5161e96
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 36 deletions.
8 changes: 2 additions & 6 deletions shell/browser/api/electron_api_push_notifications.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/node_includes.h"

namespace electron {

namespace api {
namespace electron::api {

PushNotifications* g_push_notifications = nullptr;

Expand Down Expand Up @@ -55,9 +53,7 @@ const char* PushNotifications::GetTypeName() {
return "PushNotifications";
}

} // namespace api

} // namespace electron
} // namespace electron::api

namespace {

Expand Down
8 changes: 2 additions & 6 deletions shell/browser/api/electron_api_push_notifications.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
#include "shell/browser/event_emitter_mixin.h"
#include "shell/common/gin_helper/promise.h"

namespace electron {

namespace api {
namespace electron::api {

class PushNotifications
: public ElectronBrowserClient::Delegate,
Expand Down Expand Up @@ -57,8 +55,6 @@ class PushNotifications
#endif
};

} // namespace api

} // namespace electron
} // namespace electron::api

#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_PUSH_NOTIFICATIONS_H_
8 changes: 2 additions & 6 deletions shell/browser/api/electron_api_push_notifications_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
#include "shell/common/gin_converters/value_converter.h"
#include "shell/common/gin_helper/promise.h"

namespace electron {

namespace api {
namespace electron::api {

v8::Local<v8::Promise> PushNotifications::RegisterForAPNSNotifications(
v8::Isolate* isolate) {
Expand Down Expand Up @@ -57,6 +55,4 @@
Emit("received-apns-notification", user_info);
}

} // namespace api

} // namespace electron
} // namespace electron::api
8 changes: 2 additions & 6 deletions shell/browser/api/electron_api_utility_process.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ namespace base {
class Process;
} // namespace base

namespace electron {

namespace api {
namespace electron::api {

class UtilityProcessWrapper
: public gin::Wrappable<UtilityProcessWrapper>,
Expand Down Expand Up @@ -93,8 +91,6 @@ class UtilityProcessWrapper
base::WeakPtrFactory<UtilityProcessWrapper> weak_factory_{this};
};

} // namespace api

} // namespace electron
} // namespace electron::api

#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_UTILITY_PROCESS_H_
8 changes: 2 additions & 6 deletions shell/browser/ui/gtk/menu_gtk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
#include "shell/browser/ui/gtk/menu_util.h"
#include "ui/base/models/menu_model.h"

namespace electron {

namespace gtkui {
namespace electron::gtkui {

MenuGtk::MenuGtk(ui::MenuModel* model)
: menu_model_(model), gtk_menu_(TakeGObject(gtk_menu_new())) {
Expand Down Expand Up @@ -65,6 +63,4 @@ void MenuGtk::OnMenuItemActivated(GtkWidget* menu_item) {
ExecuteCommand(model, id);
}

} // namespace gtkui

} // namespace electron
} // namespace electron::gtkui
8 changes: 2 additions & 6 deletions shell/browser/ui/gtk/menu_gtk.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ namespace ui {
class MenuModel;
}

namespace electron {

namespace gtkui {
namespace electron::gtkui {

class MenuGtk {
public:
Expand All @@ -41,8 +39,6 @@ class MenuGtk {
bool block_activation_ = false;
};

} // namespace gtkui

} // namespace electron
} // namespace electron::gtkui

#endif // ELECTRON_SHELL_BROWSER_UI_GTK_MENU_GTK_H_

0 comments on commit 5161e96

Please sign in to comment.