build: fix building with enable_remote_module = false (#23499)

This commit is contained in:
Milan Burda 2020-05-12 18:32:04 +02:00 committed by GitHub
parent 633f3c2413
commit ef176ce368
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 13 additions and 13 deletions

View file

@ -581,8 +581,6 @@ source_set("electron_lib") {
if (enable_remote_module) { if (enable_remote_module) {
sources += [ sources += [
"shell/common/api/remote/object_life_monitor.cc",
"shell/common/api/remote/object_life_monitor.h",
"shell/common/api/remote/remote_callback_freer.cc", "shell/common/api/remote/remote_callback_freer.cc",
"shell/common/api/remote/remote_callback_freer.h", "shell/common/api/remote/remote_callback_freer.h",
"shell/common/api/remote/remote_object_freer.cc", "shell/common/api/remote/remote_object_freer.cc",

View file

@ -454,6 +454,8 @@ filenames = {
"shell/common/api/electron_bindings.cc", "shell/common/api/electron_bindings.cc",
"shell/common/api/electron_bindings.h", "shell/common/api/electron_bindings.h",
"shell/common/api/features.cc", "shell/common/api/features.cc",
"shell/common/api/object_life_monitor.cc",
"shell/common/api/object_life_monitor.h",
"shell/common/application_info.cc", "shell/common/application_info.cc",
"shell/common/application_info.h", "shell/common/application_info.h",
"shell/common/application_info_linux.cc", "shell/common/application_info_linux.cc",

View file

@ -127,12 +127,12 @@ void Initialize(v8::Local<v8::Object> exports,
&electron::RemoteCallbackFreer::BindTo); &electron::RemoteCallbackFreer::BindTo);
dict.SetMethod("setRemoteObjectFreer", &electron::RemoteObjectFreer::BindTo); dict.SetMethod("setRemoteObjectFreer", &electron::RemoteObjectFreer::BindTo);
dict.SetMethod("addRemoteObjectRef", &electron::RemoteObjectFreer::AddRef); dict.SetMethod("addRemoteObjectRef", &electron::RemoteObjectFreer::AddRef);
dict.SetMethod("createIDWeakMap",
&electron::api::KeyWeakMap<int32_t>::Create);
dict.SetMethod( dict.SetMethod(
"createDoubleIDWeakMap", "createDoubleIDWeakMap",
&electron::api::KeyWeakMap<std::pair<std::string, int32_t>>::Create); &electron::api::KeyWeakMap<std::pair<std::string, int32_t>>::Create);
#endif #endif
dict.SetMethod("createIDWeakMap",
&electron::api::KeyWeakMap<int32_t>::Create);
dict.SetMethod("requestGarbageCollectionForTesting", dict.SetMethod("requestGarbageCollectionForTesting",
&RequestGarbageCollectionForTesting); &RequestGarbageCollectionForTesting);
dict.SetMethod("isSameOrigin", &IsSameOrigin); dict.SetMethod("isSameOrigin", &IsSameOrigin);

View file

@ -3,7 +3,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/common/api/remote/object_life_monitor.h" #include "shell/common/api/object_life_monitor.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_COMMON_API_REMOTE_OBJECT_LIFE_MONITOR_H_ #ifndef SHELL_COMMON_API_OBJECT_LIFE_MONITOR_H_
#define SHELL_COMMON_API_REMOTE_OBJECT_LIFE_MONITOR_H_ #define SHELL_COMMON_API_OBJECT_LIFE_MONITOR_H_
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
@ -31,4 +31,4 @@ class ObjectLifeMonitor {
} // namespace electron } // namespace electron
#endif // SHELL_COMMON_API_REMOTE_OBJECT_LIFE_MONITOR_H_ #endif // SHELL_COMMON_API_OBJECT_LIFE_MONITOR_H_

View file

@ -8,7 +8,7 @@
#include <string> #include <string>
#include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_observer.h"
#include "shell/common/api/remote/object_life_monitor.h" #include "shell/common/api/object_life_monitor.h"
namespace electron { namespace electron {

View file

@ -8,7 +8,7 @@
#include <map> #include <map>
#include <string> #include <string>
#include "shell/common/api/remote/object_life_monitor.h" #include "shell/common/api/object_life_monitor.h"
namespace electron { namespace electron {

View file

@ -6,7 +6,7 @@
#include <utility> #include <utility>
#include "shell/common/api/remote/object_life_monitor.h" #include "shell/common/api/object_life_monitor.h"
namespace electron { namespace electron {

View file

@ -6,7 +6,7 @@
#include <utility> #include <utility>
#include "shell/common/api/remote/object_life_monitor.h" #include "shell/common/api/object_life_monitor.h"
namespace electron { namespace electron {

View file

@ -15,7 +15,7 @@
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
#include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_frame_observer.h" #include "content/public/renderer/render_frame_observer.h"
#include "shell/common/api/remote/object_life_monitor.h" #include "shell/common/api/object_life_monitor.h"
#include "shell/common/gin_converters/blink_converter.h" #include "shell/common/gin_converters/blink_converter.h"
#include "shell/common/gin_converters/callback_converter.h" #include "shell/common/gin_converters/callback_converter.h"
#include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/dictionary.h"