From 5f1c76c688b85e30a5ad6e87e775107b18af13e9 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 10 Jan 2018 14:45:42 +0900 Subject: [PATCH] Reorgnize the platform-specific files --- atom/browser/api/atom_api_in_app_purchase.cc | 3 ++- atom/browser/api/atom_api_in_app_purchase.h | 4 ++-- atom/browser/{ => mac}/in_app_purchase.h | 6 +++--- .../in_app_purchase.mm} | 3 ++- .../{ => mac}/in_app_purchase_observer.h | 6 +++--- .../in_app_purchase_observer.mm} | 3 ++- filenames.gypi | 17 ++++------------- 7 files changed, 18 insertions(+), 24 deletions(-) rename atom/browser/{ => mac}/in_app_purchase.h (83%) rename atom/browser/{in_app_purchase_mac.mm => mac/in_app_purchase.mm} (98%) rename atom/browser/{ => mac}/in_app_purchase_observer.h (85%) rename atom/browser/{in_app_purchase_observer_mac.mm => mac/in_app_purchase_observer.mm} (98%) diff --git a/atom/browser/api/atom_api_in_app_purchase.cc b/atom/browser/api/atom_api_in_app_purchase.cc index 21bad43ee04..c6815c8c065 100644 --- a/atom/browser/api/atom_api_in_app_purchase.cc +++ b/atom/browser/api/atom_api_in_app_purchase.cc @@ -2,11 +2,12 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. +#include "atom/browser/api/atom_api_in_app_purchase.h" + #include #include #include -#include "atom/browser/api/atom_api_in_app_purchase.h" #include "atom/common/native_mate_converters/callback.h" #include "native_mate/dictionary.h" diff --git a/atom/browser/api/atom_api_in_app_purchase.h b/atom/browser/api/atom_api_in_app_purchase.h index b1feb7ec266..7362f7da6ee 100644 --- a/atom/browser/api/atom_api_in_app_purchase.h +++ b/atom/browser/api/atom_api_in_app_purchase.h @@ -7,8 +7,8 @@ #include -#include "atom/browser/in_app_purchase.h" -#include "atom/browser/in_app_purchase_observer.h" +#include "atom/browser/mac/in_app_purchase.h" +#include "atom/browser/mac/in_app_purchase_observer.h" #include "native_mate/dictionary.h" namespace mate { diff --git a/atom/browser/in_app_purchase.h b/atom/browser/mac/in_app_purchase.h similarity index 83% rename from atom/browser/in_app_purchase.h rename to atom/browser/mac/in_app_purchase.h index d4957e8c97f..fc4177affe5 100644 --- a/atom/browser/in_app_purchase.h +++ b/atom/browser/mac/in_app_purchase.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef ATOM_BROWSER_IN_APP_PURCHASE_H_ -#define ATOM_BROWSER_IN_APP_PURCHASE_H_ +#ifndef ATOM_BROWSER_MAC_IN_APP_PURCHASE_H_ +#define ATOM_BROWSER_MAC_IN_APP_PURCHASE_H_ #include @@ -27,4 +27,4 @@ void PurchaseProduct(const std::string& productID, } // namespace in_app_purchase -#endif // ATOM_BROWSER_IN_APP_PURCHASE_H_ +#endif // ATOM_BROWSER_MAC_IN_APP_PURCHASE_H_ diff --git a/atom/browser/in_app_purchase_mac.mm b/atom/browser/mac/in_app_purchase.mm similarity index 98% rename from atom/browser/in_app_purchase_mac.mm rename to atom/browser/mac/in_app_purchase.mm index 5f4c994a0bc..c3ff67f462e 100644 --- a/atom/browser/in_app_purchase_mac.mm +++ b/atom/browser/mac/in_app_purchase.mm @@ -2,7 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#include "atom/browser/in_app_purchase.h" +#include "atom/browser/mac/in_app_purchase.h" + #include "base/bind.h" #include "base/strings/sys_string_conversions.h" #include "content/public/browser/browser_thread.h" diff --git a/atom/browser/in_app_purchase_observer.h b/atom/browser/mac/in_app_purchase_observer.h similarity index 85% rename from atom/browser/in_app_purchase_observer.h rename to atom/browser/mac/in_app_purchase_observer.h index 4b9f1d7b984..fadd9037eb8 100644 --- a/atom/browser/in_app_purchase_observer.h +++ b/atom/browser/mac/in_app_purchase_observer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef ATOM_BROWSER_IN_APP_PURCHASE_OBSERVER_H_ -#define ATOM_BROWSER_IN_APP_PURCHASE_OBSERVER_H_ +#ifndef ATOM_BROWSER_MAC_IN_APP_PURCHASE_OBSERVER_H_ +#define ATOM_BROWSER_MAC_IN_APP_PURCHASE_OBSERVER_H_ #include @@ -38,4 +38,4 @@ void AddTransactionObserver(const InAppTransactionCallback& callback); } // namespace in_app_purchase -#endif // ATOM_BROWSER_IN_APP_PURCHASE_OBSERVER_H_ +#endif // ATOM_BROWSER_MAC_IN_APP_PURCHASE_OBSERVER_H_ diff --git a/atom/browser/in_app_purchase_observer_mac.mm b/atom/browser/mac/in_app_purchase_observer.mm similarity index 98% rename from atom/browser/in_app_purchase_observer_mac.mm rename to atom/browser/mac/in_app_purchase_observer.mm index 0ec1b9bb613..a56f6b72298 100644 --- a/atom/browser/in_app_purchase_observer_mac.mm +++ b/atom/browser/mac/in_app_purchase_observer.mm @@ -2,7 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#include "atom/browser/in_app_purchase_observer.h" +#include "atom/browser/mac/in_app_purchase_observer.h" + #include "base/bind.h" #include "base/strings/sys_string_conversions.h" #include "content/public/browser/browser_thread.h" diff --git a/filenames.gypi b/filenames.gypi index 7b8d9637bb5..40babc685d3 100644 --- a/filenames.gypi +++ b/filenames.gypi @@ -187,10 +187,6 @@ 'atom/browser/atom_browser_context.h', 'atom/browser/atom_download_manager_delegate.cc', 'atom/browser/atom_download_manager_delegate.h', - 'atom/browser/in_app_purchase.h', - 'atom/browser/in_app_purchase_mac.mm', - 'atom/browser/in_app_purchase_observer.h', - 'atom/browser/in_app_purchase_observer_mac.mm', 'atom/browser/atom_browser_main_parts.cc', 'atom/browser/atom_browser_main_parts.h', 'atom/browser/atom_browser_main_parts_mac.mm', @@ -238,6 +234,10 @@ 'atom/browser/mac/atom_application_delegate.mm', 'atom/browser/mac/dict_util.h', 'atom/browser/mac/dict_util.mm', + 'atom/browser/mac/in_app_purchase.h', + 'atom/browser/mac/in_app_purchase.mm', + 'atom/browser/mac/in_app_purchase_observer.h', + 'atom/browser/mac/in_app_purchase_observer.mm', 'atom/browser/native_browser_view.cc', 'atom/browser/native_browser_view.h', 'atom/browser/native_browser_view_mac.h', @@ -733,15 +733,6 @@ 'atom/browser/osr/osr_view_proxy.h', ], }], # enable_osr==1 - ['OS=="mac"', { - 'app_sources': [ - 'atom/browser/in_app_purchase.h', - 'atom/browser/in_app_purchase_mac.mm', - 'atom/browser/in_app_purchase_observer.h', - 'atom/browser/in_app_purchase_observer_mac.mm' - ], - }], # OS=="mac" - ], }, }