refactor: rename the atom namespace to electron

This commit is contained in:
Samuel Attard 2019-06-19 14:23:04 -07:00 committed by Samuel Attard
parent 8c4496a9c9
commit 34c4c8d508
531 changed files with 1456 additions and 1428 deletions

View file

@ -32,7 +32,7 @@ bool StringToAccelerator(const std::string& shortcut,
ui::KeyboardCode key = ui::VKEY_UNKNOWN;
for (const auto& token : tokens) {
bool shifted = false;
ui::KeyboardCode code = atom::KeyboardCodeFromStr(token, &shifted);
ui::KeyboardCode code = electron::KeyboardCodeFromStr(token, &shifted);
if (shifted)
modifiers |= ui::EF_SHIFT_DOWN;
switch (code) {
@ -68,11 +68,11 @@ bool StringToAccelerator(const std::string& shortcut,
}
void GenerateAcceleratorTable(AcceleratorTable* table,
atom::AtomMenuModel* model) {
electron::AtomMenuModel* model) {
int count = model->GetItemCount();
for (int i = 0; i < count; ++i) {
atom::AtomMenuModel::ItemType type = model->GetTypeAt(i);
if (type == atom::AtomMenuModel::TYPE_SUBMENU) {
electron::AtomMenuModel::ItemType type = model->GetTypeAt(i);
if (type == electron::AtomMenuModel::TYPE_SUBMENU) {
auto* submodel = model->GetSubmenuModelAt(i);
GenerateAcceleratorTable(table, submodel);
} else {

View file

@ -15,7 +15,7 @@ namespace accelerator_util {
typedef struct {
int position;
atom::AtomMenuModel* model;
electron::AtomMenuModel* model;
} MenuItem;
typedef std::map<ui::Accelerator, MenuItem> AcceleratorTable;
@ -25,7 +25,7 @@ bool StringToAccelerator(const std::string& description,
// Generate a table that contains memu model's accelerators and command ids.
void GenerateAcceleratorTable(AcceleratorTable* table,
atom::AtomMenuModel* model);
electron::AtomMenuModel* model);
// Trigger command from the accelerators table.
bool TriggerAcceleratorTableCommand(AcceleratorTable* table,

View file

@ -6,7 +6,7 @@
#include "base/stl_util.h"
namespace atom {
namespace electron {
bool AtomMenuModel::Delegate::GetAcceleratorForCommandId(
int command_id,
@ -77,4 +77,4 @@ AtomMenuModel* AtomMenuModel::GetSubmenuModelAt(int index) {
ui::SimpleMenuModel::GetSubmenuModelAt(index));
}
} // namespace atom
} // namespace electron

View file

@ -11,7 +11,7 @@
#include "base/observer_list_types.h"
#include "ui/base/models/simple_menu_model.h"
namespace atom {
namespace electron {
class AtomMenuModel : public ui::SimpleMenuModel {
public:
@ -77,6 +77,6 @@ class AtomMenuModel : public ui::SimpleMenuModel {
DISALLOW_COPY_AND_ASSIGN(AtomMenuModel);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_ATOM_MENU_MODEL_H_

View file

@ -26,7 +26,7 @@
#include "shell/browser/osr/osr_view_proxy.h"
#endif
namespace atom {
namespace electron {
class PopupViewCommon : public autofill::PopupViewCommon {
public:
@ -216,4 +216,4 @@ int AutofillPopup::LineFromY(int y) const {
return values_.size() - 1;
}
} // namespace atom
} // namespace electron

View file

@ -14,7 +14,7 @@
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
namespace atom {
namespace electron {
class AutofillPopupView;
@ -86,6 +86,6 @@ class AutofillPopup : public views::ViewObserver {
DISALLOW_COPY_AND_ASSIGN(AutofillPopup);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_AUTOFILL_POPUP_H_

View file

@ -11,14 +11,14 @@
#include "net/cert/x509_certificate.h"
#include "shell/common/promise_util.h"
namespace atom {
namespace electron {
class NativeWindow;
} // namespace atom
} // namespace electron
namespace certificate_trust {
v8::Local<v8::Promise> ShowCertificateTrust(
atom::NativeWindow* parent_window,
electron::NativeWindow* parent_window,
const scoped_refptr<net::X509Certificate>& cert,
const std::string& message);

View file

@ -19,7 +19,7 @@
@interface TrustDelegate : NSObject {
@private
std::unique_ptr<atom::util::Promise> promise_;
std::unique_ptr<electron::util::Promise> promise_;
SFCertificateTrustPanel* panel_;
scoped_refptr<net::X509Certificate> cert_;
SecTrustRef trust_;
@ -27,7 +27,7 @@
SecPolicyRef sec_policy_;
}
- (id)initWithPromise:(atom::util::Promise)promise
- (id)initWithPromise:(electron::util::Promise)promise
panel:(SFCertificateTrustPanel*)panel
cert:(const scoped_refptr<net::X509Certificate>&)cert
trust:(SecTrustRef)trust
@ -51,14 +51,14 @@
[super dealloc];
}
- (id)initWithPromise:(atom::util::Promise)promise
- (id)initWithPromise:(electron::util::Promise)promise
panel:(SFCertificateTrustPanel*)panel
cert:(const scoped_refptr<net::X509Certificate>&)cert
trust:(SecTrustRef)trust
certChain:(CFArrayRef)certChain
secPolicy:(SecPolicyRef)secPolicy {
if ((self = [super init])) {
promise_.reset(new atom::util::Promise(std::move(promise)));
promise_.reset(new electron::util::Promise(std::move(promise)));
panel_ = panel;
cert_ = cert;
trust_ = trust;
@ -86,11 +86,11 @@
namespace certificate_trust {
v8::Local<v8::Promise> ShowCertificateTrust(
atom::NativeWindow* parent_window,
electron::NativeWindow* parent_window,
const scoped_refptr<net::X509Certificate>& cert,
const std::string& message) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
atom::util::Promise promise(isolate);
electron::util::Promise promise(isolate);
v8::Local<v8::Promise> handle = promise.GetHandle();
auto* sec_policy = SecPolicyCreateBasicX509();

View file

@ -57,11 +57,11 @@ CERT_CHAIN_PARA GetCertificateChainParameters() {
}
v8::Local<v8::Promise> ShowCertificateTrust(
atom::NativeWindow* parent_window,
electron::NativeWindow* parent_window,
const scoped_refptr<net::X509Certificate>& cert,
const std::string& message) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
atom::util::Promise promise(isolate);
electron::util::Promise promise(isolate);
v8::Local<v8::Promise> handle = promise.GetHandle();
PCCERT_CHAIN_CONTEXT chain_context;

View file

@ -9,7 +9,7 @@
#include "native_mate/persistent_dictionary.h"
namespace atom {
namespace electron {
namespace ui {
@ -38,6 +38,6 @@ class AtomBundleMover {
} // namespace ui
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_COCOA_ATOM_BUNDLE_MOVER_H_

View file

@ -15,7 +15,7 @@
#import "shell/browser/browser.h"
namespace atom {
namespace electron {
namespace ui {
@ -80,7 +80,7 @@ bool AtomBundleMover::Move(mate::Arguments* args) {
arguments:[NSArray
arrayWithObject:destinationPath]]
waitUntilExit];
atom::Browser::Get()->Quit();
electron::Browser::Get()->Quit();
return true;
} else {
if (!Trash([applicationsDirectory
@ -121,7 +121,7 @@ bool AtomBundleMover::Move(mate::Arguments* args) {
nil]];
}
atom::Browser::Get()->Quit();
electron::Browser::Get()->Quit();
return true;
}
@ -422,4 +422,4 @@ bool AtomBundleMover::DeleteOrTrash(NSString* path) {
} // namespace ui
} // namespace atom
} // namespace electron

View file

@ -11,15 +11,15 @@
#include "chrome/browser/devtools/devtools_contents_resizing_strategy.h"
#include "ui/base/cocoa/base_view.h"
namespace atom {
namespace electron {
class InspectableWebContentsViewMac;
}
using atom::InspectableWebContentsViewMac;
using electron::InspectableWebContentsViewMac;
@interface AtomInspectableWebContentsView : BaseView <NSWindowDelegate> {
@private
atom::InspectableWebContentsViewMac* inspectableWebContentsView_;
electron::InspectableWebContentsViewMac* inspectableWebContentsView_;
base::scoped_nsobject<NSView> fake_view_;
base::scoped_nsobject<NSWindow> devtools_window_;

View file

@ -12,7 +12,7 @@
#include "base/mac/scoped_nsobject.h"
#include "base/strings/string16.h"
namespace atom {
namespace electron {
class AtomMenuModel;
}
@ -24,23 +24,24 @@ class AtomMenuModel;
// as it only maintains weak references.
@interface AtomMenuController : NSObject <NSMenuDelegate> {
@protected
atom::AtomMenuModel* model_; // weak
electron::AtomMenuModel* model_; // weak
base::scoped_nsobject<NSMenu> menu_;
BOOL isMenuOpen_;
BOOL useDefaultAccelerator_;
base::Callback<void()> closeCallback;
}
@property(nonatomic, assign) atom::AtomMenuModel* model;
@property(nonatomic, assign) electron::AtomMenuModel* model;
// Builds a NSMenu from the pre-built model (must not be nil). Changes made
// to the contents of the model after calling this will not be noticed.
- (id)initWithModel:(atom::AtomMenuModel*)model useDefaultAccelerator:(BOOL)use;
- (id)initWithModel:(electron::AtomMenuModel*)model
useDefaultAccelerator:(BOOL)use;
- (void)setCloseCallback:(const base::Callback<void()>&)callback;
// Populate current NSMenu with |model|.
- (void)populateWithModel:(atom::AtomMenuModel*)model;
- (void)populateWithModel:(electron::AtomMenuModel*)model;
// Programmatically close the constructed menu.
- (void)cancel;

View file

@ -62,7 +62,7 @@ Role kRolesMap[] = {
// Called when adding a submenu to the menu and checks if the submenu, via its
// |model|, has visible child items.
bool MenuHasVisibleItems(const atom::AtomMenuModel* model) {
bool MenuHasVisibleItems(const electron::AtomMenuModel* model) {
int count = model->GetItemCount();
for (int index = 0; index < count; index++) {
if (model->IsVisibleAt(index))
@ -95,7 +95,7 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
@synthesize model = model_;
- (id)initWithModel:(atom::AtomMenuModel*)model
- (id)initWithModel:(electron::AtomMenuModel*)model
useDefaultAccelerator:(BOOL)use {
if ((self = [super init])) {
model_ = model;
@ -122,7 +122,7 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
closeCallback = callback;
}
- (void)populateWithModel:(atom::AtomMenuModel*)model {
- (void)populateWithModel:(electron::AtomMenuModel*)model {
if (!menu_)
return;
@ -138,7 +138,7 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
const int count = model->GetItemCount();
for (int index = 0; index < count; index++) {
if (model->GetTypeAt(index) == atom::AtomMenuModel::TYPE_SEPARATOR)
if (model->GetTypeAt(index) == electron::AtomMenuModel::TYPE_SEPARATOR)
[self addSeparatorToMenu:menu_ atIndex:index];
else
[self addItemToMenu:menu_ atIndex:index fromModel:model];
@ -158,12 +158,12 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
// Creates a NSMenu from the given model. If the model has submenus, this can
// be invoked recursively.
- (NSMenu*)menuFromModel:(atom::AtomMenuModel*)model {
- (NSMenu*)menuFromModel:(electron::AtomMenuModel*)model {
NSMenu* menu = [[[NSMenu alloc] initWithTitle:@""] autorelease];
const int count = model->GetItemCount();
for (int index = 0; index < count; index++) {
if (model->GetTypeAt(index) == atom::AtomMenuModel::TYPE_SEPARATOR)
if (model->GetTypeAt(index) == electron::AtomMenuModel::TYPE_SEPARATOR)
[self addSeparatorToMenu:menu atIndex:index];
else
[self addItemToMenu:menu atIndex:index fromModel:model];
@ -219,7 +219,7 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
// associated with the entry in the model identified by |modelIndex|.
- (void)addItemToMenu:(NSMenu*)menu
atIndex:(NSInteger)index
fromModel:(atom::AtomMenuModel*)model {
fromModel:(electron::AtomMenuModel*)model {
base::string16 label16 = model->GetLabelAt(index);
NSString* label = l10n_util::FixUpWindowsStyleLabel(label16);
@ -234,7 +234,7 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
[item setImage:icon.ToNSImage()];
base::string16 role = model->GetRoleAt(index);
atom::AtomMenuModel::ItemType type = model->GetTypeAt(index);
electron::AtomMenuModel::ItemType type = model->GetTypeAt(index);
if (role == base::ASCIIToUTF16("services")) {
base::string16 title = base::ASCIIToUTF16("Services");
@ -245,7 +245,7 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
NSMenu* submenu = [[NSMenu alloc] initWithTitle:label];
[item setSubmenu:submenu];
[NSApp setServicesMenu:submenu];
} else if (type == atom::AtomMenuModel::TYPE_SUBMENU &&
} else if (type == electron::AtomMenuModel::TYPE_SUBMENU &&
model->IsVisibleAt(index)) {
// We need to specifically check that the submenu top-level item has been
// enabled as it's not validated by validateUserInterfaceItem
@ -255,8 +255,8 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
// Recursively build a submenu from the sub-model at this index.
[item setTarget:nil];
[item setAction:nil];
atom::AtomMenuModel* submenuModel =
static_cast<atom::AtomMenuModel*>(model->GetSubmenuModelAt(index));
electron::AtomMenuModel* submenuModel =
static_cast<electron::AtomMenuModel*>(model->GetSubmenuModelAt(index));
NSMenu* submenu = MenuHasVisibleItems(submenuModel)
? [self menuFromModel:submenuModel]
: MakeEmptySubmenu();
@ -320,7 +320,7 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
return NO;
NSInteger modelIndex = [item tag];
atom::AtomMenuModel* model = static_cast<atom::AtomMenuModel*>(
electron::AtomMenuModel* model = static_cast<electron::AtomMenuModel*>(
[[(id)item representedObject] pointerValue]);
DCHECK(model);
if (model) {
@ -339,7 +339,7 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
// item chosen.
- (void)itemSelected:(id)sender {
NSInteger modelIndex = [sender tag];
atom::AtomMenuModel* model = static_cast<atom::AtomMenuModel*>(
electron::AtomMenuModel* model = static_cast<electron::AtomMenuModel*>(
[[sender representedObject] pointerValue]);
DCHECK(model);
if (model) {

View file

@ -7,7 +7,7 @@
#include "ui/views/widget/native_widget_mac.h"
namespace atom {
namespace electron {
class NativeWindowMac;
@ -30,6 +30,6 @@ class AtomNativeWidgetMac : public views::NativeWidgetMac {
DISALLOW_COPY_AND_ASSIGN(AtomNativeWidgetMac);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_COCOA_ATOM_NATIVE_WIDGET_MAC_H_

View file

@ -6,7 +6,7 @@
#include "shell/browser/ui/cocoa/atom_ns_window.h"
namespace atom {
namespace electron {
AtomNativeWidgetMac::AtomNativeWidgetMac(
NativeWindowMac* shell,
@ -24,4 +24,4 @@ NativeWidgetMacNSWindow* AtomNativeWidgetMac::CreateNSWindow(
styleMask:style_mask_] autorelease];
}
} // namespace atom
} // namespace electron

View file

@ -9,7 +9,7 @@
#include "shell/browser/ui/cocoa/event_dispatching_window.h"
#include "ui/views/widget/native_widget_mac.h"
namespace atom {
namespace electron {
class NativeWindowMac;
@ -25,20 +25,20 @@ class ScopedDisableResize {
static bool disable_resize_;
};
} // namespace atom
} // namespace electron
@interface AtomNSWindow : NativeWidgetMacNSWindow {
@private
atom::NativeWindowMac* shell_;
electron::NativeWindowMac* shell_;
}
@property BOOL acceptsFirstMouse;
@property BOOL enableLargerThanScreen;
@property BOOL disableAutoHideCursor;
@property BOOL disableKeyOrMainWindow;
@property(nonatomic, retain) NSView* vibrantView;
- (id)initWithShell:(atom::NativeWindowMac*)shell
- (id)initWithShell:(electron::NativeWindowMac*)shell
styleMask:(NSUInteger)styleMask;
- (atom::NativeWindowMac*)shell;
- (electron::NativeWindowMac*)shell;
- (id)accessibilityFocusedUIElement;
- (NSRect)originalContentRectForFrameRect:(NSRect)frameRect;
- (void)toggleFullScreenMode:(id)sender;

View file

@ -11,11 +11,11 @@
#include "shell/browser/ui/cocoa/root_view_mac.h"
#include "ui/base/cocoa/window_size_constants.h"
namespace atom {
namespace electron {
bool ScopedDisableResize::disable_resize_ = false;
} // namespace atom
} // namespace electron
@implementation AtomNSWindow
@ -25,7 +25,7 @@ bool ScopedDisableResize::disable_resize_ = false;
@synthesize disableKeyOrMainWindow;
@synthesize vibrantView;
- (id)initWithShell:(atom::NativeWindowMac*)shell
- (id)initWithShell:(electron::NativeWindowMac*)shell
styleMask:(NSUInteger)styleMask {
if ((self = [super initWithContentRect:ui::kWindowSizeDeterminedLater
styleMask:styleMask
@ -36,7 +36,7 @@ bool ScopedDisableResize::disable_resize_ = false;
return self;
}
- (atom::NativeWindowMac*)shell {
- (electron::NativeWindowMac*)shell {
return shell_;
}
@ -81,7 +81,7 @@ bool ScopedDisableResize::disable_resize_ = false;
- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen*)screen {
// Resizing is disabled.
if (atom::ScopedDisableResize::IsResizeDisabled())
if (electron::ScopedDisableResize::IsResizeDisabled())
return [self frame];
// Enable the window to be larger than screen.
@ -94,7 +94,7 @@ bool ScopedDisableResize::disable_resize_ = false;
- (void)setFrame:(NSRect)windowFrame display:(BOOL)displayViews {
// constrainFrameRect is not called on hidden windows so disable adjusting
// the frame directly when resize is disabled
if (!atom::ScopedDisableResize::IsResizeDisabled())
if (!electron::ScopedDisableResize::IsResizeDisabled())
[super setFrame:windowFrame display:displayViews];
}
@ -157,7 +157,7 @@ bool ScopedDisableResize::disable_resize_ = false;
- (void)performClose:(id)sender {
if (shell_->title_bar_style() ==
atom::NativeWindowMac::TitleBarStyle::CUSTOM_BUTTONS_ON_HOVER) {
electron::NativeWindowMac::TitleBarStyle::CUSTOM_BUTTONS_ON_HOVER) {
[[self delegate] windowShouldClose:self];
} else if (shell_->IsSimpleFullScreen()) {
if ([[self delegate] respondsToSelector:@selector(windowShouldClose:)]) {
@ -182,7 +182,7 @@ bool ScopedDisableResize::disable_resize_ = false;
- (void)performMiniaturize:(id)sender {
if (shell_->title_bar_style() ==
atom::NativeWindowMac::TitleBarStyle::CUSTOM_BUTTONS_ON_HOVER)
electron::NativeWindowMac::TitleBarStyle::CUSTOM_BUTTONS_ON_HOVER)
[self miniaturize:self];
else
[super performMiniaturize:sender];

View file

@ -9,19 +9,19 @@
#include "components/remote_cocoa/app_shim/views_nswindow_delegate.h"
namespace atom {
namespace electron {
class NativeWindowMac;
}
@interface AtomNSWindowDelegate
: ViewsNSWindowDelegate <NSTouchBarDelegate, QLPreviewPanelDataSource> {
@private
atom::NativeWindowMac* shell_;
electron::NativeWindowMac* shell_;
bool is_zooming_;
int level_;
bool is_resizable_;
}
- (id)initWithShell:(atom::NativeWindowMac*)shell;
- (id)initWithShell:(electron::NativeWindowMac*)shell;
@end
#endif // SHELL_BROWSER_UI_COCOA_ATOM_NS_WINDOW_DELEGATE_H_

View file

@ -15,11 +15,11 @@
#include "ui/views/cocoa/native_widget_mac_ns_window_host.h"
#include "ui/views/widget/native_widget_mac.h"
using TitleBarStyle = atom::NativeWindowMac::TitleBarStyle;
using TitleBarStyle = electron::NativeWindowMac::TitleBarStyle;
@implementation AtomNSWindowDelegate
- (id)initWithShell:(atom::NativeWindowMac*)shell {
- (id)initWithShell:(electron::NativeWindowMac*)shell {
// The views library assumes the window delegate must be an instance of
// ViewsNSWindowDelegate, since we don't have a way to override the creation
// of NSWindowDelegate, we have to dynamically replace the window delegate
@ -278,7 +278,7 @@ using TitleBarStyle = atom::NativeWindowMac::TitleBarStyle;
- (IBAction)newWindowForTab:(id)sender {
shell_->NotifyNewWindowForTab();
atom::Browser::Get()->NewWindowForTab();
electron::Browser::Get()->NewWindowForTab();
}
#pragma mark - NSTouchBarDelegate

View file

@ -24,11 +24,11 @@
std::vector<mate::PersistentDictionary> ordered_settings_;
std::map<std::string, mate::PersistentDictionary> settings_;
id<NSTouchBarDelegate> delegate_;
atom::NativeWindow* window_;
electron::NativeWindow* window_;
}
- (id)initWithDelegate:(id<NSTouchBarDelegate>)delegate
window:(atom::NativeWindow*)window
window:(electron::NativeWindow*)window
settings:(const std::vector<mate::PersistentDictionary>&)settings;
- (NSTouchBar*)makeTouchBar API_AVAILABLE(macosx(10.12.2));

View file

@ -36,7 +36,7 @@ static NSString* const TextScrubberItemIdentifier = @"scrubber.text.item";
static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item";
- (id)initWithDelegate:(id<NSTouchBarDelegate>)delegate
window:(atom::NativeWindow*)window
window:(electron::NativeWindow*)window
settings:
(const std::vector<mate::PersistentDictionary>&)settings {
if ((self = [super init])) {
@ -244,7 +244,8 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item";
NSString* item_id = [self idFromIdentifier:identifier
withPrefix:ColorPickerIdentifier];
NSColor* color = ((NSColorPickerTouchBarItem*)sender).color;
std::string hex_color = atom::ToRGBHex(skia::NSDeviceColorToSkColor(color));
std::string hex_color =
electron::ToRGBHex(skia::NSDeviceColorToSkColor(color));
base::DictionaryValue details;
details.SetString("color", hex_color);
window_->NotifyTouchBarItemInteraction([item_id UTF8String], details);
@ -329,7 +330,7 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item";
}
- (NSColor*)colorFromHexColorString:(const std::string&)colorString {
SkColor color = atom::ParseHexColor(colorString);
SkColor color = electron::ParseHexColor(colorString);
return skia::SkColorToDeviceNSColor(color);
}

View file

@ -4,7 +4,7 @@
#include "shell/browser/ui/cocoa/delayed_native_view_host.h"
namespace atom {
namespace electron {
DelayedNativeViewHost::DelayedNativeViewHost(gfx::NativeView native_view)
: native_view_(native_view) {}
@ -18,4 +18,4 @@ void DelayedNativeViewHost::ViewHierarchyChanged(
Attach(native_view_);
}
} // namespace atom
} // namespace electron

View file

@ -7,7 +7,7 @@
#include "ui/views/controls/native/native_view_host.h"
namespace atom {
namespace electron {
// Automatically attach the native view after the NativeViewHost is attached to
// a widget. (Attaching it directly would cause crash.)
@ -26,6 +26,6 @@ class DelayedNativeViewHost : public views::NativeViewHost {
DISALLOW_COPY_AND_ASSIGN(DelayedNativeViewHost);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_COCOA_DELAYED_NATIVE_VIEW_HOST_H_

View file

@ -7,7 +7,7 @@
#include "ui/views/view.h"
namespace atom {
namespace electron {
class NativeWindow;
@ -28,6 +28,6 @@ class RootViewMac : public views::View {
DISALLOW_COPY_AND_ASSIGN(RootViewMac);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_COCOA_ROOT_VIEW_MAC_H_

View file

@ -6,7 +6,7 @@
#include "shell/browser/native_window.h"
namespace atom {
namespace electron {
RootViewMac::RootViewMac(NativeWindow* window) : window_(window) {
set_owned_by_client();
@ -29,4 +29,4 @@ gfx::Size RootViewMac::GetMaximumSize() const {
return window_->GetMaximumSize();
}
} // namespace atom
} // namespace electron

View file

@ -7,7 +7,7 @@
#include "ui/views/views_delegate.h"
namespace atom {
namespace electron {
class ViewsDelegateMac : public views::ViewsDelegate {
public:
@ -25,6 +25,6 @@ class ViewsDelegateMac : public views::ViewsDelegate {
DISALLOW_COPY_AND_ASSIGN(ViewsDelegateMac);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_COCOA_VIEWS_DELEGATE_MAC_H_

View file

@ -7,7 +7,7 @@
#include "content/public/browser/context_factory.h"
#include "ui/views/widget/native_widget_mac.h"
namespace atom {
namespace electron {
ViewsDelegateMac::ViewsDelegateMac() {}
@ -40,4 +40,4 @@ ui::ContextFactoryPrivate* ViewsDelegateMac::GetContextFactoryPrivate() {
return content::GetContextFactoryPrivate();
}
} // namespace atom
} // namespace electron

View file

@ -30,7 +30,7 @@
#include "shell/browser/atom_paths.h"
#include "ui/base/resource/resource_bundle.h"
namespace atom {
namespace electron {
namespace {
@ -122,4 +122,4 @@ bool DevToolsManagerDelegate::HasBundledFrontendResources() {
return true;
}
} // namespace atom
} // namespace electron

View file

@ -12,7 +12,7 @@
#include "base/macros.h"
#include "content/public/browser/devtools_manager_delegate.h"
namespace atom {
namespace electron {
class DevToolsManagerDelegate : public content::DevToolsManagerDelegate {
public:
@ -37,6 +37,6 @@ class DevToolsManagerDelegate : public content::DevToolsManagerDelegate {
DISALLOW_COPY_AND_ASSIGN(DevToolsManagerDelegate);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_DEVTOOLS_MANAGER_DELEGATE_H_

View file

@ -15,7 +15,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
namespace atom {
namespace electron {
namespace {
@ -117,4 +117,4 @@ DevToolsUI::DevToolsUI(content::BrowserContext* browser_context,
std::make_unique<BundledDataSource>());
}
} // namespace atom
} // namespace electron

View file

@ -9,7 +9,7 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/web_ui_controller.h"
namespace atom {
namespace electron {
class BrowserContext;
@ -22,6 +22,6 @@ class DevToolsUI : public content::WebUIController {
DISALLOW_COPY_AND_ASSIGN(DevToolsUI);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_DEVTOOLS_UI_H_

View file

@ -13,12 +13,12 @@ namespace base {
class FilePath;
}
namespace atom {
namespace electron {
void DragFileItems(const std::vector<base::FilePath>& files,
const gfx::Image& icon,
gfx::NativeView view);
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_DRAG_UTIL_H_

View file

@ -10,7 +10,7 @@
#include "base/strings/sys_string_conversions.h"
#include "shell/browser/ui/drag_util.h"
namespace atom {
namespace electron {
namespace {
@ -58,4 +58,4 @@ void DragFileItems(const std::vector<base::FilePath>& files,
slideBack:YES];
}
} // namespace atom
} // namespace electron

View file

@ -15,7 +15,7 @@
#include "ui/views/widget/widget.h"
#include "url/gurl.h"
namespace atom {
namespace electron {
void DragFileItems(const std::vector<base::FilePath>& files,
const gfx::Image& icon,
@ -46,4 +46,4 @@ void DragFileItems(const std::vector<base::FilePath>& files,
ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE);
}
} // namespace atom
} // namespace electron

View file

@ -14,7 +14,7 @@
#include "shell/common/native_mate_converters/file_path_converter.h"
#include "shell/common/promise_util.h"
namespace atom {
namespace electron {
class NativeWindow;
}
@ -36,7 +36,7 @@ enum FileDialogProperty {
};
struct DialogSettings {
atom::NativeWindow* parent_window = nullptr;
electron::NativeWindow* parent_window = nullptr;
std::string title;
std::string message;
std::string button_label;
@ -57,12 +57,12 @@ bool ShowOpenDialogSync(const DialogSettings& settings,
std::vector<base::FilePath>* paths);
void ShowOpenDialog(const DialogSettings& settings,
atom::util::Promise promise);
electron::util::Promise promise);
bool ShowSaveDialogSync(const DialogSettings& settings, base::FilePath* path);
void ShowSaveDialog(const DialogSettings& settings,
atom::util::Promise promise);
electron::util::Promise promise);
} // namespace file_dialog

View file

@ -44,7 +44,8 @@ void OnFileFilterDataDestroyed(std::string* file_extension) {
class FileChooserDialog {
public:
FileChooserDialog(GtkFileChooserAction action, const DialogSettings& settings)
: parent_(static_cast<atom::NativeWindowViews*>(settings.parent_window)),
: parent_(
static_cast<electron::NativeWindowViews*>(settings.parent_window)),
filters_(settings.filters) {
const char* confirm_text = _("_OK");
@ -126,13 +127,13 @@ class FileChooserDialog {
gtk_window_present_with_time(GTK_WINDOW(dialog_), time);
}
void RunSaveAsynchronous(atom::util::Promise promise) {
save_promise_.reset(new atom::util::Promise(std::move(promise)));
void RunSaveAsynchronous(electron::util::Promise promise) {
save_promise_.reset(new electron::util::Promise(std::move(promise)));
RunAsynchronous();
}
void RunOpenAsynchronous(atom::util::Promise promise) {
open_promise_.reset(new atom::util::Promise(std::move(promise)));
void RunOpenAsynchronous(electron::util::Promise promise) {
open_promise_.reset(new electron::util::Promise(std::move(promise)));
RunAsynchronous();
}
@ -166,15 +167,15 @@ class FileChooserDialog {
private:
void AddFilters(const Filters& filters);
atom::NativeWindowViews* parent_;
atom::UnresponsiveSuppressor unresponsive_suppressor_;
electron::NativeWindowViews* parent_;
electron::UnresponsiveSuppressor unresponsive_suppressor_;
GtkWidget* dialog_;
GtkWidget* preview_;
Filters filters_;
std::unique_ptr<atom::util::Promise> save_promise_;
std::unique_ptr<atom::util::Promise> open_promise_;
std::unique_ptr<electron::util::Promise> save_promise_;
std::unique_ptr<electron::util::Promise> open_promise_;
// Callback for when we update the preview for the selection.
CHROMEG_CALLBACK_0(FileChooserDialog, void, OnUpdatePreview, GtkWidget*);
@ -281,7 +282,7 @@ bool ShowOpenDialogSync(const DialogSettings& settings,
}
void ShowOpenDialog(const DialogSettings& settings,
atom::util::Promise promise) {
electron::util::Promise promise) {
GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN;
if (settings.properties & FILE_DIALOG_OPEN_DIRECTORY)
action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER;
@ -302,7 +303,7 @@ bool ShowSaveDialogSync(const DialogSettings& settings, base::FilePath* path) {
}
void ShowSaveDialog(const DialogSettings& settings,
atom::util::Promise promise) {
electron::util::Promise promise) {
FileChooserDialog* save_dialog =
new FileChooserDialog(GTK_FILE_CHOOSER_ACTION_SAVE, settings);
save_dialog->RunSaveAsynchronous(std::move(promise));

View file

@ -291,7 +291,7 @@ bool ShowOpenDialogSync(const DialogSettings& settings,
void OpenDialogCompletion(int chosen,
NSOpenPanel* dialog,
bool security_scoped_bookmarks,
atom::util::Promise promise) {
electron::util::Promise promise) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate());
if (chosen == NSFileHandlingPanelCancelButton) {
dict.Set("canceled", true);
@ -320,7 +320,7 @@ void OpenDialogCompletion(int chosen,
}
void ShowOpenDialog(const DialogSettings& settings,
atom::util::Promise promise) {
electron::util::Promise promise) {
NSOpenPanel* dialog = [NSOpenPanel openPanel];
SetupDialog(dialog, settings);
@ -330,7 +330,7 @@ void ShowOpenDialog(const DialogSettings& settings,
// and pass it to the completion handler.
bool security_scoped_bookmarks = settings.security_scoped_bookmarks;
__block atom::util::Promise p = std::move(promise);
__block electron::util::Promise p = std::move(promise);
if (!settings.parent_window || !settings.parent_window->GetNativeWindow() ||
settings.force_detached) {
@ -367,7 +367,7 @@ bool ShowSaveDialogSync(const DialogSettings& settings, base::FilePath* path) {
void SaveDialogCompletion(int chosen,
NSSavePanel* dialog,
bool security_scoped_bookmarks,
atom::util::Promise promise) {
electron::util::Promise promise) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate());
if (chosen == NSFileHandlingPanelCancelButton) {
dict.Set("canceled", true);
@ -391,7 +391,7 @@ void SaveDialogCompletion(int chosen,
}
void ShowSaveDialog(const DialogSettings& settings,
atom::util::Promise promise) {
electron::util::Promise promise) {
NSSavePanel* dialog = [NSSavePanel savePanel];
SetupDialog(dialog, settings);
@ -401,7 +401,7 @@ void ShowSaveDialog(const DialogSettings& settings,
// and pass it to the completion handler.
bool security_scoped_bookmarks = settings.security_scoped_bookmarks;
__block atom::util::Promise p = std::move(promise);
__block electron::util::Promise p = std::move(promise);
if (!settings.parent_window || !settings.parent_window->GetNativeWindow() ||
settings.force_detached) {

View file

@ -81,7 +81,7 @@ bool CreateDialogThread(RunState* run_state) {
return true;
}
void OnDialogOpened(atom::util::Promise promise,
void OnDialogOpened(electron::util::Promise promise,
bool canceled,
std::vector<base::FilePath> paths) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate());
@ -92,7 +92,7 @@ void OnDialogOpened(atom::util::Promise promise,
void RunOpenDialogInNewThread(const RunState& run_state,
const DialogSettings& settings,
atom::util::Promise promise) {
electron::util::Promise promise) {
std::vector<base::FilePath> paths;
bool result = ShowOpenDialogSync(settings, &paths);
run_state.ui_task_runner->PostTask(
@ -101,7 +101,7 @@ void RunOpenDialogInNewThread(const RunState& run_state,
run_state.ui_task_runner->DeleteSoon(FROM_HERE, run_state.dialog_thread);
}
void OnSaveDialogDone(atom::util::Promise promise,
void OnSaveDialogDone(electron::util::Promise promise,
bool canceled,
const base::FilePath path) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate());
@ -112,7 +112,7 @@ void OnSaveDialogDone(atom::util::Promise promise,
void RunSaveDialogInNewThread(const RunState& run_state,
const DialogSettings& settings,
atom::util::Promise promise) {
electron::util::Promise promise) {
base::FilePath path;
bool result = ShowSaveDialogSync(settings, &path);
run_state.ui_task_runner->PostTask(
@ -160,10 +160,10 @@ static void SetDefaultFolder(IFileDialog* dialog,
static HRESULT ShowFileDialog(IFileDialog* dialog,
const DialogSettings& settings) {
atom::UnresponsiveSuppressor suppressor;
electron::UnresponsiveSuppressor suppressor;
HWND parent_window =
settings.parent_window
? static_cast<atom::NativeWindowViews*>(settings.parent_window)
? static_cast<electron::NativeWindowViews*>(settings.parent_window)
->GetAcceleratedWidget()
: NULL;
@ -272,7 +272,7 @@ bool ShowOpenDialogSync(const DialogSettings& settings,
}
void ShowOpenDialog(const DialogSettings& settings,
atom::util::Promise promise) {
electron::util::Promise promise) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate());
RunState run_state;
if (!CreateDialogThread(&run_state)) {
@ -317,7 +317,7 @@ bool ShowSaveDialogSync(const DialogSettings& settings, base::FilePath* path) {
}
void ShowSaveDialog(const DialogSettings& settings,
atom::util::Promise promise) {
electron::util::Promise promise) {
RunState run_state;
if (!CreateDialogThread(&run_state)) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate());

View file

@ -7,7 +7,7 @@
#include "shell/browser/ui/inspectable_web_contents_impl.h"
namespace atom {
namespace electron {
InspectableWebContents* InspectableWebContents::Create(
content::WebContents* web_contents,
@ -16,4 +16,4 @@ InspectableWebContents* InspectableWebContents::Create(
return new InspectableWebContentsImpl(web_contents, pref_service, is_guest);
}
} // namespace atom
} // namespace electron

View file

@ -20,7 +20,7 @@ class DevToolsAgentHost;
class PrefService;
namespace atom {
namespace electron {
class InspectableWebContentsDelegate;
class InspectableWebContentsView;
@ -61,6 +61,6 @@ class InspectableWebContents {
virtual void InspectElement(int x, int y) = 0;
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_H_

View file

@ -10,7 +10,7 @@
#include "base/files/file_path.h"
namespace atom {
namespace electron {
class InspectableWebContentsDelegate {
public:
@ -37,6 +37,6 @@ class InspectableWebContentsDelegate {
const std::string& query) {}
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_DELEGATE_H_

View file

@ -45,7 +45,7 @@
#include "ui/display/display.h"
#include "ui/display/screen.h"
namespace atom {
namespace electron {
namespace {
@ -914,4 +914,4 @@ void InspectableWebContentsImpl::SendMessageAck(int request_id,
CallClientFunction("DevToolsAPI.embedderMessageAck", &id_value, arg, nullptr);
}
} // namespace atom
} // namespace electron

View file

@ -27,7 +27,7 @@
class PrefService;
class PrefRegistrySimple;
namespace atom {
namespace electron {
class InspectableWebContentsDelegate;
class InspectableWebContentsView;
@ -245,6 +245,6 @@ class InspectableWebContentsImpl
DISALLOW_COPY_AND_ASSIGN(InspectableWebContentsImpl);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_IMPL_H_

View file

@ -17,7 +17,7 @@ class View;
}
#endif
namespace atom {
namespace electron {
class InspectableWebContentsViewDelegate;
@ -57,6 +57,6 @@ class InspectableWebContentsView {
InspectableWebContentsViewDelegate* delegate_; // weak references.
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_H_

View file

@ -5,10 +5,10 @@
#include "shell/browser/ui/inspectable_web_contents_view_delegate.h"
namespace atom {
namespace electron {
gfx::ImageSkia InspectableWebContentsViewDelegate::GetDevToolsWindowIcon() {
return gfx::ImageSkia();
}
} // namespace atom
} // namespace electron

View file

@ -10,7 +10,7 @@
#include "ui/gfx/image/image_skia.h"
namespace atom {
namespace electron {
class InspectableWebContentsViewDelegate {
public:
@ -30,6 +30,6 @@ class InspectableWebContentsViewDelegate {
#endif
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_DELEGATE_H_

View file

@ -12,7 +12,7 @@
@class AtomInspectableWebContentsView;
namespace atom {
namespace electron {
class InspectableWebContentsImpl;
@ -45,6 +45,6 @@ class InspectableWebContentsViewMac : public InspectableWebContentsView {
DISALLOW_COPY_AND_ASSIGN(InspectableWebContentsViewMac);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_MAC_H_

View file

@ -12,7 +12,7 @@
#include "shell/browser/ui/inspectable_web_contents.h"
#include "shell/browser/ui/inspectable_web_contents_view_delegate.h"
namespace atom {
namespace electron {
InspectableWebContentsView* CreateInspectableContentsView(
InspectableWebContentsImpl* inspectable_web_contents) {
@ -63,4 +63,4 @@ void InspectableWebContentsViewMac::SetTitle(const base::string16& title) {
[view_ setTitle:base::SysUTF16ToNSString(title)];
}
} // namespace atom
} // namespace electron

View file

@ -12,7 +12,7 @@
#include "base/strings/string16.h"
#include "ui/gfx/image/image_skia.h"
namespace atom {
namespace electron {
class NativeWindow;
@ -30,12 +30,12 @@ enum MessageBoxOptions {
};
struct MessageBoxSettings {
atom::NativeWindow* parent_window = nullptr;
MessageBoxType type = atom::MessageBoxType::kNone;
electron::NativeWindow* parent_window = nullptr;
MessageBoxType type = electron::MessageBoxType::kNone;
std::vector<std::string> buttons;
int default_id;
int cancel_id;
int options = atom::MessageBoxOptions::MESSAGE_BOX_NONE;
int options = electron::MessageBoxOptions::MESSAGE_BOX_NONE;
std::string title;
std::string message;
std::string detail;
@ -60,6 +60,6 @@ void ShowMessageBox(const MessageBoxSettings& settings,
// stage of application.
void ShowErrorBox(const base::string16& title, const base::string16& content);
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_MESSAGE_BOX_H_

View file

@ -25,7 +25,7 @@
#define ANSI_BACKGROUND_GRAY "\x1b[47m"
#define ANSI_RESET "\x1b[0m"
namespace atom {
namespace electron {
MessageBoxSettings::MessageBoxSettings() = default;
MessageBoxSettings::MessageBoxSettings(const MessageBoxSettings&) = default;
@ -166,7 +166,7 @@ class GtkMessageBox : public NativeWindowObserver {
CHROMEG_CALLBACK_0(GtkMessageBox, void, OnCheckboxToggled, GtkWidget*);
private:
atom::UnresponsiveSuppressor unresponsive_suppressor_;
electron::UnresponsiveSuppressor unresponsive_suppressor_;
// The id to return when the dialog is closed without pressing buttons.
int cancel_id_ = 0;
@ -207,8 +207,8 @@ void ShowMessageBox(const MessageBoxSettings& settings,
void ShowErrorBox(const base::string16& title, const base::string16& content) {
if (Browser::Get()->is_ready()) {
atom::MessageBoxSettings settings;
settings.type = atom::MessageBoxType::kError;
electron::MessageBoxSettings settings;
settings.type = electron::MessageBoxType::kError;
settings.buttons = {"OK"};
settings.title = "Error";
settings.message = base::UTF16ToUTF8(title);
@ -224,4 +224,4 @@ void ShowErrorBox(const base::string16& title, const base::string16& content) {
}
}
} // namespace atom
} // namespace electron

View file

@ -17,7 +17,7 @@
#include "skia/ext/skia_utils_mac.h"
#include "ui/gfx/image/image_skia.h"
namespace atom {
namespace electron {
MessageBoxSettings::MessageBoxSettings() = default;
MessageBoxSettings::MessageBoxSettings(const MessageBoxSettings&) = default;
@ -149,4 +149,4 @@ void ShowErrorBox(const base::string16& title, const base::string16& content) {
[alert release];
}
} // namespace atom
} // namespace electron

View file

@ -24,7 +24,7 @@
#include "ui/gfx/icon_util.h"
#include "ui/gfx/image/image_skia.h"
namespace atom {
namespace electron {
MessageBoxSettings::MessageBoxSettings() = default;
MessageBoxSettings::MessageBoxSettings(const MessageBoxSettings&) = default;
@ -100,8 +100,8 @@ int ShowTaskDialogUTF16(NativeWindow* parent,
config.dwFlags = flags;
if (parent) {
config.hwndParent =
static_cast<atom::NativeWindowViews*>(parent)->GetAcceleratedWidget();
config.hwndParent = static_cast<electron::NativeWindowViews*>(parent)
->GetAcceleratedWidget();
}
if (default_id > 0)
@ -219,7 +219,7 @@ void RunMessageBoxInNewThread(base::Thread* thread,
} // namespace
int ShowMessageBoxSync(const MessageBoxSettings& settings) {
atom::UnresponsiveSuppressor suppressor;
electron::UnresponsiveSuppressor suppressor;
return ShowTaskDialogUTF8(settings);
}
@ -241,9 +241,9 @@ void ShowMessageBox(const MessageBoxSettings& settings,
}
void ShowErrorBox(const base::string16& title, const base::string16& content) {
atom::UnresponsiveSuppressor suppressor;
electron::UnresponsiveSuppressor suppressor;
ShowTaskDialogUTF16(nullptr, MessageBoxType::kError, {}, -1, 0, 0, L"Error",
title, content, L"", nullptr, gfx::ImageSkia());
}
} // namespace atom
} // namespace electron

View file

@ -4,7 +4,7 @@
#include "shell/browser/ui/tray_icon.h"
namespace atom {
namespace electron {
TrayIcon::TrayIcon() {}
@ -102,4 +102,4 @@ void TrayIcon::NotifyDragEnded() {
observer.OnDragEnded();
}
} // namespace atom
} // namespace electron

View file

@ -13,7 +13,7 @@
#include "shell/browser/ui/tray_icon_observer.h"
#include "ui/gfx/geometry/rect.h"
namespace atom {
namespace electron {
class TrayIcon {
public:
@ -107,6 +107,6 @@ class TrayIcon {
DISALLOW_COPY_AND_ASSIGN(TrayIcon);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_TRAY_ICON_H_

View file

@ -15,7 +15,7 @@
@class AtomMenuController;
@class StatusItemView;
namespace atom {
namespace electron {
class TrayIconCocoa : public TrayIcon, public AtomMenuModel::Observer {
public:
@ -52,6 +52,6 @@ class TrayIconCocoa : public TrayIcon, public AtomMenuModel::Observer {
DISALLOW_COPY_AND_ASSIGN(TrayIconCocoa);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_TRAY_ICON_COCOA_H_

View file

@ -27,9 +27,9 @@ const CGFloat kVerticalTitleMargin = 2;
} // namespace
@interface StatusItemView : NSView {
atom::TrayIconCocoa* trayIcon_; // weak
electron::TrayIconCocoa* trayIcon_; // weak
AtomMenuController* menuController_; // weak
atom::TrayIcon::HighlightMode highlight_mode_;
electron::TrayIcon::HighlightMode highlight_mode_;
BOOL ignoreDoubleClickEvents_;
BOOL forceHighlight_;
BOOL inMouseEventSequence_;
@ -52,10 +52,10 @@ const CGFloat kVerticalTitleMargin = 2;
[super dealloc];
}
- (id)initWithIcon:(atom::TrayIconCocoa*)icon {
- (id)initWithIcon:(electron::TrayIconCocoa*)icon {
trayIcon_ = icon;
menuController_ = nil;
highlight_mode_ = atom::TrayIcon::HighlightMode::SELECTION;
highlight_mode_ = electron::TrayIcon::HighlightMode::SELECTION;
ignoreDoubleClickEvents_ = NO;
forceHighlight_ = NO;
inMouseEventSequence_ = NO;
@ -219,7 +219,7 @@ const CGFloat kVerticalTitleMargin = 2;
alternateImage_.reset([image copy]);
}
- (void)setHighlight:(atom::TrayIcon::HighlightMode)mode {
- (void)setHighlight:(electron::TrayIcon::HighlightMode)mode {
highlight_mode_ = mode;
[self setNeedsDisplay:YES];
}
@ -332,7 +332,7 @@ const CGFloat kVerticalTitleMargin = 2;
[self setNeedsDisplay:YES];
}
- (void)popUpContextMenu:(atom::AtomMenuModel*)menu_model {
- (void)popUpContextMenu:(electron::AtomMenuModel*)menu_model {
// Show a custom menu.
if (menu_model) {
base::scoped_nsobject<AtomMenuController> menuController(
@ -431,7 +431,7 @@ const CGFloat kVerticalTitleMargin = 2;
}
- (BOOL)shouldHighlight {
using HighlightMode = atom::TrayIcon::HighlightMode;
using HighlightMode = electron::TrayIcon::HighlightMode;
switch (highlight_mode_) {
case HighlightMode::ALWAYS:
return true;
@ -445,7 +445,7 @@ const CGFloat kVerticalTitleMargin = 2;
@end
namespace atom {
namespace electron {
TrayIconCocoa::TrayIconCocoa() {
status_item_view_.reset([[StatusItemView alloc] initWithIcon:this]);
@ -527,4 +527,4 @@ TrayIcon* TrayIcon::Create() {
return new TrayIconCocoa;
}
} // namespace atom
} // namespace electron

View file

@ -11,7 +11,7 @@
#include "ui/gfx/image/image.h"
#include "ui/views/linux_ui/linux_ui.h"
namespace atom {
namespace electron {
TrayIconGtk::TrayIconGtk() {}
@ -50,4 +50,4 @@ TrayIcon* TrayIcon::Create() {
return new TrayIconGtk;
}
} // namespace atom
} // namespace electron

View file

@ -15,7 +15,7 @@ namespace views {
class StatusIconLinux;
}
namespace atom {
namespace electron {
class TrayIconGtk : public TrayIcon, public views::StatusIconLinux::Delegate {
public:
@ -37,6 +37,6 @@ class TrayIconGtk : public TrayIcon, public views::StatusIconLinux::Delegate {
DISALLOW_COPY_AND_ASSIGN(TrayIconGtk);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_TRAY_ICON_GTK_H_

View file

@ -15,7 +15,7 @@ class Rect;
class Point;
} // namespace gfx
namespace atom {
namespace electron {
class TrayIconObserver : public base::CheckedObserver {
public:
@ -41,6 +41,6 @@ class TrayIconObserver : public base::CheckedObserver {
~TrayIconObserver() override {}
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_TRAY_ICON_OBSERVER_H_

View file

@ -5,7 +5,7 @@
#include "shell/browser/ui/win/notify_icon.h"
#include "shell/browser/ui/win/notify_icon_host.h"
namespace atom {
namespace electron {
// static
TrayIcon* TrayIcon::Create() {
@ -13,4 +13,4 @@ TrayIcon* TrayIcon::Create() {
return host.CreateNotifyIcon();
}
} // namespace atom
} // namespace electron

View file

@ -28,7 +28,7 @@ bool IsDesktopEnvironmentUnity() {
} // namespace
namespace atom {
namespace electron {
ViewsDelegate::ViewsDelegate() {}
@ -112,4 +112,4 @@ bool ViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) {
#endif
}
} // namespace atom
} // namespace electron

View file

@ -10,7 +10,7 @@
#include "base/compiler_specific.h"
#include "ui/views/views_delegate.h"
namespace atom {
namespace electron {
class ViewsDelegate : public views::ViewsDelegate {
public:
@ -53,6 +53,6 @@ class ViewsDelegate : public views::ViewsDelegate {
DISALLOW_COPY_AND_ASSIGN(ViewsDelegate);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_VIEWS_ATOM_VIEWS_DELEGATE_H_

View file

@ -19,7 +19,7 @@
#include "ui/views/focus/focus_manager.h"
#include "ui/views/widget/widget.h"
namespace atom {
namespace electron {
void AutofillPopupChildView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
node_data->role = ax::mojom::Role::kMenuItem;
@ -489,4 +489,4 @@ void AutofillPopupView::RemoveObserver() {
views::WidgetFocusManager::GetInstance()->RemoveFocusChangeListener(this);
}
} // namespace atom
} // namespace electron

View file

@ -23,7 +23,7 @@
#include "shell/browser/osr/osr_view_proxy.h"
#endif
namespace atom {
namespace electron {
const int kPopupBorderThickness = 1;
const int kSmallerFontSizeDelta = -1;
@ -150,6 +150,6 @@ class AutofillPopupView : public views::WidgetDelegateView,
base::WeakPtrFactory<AutofillPopupView> weak_ptr_factory_;
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_VIEWS_AUTOFILL_POPUP_VIEW_H_

View file

@ -10,7 +10,7 @@
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
namespace atom {
namespace electron {
namespace {
@ -111,4 +111,4 @@ const char* FramelessView::GetClassName() const {
return kViewClassName;
}
} // namespace atom
} // namespace electron

View file

@ -11,7 +11,7 @@ namespace views {
class Widget;
}
namespace atom {
namespace electron {
class NativeWindowViews;
@ -52,6 +52,6 @@ class FramelessView : public views::NonClientFrameView {
DISALLOW_COPY_AND_ASSIGN(FramelessView);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_VIEWS_FRAMELESS_VIEW_H_

View file

@ -51,7 +51,7 @@ typedef DbusmenuServer* (*dbusmenu_server_new_func)(const char* object);
typedef void (*dbusmenu_server_set_root_func)(DbusmenuServer* self,
DbusmenuMenuitem* root);
namespace atom {
namespace electron {
namespace {
@ -333,4 +333,4 @@ void GlobalMenuBarX11::OnSubMenuShow(DbusmenuMenuitem* item) {
BuildMenuFromModel(model->GetSubmenuModelAt(id), item);
}
} // namespace atom
} // namespace electron

View file

@ -20,7 +20,7 @@ namespace ui {
class Accelerator;
}
namespace atom {
namespace electron {
class NativeWindowViews;
@ -76,6 +76,6 @@ class GlobalMenuBarX11 {
DISALLOW_COPY_AND_ASSIGN(GlobalMenuBarX11);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_VIEWS_GLOBAL_MENU_BAR_X11_H_

View file

@ -14,7 +14,7 @@
#include "ui/views/widget/widget_delegate.h"
#include "ui/views/window/client_view.h"
namespace atom {
namespace electron {
namespace {
@ -232,4 +232,4 @@ void InspectableWebContentsViewViews::Layout() {
contents_web_view_->SetBoundsRect(new_contents_bounds);
}
} // namespace atom
} // namespace electron

View file

@ -18,7 +18,7 @@ class Widget;
class WidgetDelegate;
} // namespace views
namespace atom {
namespace electron {
class InspectableWebContentsImpl;
@ -67,6 +67,6 @@ class InspectableWebContentsViewViews : public InspectableWebContentsView,
DISALLOW_COPY_AND_ASSIGN(InspectableWebContentsViewViews);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_

View file

@ -24,7 +24,7 @@
#include "ui/gfx/color_utils.h"
#endif
namespace atom {
namespace electron {
namespace {
@ -161,7 +161,7 @@ bool MenuBar::AcceleratorPressed(const ui::Accelerator& accelerator) {
auto* button = static_cast<SubmenuButton*>(children[i]);
bool shifted = false;
auto keycode =
atom::KeyboardCodeFromCharCode(button->accelerator(), &shifted);
electron::KeyboardCodeFromCharCode(button->accelerator(), &shifted);
if (keycode == accelerator.key_code()) {
const gfx::Point p(0, 0);
@ -191,7 +191,7 @@ bool MenuBar::SetPaneFocus(views::View* initial_focus) {
// views::View::Focus
// views::FocusManager::SetFocusedViewWithReason
// views::AccessiblePaneView::SetPaneFocus
// atom::MenuBar::SetPaneFocus
// electron::MenuBar::SetPaneFocus
if (initial_focus && initial_focus->GetWidget()) {
aura::Window* window = initial_focus->GetWidget()->GetNativeWindow();
if (!window || !window->GetRootWindow())
@ -207,7 +207,7 @@ bool MenuBar::SetPaneFocus(views::View* initial_focus) {
auto* button = static_cast<SubmenuButton*>(children[i]);
bool shifted = false;
auto keycode =
atom::KeyboardCodeFromCharCode(button->accelerator(), &shifted);
electron::KeyboardCodeFromCharCode(button->accelerator(), &shifted);
// We want the menu items to activate if the user presses the accelerator
// key, even without alt, since we are now focused on the menu bar
@ -238,7 +238,7 @@ void MenuBar::RemovePaneFocus() {
auto* button = static_cast<SubmenuButton*>(children[i]);
bool shifted = false;
auto keycode =
atom::KeyboardCodeFromCharCode(button->accelerator(), &shifted);
electron::KeyboardCodeFromCharCode(button->accelerator(), &shifted);
if (keycode != ui::VKEY_UNKNOWN && unreg.find(keycode) != unreg.end()) {
unreg.insert(keycode);
@ -346,4 +346,4 @@ void MenuBar::UpdateViewColors() {
#endif
}
} // namespace atom
} // namespace electron

View file

@ -20,7 +20,7 @@ class Button;
class MenuButton;
} // namespace views
namespace atom {
namespace electron {
class MenuBarColorUpdater : public views::FocusChangeListener {
public:
@ -38,7 +38,7 @@ class MenuBarColorUpdater : public views::FocusChangeListener {
class MenuBar : public views::AccessiblePaneView,
public views::MenuButtonListener,
public atom::MenuDelegate::Observer {
public electron::MenuDelegate::Observer {
public:
static const char kViewClassName[];
@ -65,7 +65,7 @@ class MenuBar : public views::AccessiblePaneView,
AtomMenuModel** menu_model,
views::MenuButton** button);
// atom::MenuDelegate::Observer:
// electron::MenuDelegate::Observer:
void OnBeforeExecuteCommand() override;
void OnMenuClosed() override;
@ -109,6 +109,6 @@ class MenuBar : public views::AccessiblePaneView,
DISALLOW_COPY_AND_ASSIGN(MenuBar);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_VIEWS_MENU_BAR_H_

View file

@ -14,7 +14,7 @@
#include "ui/views/controls/menu/menu_runner.h"
#include "ui/views/widget/widget.h"
namespace atom {
namespace electron {
MenuDelegate::MenuDelegate(MenuBar* menu_bar)
: menu_bar_(menu_bar), id_(-1), hold_first_switch_(false) {}
@ -140,4 +140,4 @@ views::MenuItemView* MenuDelegate::GetSiblingMenu(
return nullptr;
}
} // namespace atom
} // namespace electron

View file

@ -16,7 +16,7 @@ class MenuRunner;
class Button;
} // namespace views
namespace atom {
namespace electron {
class MenuBar;
@ -75,6 +75,6 @@ class MenuDelegate : public views::MenuDelegate {
DISALLOW_COPY_AND_ASSIGN(MenuDelegate);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_VIEWS_MENU_DELEGATE_H_

View file

@ -4,7 +4,7 @@
#include "shell/browser/ui/views/menu_model_adapter.h"
namespace atom {
namespace electron {
MenuModelAdapter::MenuModelAdapter(AtomMenuModel* menu_model)
: views::MenuModelAdapter(menu_model), menu_model_(menu_model) {}
@ -22,4 +22,4 @@ bool MenuModelAdapter::GetAccelerator(int id,
return false;
}
} // namespace atom
} // namespace electron

View file

@ -8,7 +8,7 @@
#include "shell/browser/ui/atom_menu_model.h"
#include "ui/views/controls/menu/menu_model_adapter.h"
namespace atom {
namespace electron {
class MenuModelAdapter : public views::MenuModelAdapter {
public:
@ -24,6 +24,6 @@ class MenuModelAdapter : public views::MenuModelAdapter {
DISALLOW_COPY_AND_ASSIGN(MenuModelAdapter);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_

View file

@ -6,7 +6,7 @@
#include "shell/browser/native_window.h"
namespace atom {
namespace electron {
const char NativeFrameView::kViewClassName[] = "AtomNativeFrameView";
@ -25,4 +25,4 @@ const char* NativeFrameView::GetClassName() const {
return kViewClassName;
}
} // namespace atom
} // namespace electron

View file

@ -7,7 +7,7 @@
#include "ui/views/window/native_frame_view.h"
namespace atom {
namespace electron {
class NativeWindow;
@ -30,6 +30,6 @@ class NativeFrameView : public views::NativeFrameView {
DISALLOW_COPY_AND_ASSIGN(NativeFrameView);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_VIEWS_NATIVE_FRAME_VIEW_H_

View file

@ -8,7 +8,7 @@
#include "shell/browser/native_window.h"
#include "shell/browser/ui/views/menu_bar.h"
namespace atom {
namespace electron {
namespace {
@ -230,4 +230,4 @@ void RootView::SetInsets(const gfx::Insets& insets) {
}
}
} // namespace atom
} // namespace electron

View file

@ -16,7 +16,7 @@ namespace content {
struct NativeWebKeyboardEvent;
}
namespace atom {
namespace electron {
class AtomMenuModel;
class MenuBar;
@ -69,6 +69,6 @@ class RootView : public views::View {
DISALLOW_COPY_AND_ASSIGN(RootView);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_VIEWS_ROOT_VIEW_H_

View file

@ -17,7 +17,7 @@
#include "ui/views/animation/ink_drop_impl.h"
#include "ui/views/controls/button/label_button_border.h"
namespace atom {
namespace electron {
SubmenuButton::SubmenuButton(const base::string16& title,
views::MenuButtonListener* menu_button_listener,
@ -113,4 +113,4 @@ void SubmenuButton::GetCharacterPosition(const base::string16& text,
&height, 0, 0);
}
} // namespace atom
} // namespace electron

View file

@ -11,7 +11,7 @@
#include "ui/views/animation/ink_drop_highlight.h"
#include "ui/views/controls/button/menu_button.h"
namespace atom {
namespace electron {
// Special button that used by menu bar to show submenus.
class SubmenuButton : public views::MenuButton {
@ -58,6 +58,6 @@ class SubmenuButton : public views::MenuButton {
DISALLOW_COPY_AND_ASSIGN(SubmenuButton);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_VIEWS_SUBMENU_BUTTON_H_

View file

@ -8,7 +8,7 @@
#include "ui/views/widget/widget.h"
#include "ui/views/win/hwnd_util.h"
namespace atom {
namespace electron {
const char WinFrameView::kViewClassName[] = "WinFrameView";
@ -34,4 +34,4 @@ const char* WinFrameView::GetClassName() const {
return kViewClassName;
}
} // namespace atom
} // namespace electron

View file

@ -7,7 +7,7 @@
#include "shell/browser/ui/views/frameless_view.h"
namespace atom {
namespace electron {
class WinFrameView : public FramelessView {
public:
@ -27,6 +27,6 @@ class WinFrameView : public FramelessView {
DISALLOW_COPY_AND_ASSIGN(WinFrameView);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_VIEWS_WIN_FRAME_VIEW_H_

View file

@ -21,7 +21,7 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/webui/web_ui_util.h"
namespace atom {
namespace electron {
namespace {
@ -228,4 +228,4 @@ void PdfViewerHandler::RemoveObserver() {
zoom_controller->RemoveObserver(this);
}
} // namespace atom
} // namespace electron

View file

@ -21,7 +21,7 @@ namespace content {
struct StreamInfo;
}
namespace atom {
namespace electron {
class PdfViewerHandler : public content::WebUIMessageHandler,
public WebContentsZoomController::Observer {
@ -56,6 +56,6 @@ class PdfViewerHandler : public content::WebUIMessageHandler,
DISALLOW_COPY_AND_ASSIGN(PdfViewerHandler);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_WEBUI_PDF_VIEWER_HANDLER_H_

View file

@ -40,7 +40,7 @@
using content::BrowserThread;
namespace atom {
namespace electron {
namespace {
@ -118,7 +118,7 @@ void CallMigrationCallback(T callback,
class PdfViewerUI::ResourceRequester
: public base::RefCountedThreadSafe<ResourceRequester,
BrowserThread::DeleteOnIOThread>,
public atom::LayeredResourceHandler::Delegate {
public electron::LayeredResourceHandler::Delegate {
public:
explicit ResourceRequester(StreamResponseCallback cb)
: stream_response_cb_(std::move(cb)) {}
@ -160,8 +160,8 @@ class PdfViewerUI::ResourceRequester
stream_info_->original_url = request->url();
// Helper to fill stream response details.
handler.reset(new atom::LayeredResourceHandler(request.get(),
std::move(handler), this));
handler.reset(new electron::LayeredResourceHandler(
request.get(), std::move(handler), this));
content::ResourceDispatcherHostImpl::Get()->BeginURLRequest(
std::move(request), std::move(handler),
@ -172,7 +172,7 @@ class PdfViewerUI::ResourceRequester
}
protected:
// atom::LayeredResourceHandler::Delegate:
// electron::LayeredResourceHandler::Delegate:
void OnResponseStarted(network::ResourceResponse* response) override {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@ -255,4 +255,4 @@ void PdfViewerUI::OnSaveURLAs(const GURL& url,
web_contents()->SaveFrame(url, referrer);
}
} // namespace atom
} // namespace electron

View file

@ -18,7 +18,7 @@ class BrowserContext;
struct StreamInfo;
} // namespace content
namespace atom {
namespace electron {
class PdfViewerHandler;
@ -56,6 +56,6 @@ class PdfViewerUI : public content::WebUIController,
DISALLOW_COPY_AND_ASSIGN(PdfViewerUI);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_WEBUI_PDF_VIEWER_UI_H_

View file

@ -8,7 +8,7 @@
#include "ui/views/corewm/tooltip_controller.h"
#include "ui/wm/public/tooltip_client.h"
namespace atom {
namespace electron {
AtomDesktopNativeWidgetAura::AtomDesktopNativeWidgetAura(
NativeWindowViews* native_window_view)
@ -56,4 +56,4 @@ void AtomDesktopNativeWidgetAura::OnWindowActivated(
}
}
} // namespace atom
} // namespace electron

View file

@ -12,7 +12,7 @@ namespace views {
class DesktopWindowTreeHost;
}
namespace atom {
namespace electron {
class AtomDesktopNativeWidgetAura : public views::DesktopNativeWidgetAura {
public:
@ -37,6 +37,6 @@ class AtomDesktopNativeWidgetAura : public views::DesktopNativeWidgetAura {
DISALLOW_COPY_AND_ASSIGN(AtomDesktopNativeWidgetAura);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_WIN_ATOM_DESKTOP_NATIVE_WIDGET_AURA_H_

View file

@ -4,7 +4,7 @@
#include "shell/browser/ui/win/atom_desktop_window_tree_host_win.h"
namespace atom {
namespace electron {
AtomDesktopWindowTreeHostWin::AtomDesktopWindowTreeHostWin(
NativeWindowViews* native_window_view,
@ -29,4 +29,4 @@ bool AtomDesktopWindowTreeHostWin::HasNativeFrame() const {
return true;
}
} // namespace atom
} // namespace electron

View file

@ -10,7 +10,7 @@
#include "shell/browser/native_window_views.h"
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"
namespace atom {
namespace electron {
class AtomDesktopWindowTreeHostWin : public views::DesktopWindowTreeHostWin {
public:
@ -32,6 +32,6 @@ class AtomDesktopWindowTreeHostWin : public views::DesktopWindowTreeHostWin {
DISALLOW_COPY_AND_ASSIGN(AtomDesktopWindowTreeHostWin);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_WIN_ATOM_DESKTOP_WINDOW_TREE_HOST_WIN_H_

View file

@ -12,9 +12,9 @@
namespace {
using atom::JumpListCategory;
using atom::JumpListItem;
using atom::JumpListResult;
using electron::JumpListCategory;
using electron::JumpListItem;
using electron::JumpListResult;
bool AppendTask(const JumpListItem& item, IObjectCollection* collection) {
DCHECK(collection);
@ -148,7 +148,7 @@ void ConvertRemovedJumpListItems(IObjectArray* in,
} // namespace
namespace atom {
namespace electron {
JumpListItem::JumpListItem() = default;
JumpListItem::JumpListItem(const JumpListItem&) = default;
@ -347,4 +347,4 @@ JumpListResult JumpList::AppendCategories(
return result;
}
} // namespace atom
} // namespace electron

View file

@ -12,7 +12,7 @@
#include "base/files/file_path.h"
#include "base/macros.h"
namespace atom {
namespace electron {
enum class JumpListResult : int {
SUCCESS = 0,
@ -117,6 +117,6 @@ class JumpList {
DISALLOW_COPY_AND_ASSIGN(JumpList);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_WIN_JUMP_LIST_H_

View file

@ -17,7 +17,7 @@
#include "ui/views/controls/menu/menu_runner.h"
#include "ui/views/widget/widget.h"
namespace atom {
namespace electron {
NotifyIcon::NotifyIcon(NotifyIconHost* host, UINT id, HWND window, UINT message)
: host_(host),
@ -201,4 +201,4 @@ void NotifyIcon::OnContextMenuClosed() {
widget_->Close();
}
} // namespace atom
} // namespace electron

View file

@ -27,7 +27,7 @@ class MenuRunner;
class Widget;
} // namespace views
namespace atom {
namespace electron {
class NotifyIconHost;
@ -97,6 +97,6 @@ class NotifyIcon : public TrayIcon {
DISALLOW_COPY_AND_ASSIGN(NotifyIcon);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_WIN_NOTIFY_ICON_H_

View file

@ -16,7 +16,7 @@
#include "ui/events/win/system_event_state_lookup.h"
#include "ui/gfx/win/hwnd_util.h"
namespace atom {
namespace electron {
namespace {
@ -180,4 +180,4 @@ UINT NotifyIconHost::NextIconId() {
return kBaseIconId + icon_id;
}
} // namespace atom
} // namespace electron

View file

@ -11,7 +11,7 @@
#include "base/macros.h"
namespace atom {
namespace electron {
class NotifyIcon;
@ -61,6 +61,6 @@ class NotifyIconHost {
DISALLOW_COPY_AND_ASSIGN(NotifyIconHost);
};
} // namespace atom
} // namespace electron
#endif // SHELL_BROWSER_UI_WIN_NOTIFY_ICON_HOST_H_

View file

@ -15,7 +15,7 @@
#include "ui/display/win/screen_win.h"
#include "ui/gfx/icon_util.h"
namespace atom {
namespace electron {
namespace {
@ -223,4 +223,4 @@ bool TaskbarHost::InitializeTaskbar() {
}
}
} // namespace atom
} // namespace electron

Some files were not shown because too many files have changed in this diff Show more