From f4425afb39c93ae38b9757e9c20320502c0b30dc Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 13 Aug 2013 17:07:25 +0800 Subject: [PATCH] Move accelerator_util to browser/ui. --- atom.gyp | 8 ++++---- browser/api/atom_api_menu.cc | 2 +- browser/{ => ui}/accelerator_util.cc | 2 +- browser/{ => ui}/accelerator_util.h | 6 +++--- browser/{ => ui}/accelerator_util_mac.mm | 2 +- browser/{ => ui}/accelerator_util_win.cc | 2 +- browser/ui/message_box_win.cc | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) rename browser/{ => ui}/accelerator_util.cc (98%) rename browser/{ => ui}/accelerator_util.h (81%) rename browser/{ => ui}/accelerator_util_mac.mm (96%) rename browser/{ => ui}/accelerator_util_win.cc (89%) diff --git a/atom.gyp b/atom.gyp index e954b4656ce6..f24f50f48a8d 100644 --- a/atom.gyp +++ b/atom.gyp @@ -32,10 +32,6 @@ 'lib_sources': [ 'app/atom_main_delegate.cc', 'app/atom_main_delegate.h', - 'browser/accelerator_util.cc', - 'browser/accelerator_util.h', - 'browser/accelerator_util_mac.mm', - 'browser/accelerator_util_win.cc', 'browser/api/atom_api_app.cc', 'browser/api/atom_api_app.h', 'browser/api/atom_api_auto_updater.cc', @@ -98,6 +94,10 @@ 'browser/native_window_win.cc', 'browser/native_window_win.h', 'browser/native_window_observer.h', + 'browser/ui/accelerator_util.cc', + 'browser/ui/accelerator_util.h', + 'browser/ui/accelerator_util_mac.mm', + 'browser/ui/accelerator_util_win.cc', 'browser/ui/file_dialog.h', 'browser/ui/file_dialog_mac.mm', 'browser/ui/file_dialog_win.cc', diff --git a/browser/api/atom_api_menu.cc b/browser/api/atom_api_menu.cc index 25b93e2cb1cb..27879e7993d4 100644 --- a/browser/api/atom_api_menu.cc +++ b/browser/api/atom_api_menu.cc @@ -4,8 +4,8 @@ #include "browser/api/atom_api_menu.h" -#include "browser/accelerator_util.h" #include "browser/api/atom_api_window.h" +#include "browser/ui/accelerator_util.h" #define UNWRAP_MEMNU_AND_CHECK \ Menu* self = ObjectWrap::Unwrap(args.This()); \ diff --git a/browser/accelerator_util.cc b/browser/ui/accelerator_util.cc similarity index 98% rename from browser/accelerator_util.cc rename to browser/ui/accelerator_util.cc index c4dc9967a628..438149ee21ff 100644 --- a/browser/accelerator_util.cc +++ b/browser/ui/accelerator_util.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "browser/accelerator_util.h" +#include "browser/ui/accelerator_util.h" #include diff --git a/browser/accelerator_util.h b/browser/ui/accelerator_util.h similarity index 81% rename from browser/accelerator_util.h rename to browser/ui/accelerator_util.h index f2cd556b0a77..029bfe384227 100644 --- a/browser/accelerator_util.h +++ b/browser/ui/accelerator_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef BROWSER_ACCELERATOR_UTIL_H_ -#define BROWSER_ACCELERATOR_UTIL_H_ +#ifndef BROWSER_UI_ACCELERATOR_UTIL_H_ +#define BROWSER_UI_ACCELERATOR_UTIL_H_ #include @@ -22,4 +22,4 @@ void SetPlatformAccelerator(ui::Accelerator* accelerator); } // namespace accelerator_util -#endif // BROWSER_ACCELERATOR_UTIL_H_ +#endif // BROWSER_UI_ACCELERATOR_UTIL_H_ diff --git a/browser/accelerator_util_mac.mm b/browser/ui/accelerator_util_mac.mm similarity index 96% rename from browser/accelerator_util_mac.mm rename to browser/ui/accelerator_util_mac.mm index 033e79f30882..c7dc2d07b0f8 100644 --- a/browser/accelerator_util_mac.mm +++ b/browser/ui/accelerator_util_mac.mm @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "browser/accelerator_util.h" +#include "browser/ui/accelerator_util.h" #include "ui/base/accelerators/accelerator.h" #import "ui/base/accelerators/platform_accelerator_cocoa.h" diff --git a/browser/accelerator_util_win.cc b/browser/ui/accelerator_util_win.cc similarity index 89% rename from browser/accelerator_util_win.cc rename to browser/ui/accelerator_util_win.cc index 034759b18d9e..d4a861fd18ef 100644 --- a/browser/accelerator_util_win.cc +++ b/browser/ui/accelerator_util_win.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "browser/accelerator_util.h" +#include "browser/ui/accelerator_util.h" #include "ui/base/accelerators/accelerator.h" diff --git a/browser/ui/message_box_win.cc b/browser/ui/message_box_win.cc index 49f84509b399..b3bf27c561fe 100644 --- a/browser/ui/message_box_win.cc +++ b/browser/ui/message_box_win.cc @@ -86,7 +86,7 @@ MessageDialog::MessageDialog(NativeWindow* parent_window, title_(UTF8ToUTF16(title)), widget_(NULL), message_box_view_(NULL) { - DCHECK(buttons.size() > 0); + DCHECK_GT(buttons.size(), 0); set_owned_by_client(); views::MessageBoxView::InitParams params(UTF8ToUTF16(title));