chore: run clang-format

- atom/
 - brightray/
 - chromium_src/
This commit is contained in:
Aleksei Kuzmin 2018-09-19 13:10:26 +02:00
parent ec125b761c
commit 7fc3bcaa02
35 changed files with 98 additions and 98 deletions

View file

@ -8,10 +8,10 @@
namespace atom {
bool AtomMenuModel::Delegate::GetAcceleratorForCommandId(int command_id,
bool AtomMenuModel::Delegate::GetAcceleratorForCommandId(
int command_id,
ui::Accelerator* accelerator) const {
return GetAcceleratorForCommandIdWithParams(
command_id, false, accelerator);
return GetAcceleratorForCommandIdWithParams(command_id, false, accelerator);
}
AtomMenuModel::AtomMenuModel(Delegate* delegate)

View file

@ -224,17 +224,21 @@ bool ScopedDisableResize::disable_resize_ = false;
// Custom window button methods
- (BOOL)windowShouldClose:(id)sender { return YES; }
- (BOOL)windowShouldClose:(id)sender {
return YES;
}
- (void)performClose:(id)sender {
if (shell_->title_bar_style() ==
atom::NativeWindowMac::CUSTOM_BUTTONS_ON_HOVER) {
[[self delegate] windowShouldClose:self];
} else if (shell_->IsSimpleFullScreen()) {
if([[self delegate] respondsToSelector:@selector(windowShouldClose:)]) {
if(![[self delegate] windowShouldClose:self]) return;
} else if([self respondsToSelector:@selector(windowShouldClose:)]) {
if(![self windowShouldClose:self]) return;
if ([[self delegate] respondsToSelector:@selector(windowShouldClose:)]) {
if (![[self delegate] windowShouldClose:self])
return;
} else if ([self respondsToSelector:@selector(windowShouldClose:)]) {
if (![self windowShouldClose:self])
return;
}
[self close];
} else {

View file

@ -13,9 +13,8 @@ namespace atom {
class NativeWindowMac;
}
@interface AtomNSWindowDelegate :
ViewsNSWindowDelegate<NSTouchBarDelegate,
QLPreviewPanelDataSource> {
@interface AtomNSWindowDelegate
: ViewsNSWindowDelegate <NSTouchBarDelegate, QLPreviewPanelDataSource> {
@private
atom::NativeWindowMac* shell_;
bool is_zooming_;

View file

@ -8,9 +8,9 @@
#import <Cocoa/Cocoa.h>
#import <Quartz/Quartz.h>
@interface AtomPreviewItem : NSObject<QLPreviewItem>
@property (nonatomic, retain) NSURL* previewItemURL;
@property (nonatomic, retain) NSString* previewItemTitle;
@interface AtomPreviewItem : NSObject <QLPreviewItem>
@property(nonatomic, retain) NSURL* previewItemURL;
@property(nonatomic, retain) NSString* previewItemTitle;
- (id)initWithURL:(NSURL*)url title:(NSString*)title;
@end

View file

@ -150,8 +150,7 @@ static HRESULT ShowFileDialog(IFileDialog* dialog,
return dialog->Show(parent_window);
}
static void ApplySettings(IFileDialog* dialog,
const DialogSettings& settings) {
static void ApplySettings(IFileDialog* dialog, const DialogSettings& settings) {
std::wstring file_part;
if (!IsDirectory(settings.default_path))
@ -271,7 +270,7 @@ bool ShowSaveDialog(const DialogSettings& settings, base::FilePath* path) {
return false;
file_save_dialog->SetOptions(FOS_FORCEFILESYSTEM | FOS_PATHMUSTEXIST |
FOS_OVERWRITEPROMPT);
FOS_OVERWRITEPROMPT);
ApplySettings(file_save_dialog, settings);
hr = ShowFileDialog(file_save_dialog, settings);