refactor: rename the atom namespace to electron
This commit is contained in:
parent
8c4496a9c9
commit
34c4c8d508
531 changed files with 1456 additions and 1428 deletions
|
@ -19,7 +19,7 @@
|
|||
#include "shell/common/platform_util.h"
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -173,4 +173,4 @@ void LibnotifyNotification::OnNotificationView(NotifyNotification* notification,
|
|||
NotificationClicked();
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "shell/browser/notifications/notification.h"
|
||||
#include "ui/base/glib/glib_signal.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
class LibnotifyNotification : public Notification {
|
||||
public:
|
||||
|
@ -42,6 +42,6 @@ class LibnotifyNotification : public Notification {
|
|||
DISALLOW_COPY_AND_ASSIGN(LibnotifyNotification);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_LINUX_LIBNOTIFY_NOTIFICATION_H_
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "shell/browser/notifications/linux/libnotify_notification.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
// static
|
||||
NotificationPresenter* NotificationPresenter::Create() {
|
||||
|
@ -25,4 +25,4 @@ Notification* NotificationPresenterLinux::CreateNotificationObject(
|
|||
return new LibnotifyNotification(delegate, this);
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "shell/browser/notifications/notification_presenter.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
class NotificationPresenterLinux : public NotificationPresenter {
|
||||
public:
|
||||
|
@ -22,6 +22,6 @@ class NotificationPresenterLinux : public NotificationPresenter {
|
|||
DISALLOW_COPY_AND_ASSIGN(NotificationPresenterLinux);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_LINUX_NOTIFICATION_PRESENTER_LINUX_H_
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "base/mac/scoped_nsobject.h"
|
||||
#include "shell/browser/notifications/notification.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
class CocoaNotification : public Notification {
|
||||
public:
|
||||
|
@ -44,6 +44,6 @@ class CocoaNotification : public Notification {
|
|||
DISALLOW_COPY_AND_ASSIGN(CocoaNotification);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_MAC_COCOA_NOTIFICATION_H_
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "shell/browser/notifications/notification_presenter.h"
|
||||
#include "skia/ext/skia_utils_mac.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
CocoaNotification::CocoaNotification(NotificationDelegate* delegate,
|
||||
NotificationPresenter* presenter)
|
||||
|
@ -170,4 +170,4 @@ void CocoaNotification::LogAction(const char* action) {
|
|||
}
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -7,16 +7,17 @@
|
|||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
class NotificationPresenterMac;
|
||||
}
|
||||
|
||||
@interface NotificationCenterDelegate
|
||||
: NSObject <NSUserNotificationCenterDelegate> {
|
||||
@private
|
||||
atom::NotificationPresenterMac* presenter_;
|
||||
electron::NotificationPresenterMac* presenter_;
|
||||
}
|
||||
- (instancetype)initWithPresenter:(atom::NotificationPresenterMac*)presenter;
|
||||
- (instancetype)initWithPresenter:
|
||||
(electron::NotificationPresenterMac*)presenter;
|
||||
@end
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_CENTER_DELEGATE_H_
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
|
||||
@implementation NotificationCenterDelegate
|
||||
|
||||
- (instancetype)initWithPresenter:(atom::NotificationPresenterMac*)presenter {
|
||||
- (instancetype)initWithPresenter:
|
||||
(electron::NotificationPresenterMac*)presenter {
|
||||
self = [super init];
|
||||
if (!self)
|
||||
return nil;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "shell/browser/notifications/mac/notification_center_delegate.h"
|
||||
#include "shell/browser/notifications/notification_presenter.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
class CocoaNotification;
|
||||
|
||||
|
@ -31,6 +31,6 @@ class NotificationPresenterMac : public NotificationPresenter {
|
|||
DISALLOW_COPY_AND_ASSIGN(NotificationPresenterMac);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_PRESENTER_MAC_H_
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "shell/browser/notifications/mac/cocoa_notification.h"
|
||||
#include "shell/browser/notifications/mac/notification_center_delegate.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
// static
|
||||
NotificationPresenter* NotificationPresenter::Create() {
|
||||
|
@ -47,4 +47,4 @@ Notification* NotificationPresenterMac::CreateNotificationObject(
|
|||
return new CocoaNotification(delegate, this);
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "shell/browser/notifications/notification_delegate.h"
|
||||
#include "shell/browser/notifications/notification_presenter.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
NotificationOptions::NotificationOptions() = default;
|
||||
NotificationOptions::~NotificationOptions() = default;
|
||||
|
@ -43,4 +43,4 @@ void Notification::Destroy() {
|
|||
presenter()->RemoveNotification(this);
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
class NotificationDelegate;
|
||||
class NotificationPresenter;
|
||||
|
@ -84,6 +84,6 @@ class Notification {
|
|||
DISALLOW_COPY_AND_ASSIGN(Notification);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_H_
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
class NotificationDelegate {
|
||||
public:
|
||||
|
@ -30,6 +30,6 @@ class NotificationDelegate {
|
|||
~NotificationDelegate() = default;
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_DELEGATE_H_
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "shell/browser/notifications/notification.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
NotificationPresenter::NotificationPresenter() {}
|
||||
|
||||
|
@ -41,4 +41,4 @@ void NotificationPresenter::CloseNotificationWithId(
|
|||
(*it)->Dismiss();
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "base/memory/weak_ptr.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
class Notification;
|
||||
class NotificationDelegate;
|
||||
|
@ -43,6 +43,6 @@ class NotificationPresenter {
|
|||
DISALLOW_COPY_AND_ASSIGN(NotificationPresenter);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_PRESENTER_H_
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "third_party/blink/public/common/notifications/platform_notification_data.h"
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -27,7 +27,7 @@ void OnWebNotificationAllowed(base::WeakPtr<Notification> notification,
|
|||
if (!notification)
|
||||
return;
|
||||
if (allowed) {
|
||||
atom::NotificationOptions options;
|
||||
electron::NotificationOptions options;
|
||||
options.title = data.title;
|
||||
options.msg = data.body;
|
||||
options.tag = data.tag;
|
||||
|
@ -41,7 +41,7 @@ void OnWebNotificationAllowed(base::WeakPtr<Notification> notification,
|
|||
}
|
||||
}
|
||||
|
||||
class NotificationDelegateImpl final : public atom::NotificationDelegate {
|
||||
class NotificationDelegateImpl final : public electron::NotificationDelegate {
|
||||
public:
|
||||
explicit NotificationDelegateImpl(const std::string& notification_id)
|
||||
: notification_id_(notification_id) {}
|
||||
|
@ -133,4 +133,4 @@ base::Time PlatformNotificationService::ReadNextTriggerTimestamp() {
|
|||
return base::Time::Max();
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "content/public/browser/platform_notification_service.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
class AtomBrowserClient;
|
||||
|
||||
|
@ -50,6 +50,6 @@ class PlatformNotificationService
|
|||
DISALLOW_COPY_AND_ASSIGN(PlatformNotificationService);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_H_
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#pragma comment(lib, "runtimeobject.lib")
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -97,4 +97,4 @@ Notification* NotificationPresenterWin::CreateNotificationObject(
|
|||
return new WindowsToastNotification(delegate, this);
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
class GURL;
|
||||
class SkBitmap;
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
class NotificationPresenterWin : public NotificationPresenter {
|
||||
public:
|
||||
|
@ -50,6 +50,6 @@ class NotificationPresenterWin : public NotificationPresenter {
|
|||
DISALLOW_COPY_AND_ASSIGN(NotificationPresenterWin);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_PRESENTER_WIN_H_
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
#include "shell/browser/notifications/win/win32_notification.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
atom::Notification* NotificationPresenterWin7::CreateNotificationObject(
|
||||
electron::Notification* NotificationPresenterWin7::CreateNotificationObject(
|
||||
NotificationDelegate* delegate) {
|
||||
return new Win32Notification(delegate, this);
|
||||
}
|
||||
|
@ -51,4 +51,4 @@ void NotificationPresenterWin7::OnNotificationDismissed(
|
|||
n->NotificationDismissed();
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "shell/browser/notifications/notification_presenter.h"
|
||||
#include "shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
class Win32Notification;
|
||||
|
||||
|
@ -25,7 +25,7 @@ class NotificationPresenterWin7 : public NotificationPresenter,
|
|||
Win32Notification* GetNotificationObjectByTag(const std::string& tag);
|
||||
|
||||
private:
|
||||
atom::Notification* CreateNotificationObject(
|
||||
electron::Notification* CreateNotificationObject(
|
||||
NotificationDelegate* delegate) override;
|
||||
|
||||
void OnNotificationClicked(const Notification& notification) override;
|
||||
|
@ -34,6 +34,6 @@ class NotificationPresenterWin7 : public NotificationPresenter,
|
|||
DISALLOW_COPY_AND_ASSIGN(NotificationPresenterWin7);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_PRESENTER_WIN7_H_
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <Windows.h>
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
struct NotificationData {
|
||||
DesktopNotificationController* controller = nullptr;
|
||||
|
@ -63,6 +63,6 @@ struct ScreenMetrics {
|
|||
}
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_COMMON_H_
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
using std::make_shared;
|
||||
using std::shared_ptr;
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
HBITMAP CopyBitmap(HBITMAP bitmap) {
|
||||
HBITMAP ret = NULL;
|
||||
|
@ -436,4 +436,4 @@ DesktopNotificationController::NotificationLink::~NotificationLink() {
|
|||
p->controller = nullptr;
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
struct NotificationData;
|
||||
|
||||
|
@ -109,6 +109,6 @@ class DesktopNotificationController::Notification {
|
|||
friend class DesktopNotificationController;
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_DESKTOP_NOTIFICATION_CONTROLLER_H_
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
using std::min;
|
||||
using std::shared_ptr;
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
static COLORREF GetAccentColor() {
|
||||
bool success = false;
|
||||
|
@ -862,4 +862,4 @@ float DesktopNotificationController::Toast::AnimateStackCollapse() {
|
|||
return pos;
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include "base/logging.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
class DesktopNotificationController::Toast {
|
||||
public:
|
||||
|
@ -102,6 +102,6 @@ class DesktopNotificationController::Toast {
|
|||
float ease_in_pos_ = 0, ease_out_pos_ = 0, stack_collapse_pos_ = 0;
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_TOAST_H_
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#pragma comment(lib, "uiautomationcore.lib")
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
DesktopNotificationController::Toast::UIAutomationInterface::
|
||||
UIAutomationInterface(Toast* toast)
|
||||
|
@ -251,4 +251,4 @@ HRESULT DesktopNotificationController::Toast::UIAutomationInterface::
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include <UIAutomationCore.h>
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
class DesktopNotificationController::Toast::UIAutomationInterface
|
||||
: public IRawElementProviderSimple,
|
||||
|
@ -79,6 +79,6 @@ class DesktopNotificationController::Toast::UIAutomationInterface
|
|||
std::wstring text_;
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_TOAST_UIA_H_
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
void Win32Notification::Show(const NotificationOptions& options) {
|
||||
auto* presenter = static_cast<NotificationPresenterWin7*>(this->presenter());
|
||||
|
@ -68,4 +68,4 @@ void Win32Notification::Dismiss() {
|
|||
notification_ref_.Close();
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
#include "shell/browser/notifications/notification.h"
|
||||
#include "shell/browser/notifications/win/notification_presenter_win7.h"
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
class Win32Notification : public atom::Notification {
|
||||
class Win32Notification : public electron::Notification {
|
||||
public:
|
||||
Win32Notification(NotificationDelegate* delegate,
|
||||
NotificationPresenterWin7* presenter)
|
||||
|
@ -33,6 +33,6 @@ class Win32Notification : public atom::Notification {
|
|||
DISALLOW_COPY_AND_ASSIGN(Win32Notification);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_NOTIFICATION_H_
|
||||
|
|
|
@ -29,7 +29,7 @@ using ABI::Windows::Data::Xml::Dom::IXmlNode;
|
|||
using ABI::Windows::Data::Xml::Dom::IXmlNodeList;
|
||||
using ABI::Windows::Data::Xml::Dom::IXmlText;
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -446,4 +446,4 @@ IFACEMETHODIMP ToastEventHandler::Invoke(
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
|
|
@ -23,7 +23,7 @@ using Microsoft::WRL::Make;
|
|||
using Microsoft::WRL::RuntimeClass;
|
||||
using Microsoft::WRL::RuntimeClassFlags;
|
||||
|
||||
namespace atom {
|
||||
namespace electron {
|
||||
|
||||
class ScopedHString;
|
||||
|
||||
|
@ -126,6 +126,6 @@ class ToastEventHandler : public RuntimeClass<RuntimeClassFlags<ClassicCom>,
|
|||
DISALLOW_COPY_AND_ASSIGN(ToastEventHandler);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WINDOWS_TOAST_NOTIFICATION_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue