Browse Source

chore: clean up forward declarations (#29904)

David Sanders 3 years ago
parent
commit
f6531166ae
78 changed files with 133 additions and 109 deletions
  1. 2 2
      shell/app/uv_task_runner.cc
  2. 4 1
      shell/app/uv_task_runner.h
  3. 0 2
      shell/browser/api/electron_api_browser_view.h
  4. 0 4
      shell/browser/api/electron_api_cookies.h
  5. 1 0
      shell/browser/api/electron_api_download_item.cc
  6. 2 1
      shell/browser/api/electron_api_download_item.h
  7. 1 0
      shell/browser/api/electron_api_protocol.cc
  8. 1 0
      shell/browser/api/electron_api_system_preferences_mac.mm
  9. 0 1
      shell/browser/api/electron_api_tray.h
  10. 0 2
      shell/browser/api/electron_api_web_contents_view.h
  11. 0 4
      shell/browser/api/electron_api_web_frame_main.h
  12. 0 4
      shell/browser/api/event.h
  13. 2 1
      shell/browser/api/frame_subscriber.h
  14. 2 2
      shell/browser/bluetooth/electron_bluetooth_delegate.h
  15. 0 4
      shell/browser/browser.h
  16. 1 1
      shell/browser/browser_process_impl.h
  17. 0 2
      shell/browser/electron_browser_context.h
  18. 1 1
      shell/browser/electron_browser_handler_impl.h
  19. 1 0
      shell/browser/electron_browser_main_parts.cc
  20. 6 5
      shell/browser/electron_browser_main_parts.h
  21. 1 0
      shell/browser/electron_browser_main_parts_posix.cc
  22. 3 3
      shell/browser/electron_javascript_dialog_manager.h
  23. 1 0
      shell/browser/electron_permission_manager.cc
  24. 5 1
      shell/browser/electron_permission_manager.h
  25. 2 0
      shell/browser/electron_quota_permission_context.cc
  26. 4 1
      shell/browser/electron_quota_permission_context.h
  27. 1 0
      shell/browser/electron_web_ui_controller_factory.cc
  28. 4 1
      shell/browser/electron_web_ui_controller_factory.h
  29. 1 1
      shell/browser/extensions/api/runtime/electron_runtime_api_delegate.h
  30. 1 0
      shell/browser/extensions/api/tabs/tabs_api.cc
  31. 2 1
      shell/browser/extensions/api/tabs/tabs_api.h
  32. 2 2
      shell/browser/extensions/electron_extension_loader.h
  33. 1 0
      shell/browser/native_window.cc
  34. 3 3
      shell/browser/native_window.h
  35. 1 0
      shell/browser/native_window_mac.mm
  36. 2 1
      shell/browser/native_window_observer.h
  37. 1 1
      shell/browser/net/network_context_service_factory.h
  38. 0 4
      shell/browser/net/system_network_context_manager.h
  39. 1 1
      shell/browser/osr/osr_render_widget_host_view.h
  40. 2 0
      shell/browser/pref_store_delegate.cc
  41. 5 1
      shell/browser/pref_store_delegate.h
  42. 1 1
      shell/browser/protocol_registry.h
  43. 1 1
      shell/browser/serial/serial_chooser_controller.h
  44. 1 0
      shell/browser/session_preferences.cc
  45. 4 1
      shell/browser/session_preferences.h
  46. 1 1
      shell/browser/ui/certificate_trust.h
  47. 0 2
      shell/browser/ui/devtools_ui.h
  48. 0 4
      shell/browser/ui/tray_icon_gtk.h
  49. 0 4
      shell/browser/web_contents_preferences.h
  50. 1 0
      shell/browser/zoom_level_delegate.cc
  51. 2 2
      shell/browser/zoom_level_delegate.h
  52. 2 0
      shell/common/api/electron_api_native_image_win.cc
  53. 0 1
      shell/common/extensions/electron_extensions_client.h
  54. 0 1
      shell/common/gin_converters/blink_converter.h
  55. 1 1
      shell/common/gin_converters/extension_converter.h
  56. 1 1
      shell/common/gin_converters/frame_converter.h
  57. 0 6
      shell/common/gin_converters/net_converter.h
  58. 1 1
      shell/common/gin_helper/wrappable_base.h
  59. 2 0
      shell/common/heap_snapshot.cc
  60. 7 2
      shell/common/heap_snapshot.h
  61. 1 0
      shell/common/node_bindings.cc
  62. 1 2
      shell/common/node_bindings.h
  63. 1 1
      shell/common/node_util.h
  64. 1 0
      shell/common/process_util.cc
  65. 3 1
      shell/common/process_util.h
  66. 1 0
      shell/common/skia_util.cc
  67. 7 1
      shell/common/skia_util.h
  68. 2 2
      shell/renderer/browser_exposed_renderer_interfaces.h
  69. 1 0
      shell/renderer/electron_render_frame_observer.cc
  70. 2 5
      shell/renderer/electron_render_frame_observer.h
  71. 1 1
      shell/renderer/electron_renderer_client.h
  72. 1 0
      shell/renderer/electron_sandboxed_renderer_client.cc
  73. 8 1
      shell/renderer/electron_sandboxed_renderer_client.h
  74. 1 0
      shell/renderer/guest_view_container.cc
  75. 4 1
      shell/renderer/guest_view_container.h
  76. 1 0
      shell/renderer/renderer_client_base.cc
  77. 4 6
      shell/renderer/renderer_client_base.h
  78. 1 1
      shell/utility/electron_content_utility_client.h

+ 2 - 2
shell/app/uv_task_runner.cc

@@ -4,9 +4,9 @@
 
 #include <utility>
 
-#include "shell/app/uv_task_runner.h"
-
+#include "base/location.h"
 #include "base/stl_util.h"
+#include "shell/app/uv_task_runner.h"
 
 namespace electron {
 

+ 4 - 1
shell/app/uv_task_runner.h

@@ -8,10 +8,13 @@
 #include <map>
 
 #include "base/callback.h"
-#include "base/location.h"
 #include "base/single_thread_task_runner.h"
 #include "uv.h"  // NOLINT(build/include_directory)
 
+namespace base {
+class Location;
+}
+
 namespace electron {
 
 // TaskRunner implementation that posts tasks into libuv's default loop.

+ 0 - 2
shell/browser/api/electron_api_browser_view.h

@@ -29,8 +29,6 @@ class Dictionary;
 
 namespace electron {
 
-class NativeBrowserView;
-
 namespace api {
 
 class WebContents;

+ 0 - 4
shell/browser/api/electron_api_cookies.h

@@ -23,10 +23,6 @@ namespace gin_helper {
 class Dictionary;
 }
 
-namespace net {
-class URLRequestContextGetter;
-}
-
 namespace electron {
 
 class ElectronBrowserContext;

+ 1 - 0
shell/browser/api/electron_api_download_item.cc

@@ -16,6 +16,7 @@
 #include "shell/common/gin_helper/dictionary.h"
 #include "shell/common/gin_helper/object_template_builder.h"
 #include "shell/common/node_includes.h"
+#include "url/gurl.h"
 
 namespace gin {
 

+ 2 - 1
shell/browser/api/electron_api_download_item.h

@@ -15,7 +15,8 @@
 #include "shell/browser/event_emitter_mixin.h"
 #include "shell/browser/ui/file_dialog.h"
 #include "shell/common/gin_helper/pinnable.h"
-#include "url/gurl.h"
+
+class GURL;
 
 namespace electron {
 

+ 1 - 0
shell/browser/api/electron_api_protocol.cc

@@ -19,6 +19,7 @@
 #include "shell/common/gin_helper/dictionary.h"
 #include "shell/common/gin_helper/object_template_builder.h"
 #include "shell/common/gin_helper/promise.h"
+#include "shell/common/node_includes.h"
 #include "shell/common/options_switches.h"
 #include "shell/common/process_util.h"
 #include "url/url_util.h"

+ 1 - 0
shell/browser/api/electron_api_system_preferences_mac.mm

@@ -29,6 +29,7 @@
 #include "shell/common/color_util.h"
 #include "shell/common/gin_converters/gurl_converter.h"
 #include "shell/common/gin_converters/value_converter.h"
+#include "shell/common/node_includes.h"
 #include "shell/common/process_util.h"
 #include "skia/ext/skia_utils_mac.h"
 #include "ui/native_theme/native_theme.h"

+ 0 - 1
shell/browser/api/electron_api_tray.h

@@ -33,7 +33,6 @@ namespace electron {
 namespace api {
 
 class Menu;
-class NativeImage;
 
 class Tray : public gin::Wrappable<Tray>,
              public gin_helper::EventEmitterMixin<Tray>,

+ 0 - 2
shell/browser/api/electron_api_web_contents_view.h

@@ -14,8 +14,6 @@ class Dictionary;
 
 namespace electron {
 
-class InspectableWebContents;
-
 namespace api {
 
 class WebContents;

+ 0 - 4
shell/browser/api/electron_api_web_frame_main.h

@@ -27,10 +27,6 @@ namespace gin {
 class Arguments;
 }
 
-namespace gin_helper {
-class Dictionary;
-}
-
 namespace electron {
 
 namespace api {

+ 0 - 4
shell/browser/api/event.h

@@ -9,10 +9,6 @@
 #include "gin/handle.h"
 #include "gin/wrappable.h"
 
-namespace IPC {
-class Message;
-}
-
 namespace gin_helper {
 
 class Event : public gin::Wrappable<Event> {

+ 2 - 1
shell/browser/api/frame_subscriber.h

@@ -18,7 +18,8 @@
 
 namespace gfx {
 class Image;
-}
+class Rect;
+}  // namespace gfx
 
 namespace electron {
 

+ 2 - 2
shell/browser/bluetooth/electron_bluetooth_delegate.h

@@ -17,11 +17,11 @@
 
 namespace blink {
 class WebBluetoothDeviceId;
-}  // namespace blink
+}
 
 namespace content {
 class RenderFrameHost;
-}  // namespace content
+}
 
 namespace device {
 class BluetoothDevice;

+ 0 - 4
shell/browser/browser.h

@@ -33,10 +33,6 @@ namespace base {
 class FilePath;
 }
 
-namespace gfx {
-class Image;
-}
-
 namespace gin_helper {
 class Arguments;
 }

+ 1 - 1
shell/browser/browser_process_impl.h

@@ -26,7 +26,7 @@ namespace printing {
 class PrintJobManager;
 }
 
-// Empty definition for std::unique_ptr
+// Empty definition for std::unique_ptr, rather than a forward declaration
 class BackgroundModeManager {};
 
 // NOT THREAD SAFE, call only from the main thread.

+ 0 - 2
shell/browser/electron_browser_context.h

@@ -18,7 +18,6 @@
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
 #include "shell/browser/media/media_device_id_salt.h"
 
-class PrefRegistrySimple;
 class PrefService;
 class ValueMapPrefStore;
 
@@ -43,7 +42,6 @@ class ElectronDownloadManagerDelegate;
 class ElectronPermissionManager;
 class CookieChangeNotifier;
 class ResolveProxyHelper;
-class SpecialStoragePolicy;
 class WebViewManager;
 class ProtocolRegistry;
 

+ 1 - 1
shell/browser/electron_browser_handler_impl.h

@@ -16,7 +16,7 @@
 
 namespace content {
 class RenderFrameHost;
-}  // namespace content
+}
 
 namespace electron {
 class ElectronBrowserHandlerImpl : public mojom::ElectronBrowser,

+ 1 - 0
shell/browser/electron_browser_main_parts.cc

@@ -11,6 +11,7 @@
 #include "base/base_switches.h"
 #include "base/command_line.h"
 #include "base/feature_list.h"
+#include "base/metrics/field_trial.h"
 #include "base/path_service.h"
 #include "base/run_loop.h"
 #include "base/strings/string_number_conversions.h"

+ 6 - 5
shell/browser/electron_browser_main_parts.h

@@ -9,7 +9,6 @@
 #include <string>
 
 #include "base/callback.h"
-#include "base/metrics/field_trial.h"
 #include "base/timer/timer.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_main_parts.h"
@@ -20,9 +19,13 @@
 #include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/views/layout/layout_provider.h"
 
-class BrowserProcess;
+class BrowserProcessImpl;
 class IconManager;
 
+namespace base {
+class FieldTrialList;
+}
+
 #if defined(USE_AURA)
 namespace wm {
 class WMState;
@@ -41,17 +44,15 @@ class GtkUiPlatform;
 
 namespace device {
 class GeolocationManager;
-}  // namespace device
+}
 
 namespace electron {
 
-class ElectronBrowserContext;
 class Browser;
 class ElectronBindings;
 class JavascriptEnvironment;
 class NodeBindings;
 class NodeEnvironment;
-class BridgeTaskRunner;
 
 #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
 class ElectronExtensionsClient;

+ 1 - 0
shell/browser/electron_browser_main_parts_posix.cc

@@ -13,6 +13,7 @@
 #include <sys/resource.h>
 #include <unistd.h>
 
+#include "base/debug/leak_annotations.h"
 #include "base/posix/eintr_wrapper.h"
 #include "base/task/post_task.h"
 #include "content/public/browser/browser_task_traits.h"

+ 3 - 3
shell/browser/electron_javascript_dialog_manager.h

@@ -10,12 +10,12 @@
 
 #include "content/public/browser/javascript_dialog_manager.h"
 
-namespace electron {
-
-namespace api {
+namespace content {
 class WebContents;
 }
 
+namespace electron {
+
 class ElectronJavaScriptDialogManager
     : public content::JavaScriptDialogManager {
  public:

+ 1 - 0
shell/browser/electron_permission_manager.cc

@@ -8,6 +8,7 @@
 #include <utility>
 #include <vector>
 
+#include "base/values.h"
 #include "content/public/browser/child_process_security_policy.h"
 #include "content/public/browser/global_routing_id.h"
 #include "content/public/browser/permission_controller.h"

+ 5 - 1
shell/browser/electron_permission_manager.h

@@ -10,9 +10,13 @@
 
 #include "base/callback.h"
 #include "base/containers/id_map.h"
-#include "base/values.h"
 #include "content/public/browser/permission_controller_delegate.h"
 
+namespace base {
+class DictionaryValue;
+class Value;
+}  // namespace base
+
 namespace content {
 class WebContents;
 }

+ 2 - 0
shell/browser/electron_quota_permission_context.cc

@@ -6,6 +6,8 @@
 
 #include <utility>
 
+#include "content/public/common/storage_quota_params.h"
+
 namespace electron {
 
 ElectronQuotaPermissionContext::ElectronQuotaPermissionContext() = default;

+ 4 - 1
shell/browser/electron_quota_permission_context.h

@@ -6,7 +6,10 @@
 #define SHELL_BROWSER_ELECTRON_QUOTA_PERMISSION_CONTEXT_H_
 
 #include "content/public/browser/quota_permission_context.h"
-#include "content/public/common/storage_quota_params.h"
+
+namespace content {
+struct StorageQuotaParams;
+}
 
 namespace electron {
 

+ 1 - 0
shell/browser/electron_web_ui_controller_factory.cc

@@ -6,6 +6,7 @@
 
 #include "chrome/common/webui_url_constants.h"
 #include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_ui_controller.h"
 #include "electron/buildflags/buildflags.h"
 #include "shell/browser/ui/devtools_ui.h"
 #include "shell/browser/ui/webui/accessibility_ui.h"

+ 4 - 1
shell/browser/electron_web_ui_controller_factory.h

@@ -9,9 +9,12 @@
 
 #include "base/macros.h"
 #include "base/memory/singleton.h"
-#include "content/public/browser/web_ui_controller.h"
 #include "content/public/browser/web_ui_controller_factory.h"
 
+namespace content {
+class WebUIController;
+}
+
 namespace electron {
 
 class ElectronWebUIControllerFactory : public content::WebUIControllerFactory {

+ 1 - 1
shell/browser/extensions/api/runtime/electron_runtime_api_delegate.h

@@ -12,7 +12,7 @@
 
 namespace content {
 class BrowserContext;
-}  // namespace content
+}
 
 namespace extensions {
 

+ 1 - 0
shell/browser/extensions/api/tabs/tabs_api.cc

@@ -16,6 +16,7 @@
 #include "shell/browser/web_contents_zoom_controller.h"
 #include "shell/common/extensions/api/tabs.h"
 #include "third_party/blink/public/common/page/page_zoom.h"
+#include "url/gurl.h"
 
 using electron::WebContentsZoomController;
 

+ 2 - 1
shell/browser/extensions/api/tabs/tabs_api.h

@@ -10,7 +10,8 @@
 #include "extensions/browser/api/execute_code_function.h"
 #include "extensions/browser/extension_function.h"
 #include "extensions/common/extension_resource.h"
-#include "url/gurl.h"
+
+class GURL;
 
 namespace extensions {
 

+ 2 - 2
shell/browser/extensions/electron_extension_loader.h

@@ -17,11 +17,11 @@
 
 namespace base {
 class FilePath;
-}  // namespace base
+}
 
 namespace content {
 class BrowserContext;
-}  // namespace content
+}
 
 namespace extensions {
 

+ 1 - 0
shell/browser/native_window.cc

@@ -10,6 +10,7 @@
 
 #include "base/memory/ptr_util.h"
 #include "base/strings/utf_string_conversions.h"
+#include "base/values.h"
 #include "shell/browser/browser.h"
 #include "shell/browser/window_list.h"
 #include "shell/common/color_util.h"

+ 3 - 3
shell/browser/native_window.h

@@ -13,7 +13,6 @@
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/supports_user_data.h"
-#include "base/values.h"
 #include "content/public/browser/desktop_media_id.h"
 #include "content/public/browser/web_contents_user_data.h"
 #include "extensions/browser/app_window/size_constraints.h"
@@ -21,7 +20,9 @@
 #include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/views/widget/widget_delegate.h"
 
-class SkRegion;
+namespace base {
+class DictionaryValue;
+}
 
 namespace content {
 struct NativeWebKeyboardEvent;
@@ -31,7 +32,6 @@ namespace gfx {
 class Image;
 class Point;
 class Rect;
-class RectF;
 enum class ResizeEdge;
 class Size;
 }  // namespace gfx

+ 1 - 0
shell/browser/native_window_mac.mm

@@ -38,6 +38,7 @@
 #include "shell/browser/window_list.h"
 #include "shell/common/gin_converters/gfx_converter.h"
 #include "shell/common/gin_helper/dictionary.h"
+#include "shell/common/node_includes.h"
 #include "shell/common/options_switches.h"
 #include "shell/common/process_util.h"
 #include "skia/ext/skia_utils_mac.h"

+ 2 - 1
shell/browser/native_window_observer.h

@@ -10,12 +10,13 @@
 #include "base/observer_list_types.h"
 #include "base/values.h"
 #include "ui/base/window_open_disposition.h"
-#include "url/gurl.h"
 
 #if defined(OS_WIN)
 #include <windows.h>
 #endif
 
+class GURL;
+
 namespace gfx {
 class Rect;
 enum class ResizeEdge;

+ 1 - 1
shell/browser/net/network_context_service_factory.h

@@ -10,7 +10,7 @@
 
 class KeyedService;
 
-namespace contenet {
+namespace content {
 class BrowserContext;
 }
 

+ 0 - 4
shell/browser/net/system_network_context_manager.h

@@ -16,10 +16,6 @@
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
 #include "third_party/abseil-cpp/absl/types/optional.h"
 
-namespace net_log {
-class NetExportFileWriter;
-}
-
 namespace electron {
 network::mojom::HttpAuthDynamicParamsPtr CreateHttpAuthDynamicParams();
 }

+ 1 - 1
shell/browser/osr/osr_render_widget_host_view.h

@@ -43,7 +43,7 @@
 
 namespace content {
 class CursorManager;
-}  // namespace content
+}
 
 namespace electron {
 

+ 2 - 0
shell/browser/pref_store_delegate.cc

@@ -6,6 +6,8 @@
 
 #include <utility>
 
+#include "components/prefs/persistent_pref_store.h"
+#include "components/prefs/pref_store.h"
 #include "components/prefs/value_map_pref_store.h"
 #include "shell/browser/electron_browser_context.h"
 

+ 5 - 1
shell/browser/pref_store_delegate.h

@@ -9,9 +9,13 @@
 
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "components/prefs/persistent_pref_store.h"
 #include "components/prefs/pref_value_store.h"
 
+class PersistentPrefStore;
+class PrefNotifier;
+class PrefRegistry;
+class PrefStore;
+
 namespace electron {
 
 class ElectronBrowserContext;

+ 1 - 1
shell/browser/protocol_registry.h

@@ -12,7 +12,7 @@
 
 namespace content {
 class BrowserContext;
-}  // namespace content
+}
 
 namespace electron {
 

+ 1 - 1
shell/browser/serial/serial_chooser_controller.h

@@ -21,7 +21,7 @@
 
 namespace content {
 class RenderFrameHost;
-}  // namespace content
+}
 
 namespace electron {
 

+ 1 - 0
shell/browser/session_preferences.cc

@@ -6,6 +6,7 @@
 
 #include "base/logging.h"
 #include "base/memory/ptr_util.h"
+#include "content/public/browser/browser_context.h"
 
 namespace electron {
 

+ 4 - 1
shell/browser/session_preferences.h

@@ -9,7 +9,10 @@
 
 #include "base/files/file_path.h"
 #include "base/supports_user_data.h"
-#include "content/public/browser/browser_context.h"
+
+namespace content {
+class BrowserContext;
+}
 
 namespace electron {
 

+ 1 - 1
shell/browser/ui/certificate_trust.h

@@ -14,7 +14,7 @@
 
 namespace electron {
 class NativeWindow;
-}  // namespace electron
+}
 
 namespace certificate_trust {
 

+ 0 - 2
shell/browser/ui/devtools_ui.h

@@ -11,8 +11,6 @@
 
 namespace electron {
 
-class BrowserContext;
-
 class DevToolsUI : public content::WebUIController {
  public:
   explicit DevToolsUI(content::BrowserContext* browser_context,

+ 0 - 4
shell/browser/ui/tray_icon_gtk.h

@@ -11,10 +11,6 @@
 #include "shell/browser/ui/tray_icon.h"
 #include "ui/views/linux_ui/status_icon_linux.h"
 
-namespace views {
-class StatusIconLinux;
-}
-
 namespace electron {
 
 class TrayIconGtk : public TrayIcon, public views::StatusIconLinux::Delegate {

+ 0 - 4
shell/browser/web_contents_preferences.h

@@ -15,10 +15,6 @@ namespace base {
 class CommandLine;
 }
 
-namespace content {
-struct WebPreferences;
-}
-
 namespace gin_helper {
 class Dictionary;
 }

+ 1 - 0
shell/browser/zoom_level_delegate.cc

@@ -9,6 +9,7 @@
 #include <vector>
 
 #include "base/bind.h"
+#include "base/files/file_path.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/values.h"
 #include "components/prefs/json_pref_store.h"

+ 2 - 2
shell/browser/zoom_level_delegate.h

@@ -7,7 +7,6 @@
 
 #include <string>
 
-#include "base/files/file_path.h"
 #include "base/macros.h"
 #include "components/prefs/pref_service.h"
 #include "content/public/browser/host_zoom_map.h"
@@ -15,7 +14,8 @@
 
 namespace base {
 class DictionaryValue;
-}
+class FilePath;
+}  // namespace base
 
 class PrefRegistrySimple;
 

+ 2 - 0
shell/common/api/electron_api_native_image_win.cc

@@ -12,7 +12,9 @@
 #include "shell/common/gin_converters/image_converter.h"
 #include "shell/common/gin_helper/promise.h"
 #include "shell/common/skia_util.h"
+#include "third_party/skia/include/core/SkBitmap.h"
 #include "ui/gfx/icon_util.h"
+#include "ui/gfx/image/image_skia.h"
 
 namespace electron {
 

+ 0 - 1
shell/common/extensions/electron_extensions_client.h

@@ -17,7 +17,6 @@ class APIPermissionSet;
 class Extension;
 class PermissionMessageProvider;
 class PermissionIDSet;
-class ScriptingWhitelist;
 class URLPatternSet;
 }  // namespace extensions
 

+ 0 - 1
shell/common/gin_converters/blink_converter.h

@@ -17,7 +17,6 @@ class WebMouseEvent;
 class WebMouseWheelEvent;
 class WebKeyboardEvent;
 struct DeviceEmulationParams;
-struct WebSize;
 }  // namespace blink
 
 namespace gin {

+ 1 - 1
shell/common/gin_converters/extension_converter.h

@@ -11,7 +11,7 @@
 
 namespace extensions {
 class Extension;
-}  // namespace extensions
+}
 
 namespace gin {
 

+ 1 - 1
shell/common/gin_converters/frame_converter.h

@@ -9,7 +9,7 @@
 
 namespace content {
 class RenderFrameHost;
-}  // namespace content
+}
 
 namespace gin {
 

+ 0 - 6
shell/common/gin_converters/net_converter.h

@@ -13,14 +13,8 @@
 #include "services/network/public/mojom/fetch_api.mojom.h"
 #include "shell/browser/net/cert_verifier_client.h"
 
-namespace base {
-class DictionaryValue;
-class ListValue;
-}  // namespace base
-
 namespace net {
 class AuthChallengeInfo;
-class URLRequest;
 class X509Certificate;
 class HttpResponseHeaders;
 struct CertPrincipal;

+ 1 - 1
shell/common/gin_helper/wrappable_base.h

@@ -9,7 +9,7 @@
 
 namespace gin {
 class Arguments;
-}  // namespace gin
+}
 
 namespace gin_helper {
 

+ 2 - 0
shell/common/heap_snapshot.cc

@@ -4,7 +4,9 @@
 
 #include "shell/common/heap_snapshot.h"
 
+#include "base/files/file.h"
 #include "v8/include/v8-profiler.h"
+#include "v8/include/v8.h"
 
 namespace {
 

+ 7 - 2
shell/common/heap_snapshot.h

@@ -5,8 +5,13 @@
 #ifndef SHELL_COMMON_HEAP_SNAPSHOT_H_
 #define SHELL_COMMON_HEAP_SNAPSHOT_H_
 
-#include "base/files/file.h"
-#include "v8/include/v8.h"
+namespace base {
+class File;
+}
+
+namespace v8 {
+class Isolate;
+}
 
 namespace electron {
 

+ 1 - 0
shell/common/node_bindings.cc

@@ -17,6 +17,7 @@
 #include "base/environment.h"
 #include "base/path_service.h"
 #include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
 #include "base/strings/string_split.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/threading/thread_task_runner_handle.h"

+ 1 - 2
shell/common/node_bindings.h

@@ -10,12 +10,11 @@
 #include "base/files/file_path.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/single_thread_task_runner.h"
 #include "uv.h"  // NOLINT(build/include_directory)
 #include "v8/include/v8.h"
 
 namespace base {
-class MessageLoop;
+class SingleThreadTaskRunner;
 }
 
 namespace node {

+ 1 - 1
shell/common/node_util.h

@@ -11,7 +11,7 @@
 
 namespace node {
 class Environment;
-}  // namespace node
+}
 
 namespace electron {
 

+ 1 - 0
shell/common/process_util.cc

@@ -6,6 +6,7 @@
 
 #include "gin/dictionary.h"
 #include "shell/common/gin_converters/callback_converter.h"
+#include "shell/common/node_includes.h"
 
 namespace electron {
 

+ 3 - 1
shell/common/process_util.h

@@ -7,7 +7,9 @@
 
 #include <string>
 
-#include "shell/common/node_includes.h"
+namespace node {
+class Environment;
+}
 
 namespace electron {
 

+ 1 - 0
shell/common/skia_util.cc

@@ -4,6 +4,7 @@
 
 #include <string>
 
+#include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/strings/pattern.h"
 #include "base/strings/string_util.h"

+ 7 - 1
shell/common/skia_util.h

@@ -5,7 +5,13 @@
 #ifndef SHELL_COMMON_SKIA_UTIL_H_
 #define SHELL_COMMON_SKIA_UTIL_H_
 
-#include "ui/gfx/image/image_skia.h"
+namespace base {
+class FilePath;
+}
+
+namespace gfx {
+class ImageSkia;
+}
 
 namespace electron {
 

+ 2 - 2
shell/renderer/browser_exposed_renderer_interfaces.h

@@ -7,11 +7,11 @@
 
 namespace mojo {
 class BinderMap;
-}  // namespace mojo
+}
 
 namespace electron {
 class RendererClientBase;
-}  // namespace electron
+}
 
 class ChromeContentRendererClient;
 

+ 1 - 0
shell/renderer/electron_render_frame_observer.cc

@@ -21,6 +21,7 @@
 #include "shell/common/gin_helper/microtasks_scope.h"
 #include "shell/common/options_switches.h"
 #include "shell/common/world_ids.h"
+#include "shell/renderer/renderer_client_base.h"
 #include "third_party/blink/public/common/browser_interface_broker_proxy.h"
 #include "third_party/blink/public/common/web_preferences/web_preferences.h"
 #include "third_party/blink/public/platform/web_isolated_world_info.h"

+ 2 - 5
shell/renderer/electron_render_frame_observer.h

@@ -9,15 +9,12 @@
 
 #include "content/public/renderer/render_frame_observer.h"
 #include "ipc/ipc_platform_file.h"
-#include "shell/renderer/renderer_client_base.h"
 #include "third_party/blink/public/web/web_local_frame.h"
 
-namespace base {
-class ListValue;
-}
-
 namespace electron {
 
+class RendererClientBase;
+
 // Helper class to forward the messages to the client.
 class ElectronRenderFrameObserver : public content::RenderFrameObserver {
  public:

+ 1 - 1
shell/renderer/electron_renderer_client.h

@@ -13,7 +13,7 @@
 
 namespace node {
 class Environment;
-}  // namespace node
+}
 
 namespace electron {
 

+ 1 - 0
shell/renderer/electron_sandboxed_renderer_client.cc

@@ -11,6 +11,7 @@
 #include "base/files/file_path.h"
 #include "base/path_service.h"
 #include "base/process/process_handle.h"
+#include "base/process/process_metrics.h"
 #include "content/public/renderer/render_frame.h"
 #include "electron/buildflags/buildflags.h"
 #include "shell/common/api/electron_bindings.h"

+ 8 - 1
shell/renderer/electron_sandboxed_renderer_client.h

@@ -8,9 +8,16 @@
 #include <set>
 #include <string>
 
-#include "base/process/process_metrics.h"
 #include "shell/renderer/renderer_client_base.h"
 
+namespace base {
+class ProcessMetrics;
+}
+
+namespace blink {
+class WebLocalFrame;
+}
+
 namespace electron {
 
 class ElectronSandboxedRendererClient : public RendererClientBase {

+ 1 - 0
shell/renderer/guest_view_container.cc

@@ -10,6 +10,7 @@
 #include "base/bind.h"
 #include "base/lazy_instance.h"
 #include "base/threading/thread_task_runner_handle.h"
+#include "content/public/renderer/render_frame.h"
 #include "ui/gfx/geometry/size.h"
 
 namespace electron {

+ 4 - 1
shell/renderer/guest_view_container.h

@@ -6,7 +6,10 @@
 #define SHELL_RENDERER_GUEST_VIEW_CONTAINER_H_
 
 #include "base/callback.h"
-#include "content/public/renderer/render_frame.h"
+
+namespace content {
+class RenderFrame;
+}
 
 namespace gfx {
 class Size;

+ 1 - 0
shell/renderer/renderer_client_base.cc

@@ -41,6 +41,7 @@
 #include "third_party/blink/public/web/blink.h"
 #include "third_party/blink/public/web/web_custom_element.h"  // NOLINT(build/include_alpha)
 #include "third_party/blink/public/web/web_frame_widget.h"
+#include "third_party/blink/public/web/web_local_frame.h"
 #include "third_party/blink/public/web/web_plugin_params.h"
 #include "third_party/blink/public/web/web_script_source.h"
 #include "third_party/blink/public/web/web_security_policy.h"

+ 4 - 6
shell/renderer/renderer_client_base.h

@@ -13,7 +13,6 @@
 #include "electron/buildflags/buildflags.h"
 #include "printing/buildflags/buildflags.h"
 #include "shell/common/gin_helper/dictionary.h"
-#include "third_party/blink/public/web/web_local_frame.h"
 // In SHARED_INTERMEDIATE_DIR.
 #include "widevine_cdm_version.h"  // NOLINT(build/include_directory)
 
@@ -32,19 +31,18 @@
 class SpellCheck;
 #endif
 
+namespace blink {
+class WebLocalFrame;
+}
+
 #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
 namespace extensions {
 class ExtensionsClient;
 }
-namespace content {
-struct WebPluginInfo;
-}
 #endif
 
 namespace electron {
 
-class ElectronApiServiceImpl;
-
 #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
 class ElectronExtensionsRendererClient;
 #endif

+ 1 - 1
shell/utility/electron_content_utility_client.h

@@ -18,7 +18,7 @@ class PrintingHandler;
 
 namespace mojo {
 class ServiceFactory;
-}  // namespace mojo
+}
 
 namespace electron {