Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Windows] Use #pragma once #48955

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions shell/platform/windows/accessibility_bridge_windows.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_ACCESSIBILITY_BRIDGE_WINDOWS_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_ACCESSIBILITY_BRIDGE_WINDOWS_H_
#pragma once

#include "flutter/fml/macros.h"
#include "flutter/shell/platform/common/accessibility_bridge.h"
Expand Down Expand Up @@ -78,5 +77,3 @@ class AccessibilityBridgeWindows : public AccessibilityBridge,
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_ACCESSIBILITY_BRIDGE_WINDOWS_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/angle_surface_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_ANGLE_SURFACE_MANAGER_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_ANGLE_SURFACE_MANAGER_H_
#pragma once

// OpenGL ES and EGL includes
#include <EGL/egl.h>
Expand Down Expand Up @@ -151,5 +150,3 @@ class AngleSurfaceManager {
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_ANGLE_SURFACE_MANAGER_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/cursor_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_CURSOR_HANDLER_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_CURSOR_HANDLER_H_
#pragma once

#include <unordered_map>

Expand Down Expand Up @@ -53,5 +52,3 @@ HCURSOR GetCursorFromBuffer(const std::vector<uint8_t>& buffer,
void GetMaskBitmaps(HBITMAP bitmap, HBITMAP& mask_bitmap);

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_CURSOR_HANDLER_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/direct_manipulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_DIRECT_MANIPULATION_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_DIRECT_MANIPULATION_H_
#pragma once

#include "flutter/fml/memory/ref_counted.h"

Expand Down Expand Up @@ -140,5 +139,3 @@ class DirectManipulationEventHandler
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_DIRECT_MANIPULATION_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/dpi_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

#include "Windows.h"

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_DPI_UTILS_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_DPI_UTILS_H_
#pragma once

namespace flutter {

Expand All @@ -20,5 +19,3 @@ UINT GetDpiForHWND(HWND hwnd);
UINT GetDpiForMonitor(HMONITOR monitor);

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_DPI_UTILS_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/event_watcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_EVENT_WATCHER_WIN32_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_EVENT_WATCHER_WIN32_H_
#pragma once

#include <Windows.h>

Expand Down Expand Up @@ -34,5 +33,3 @@ class EventWatcher {
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_EVENT_WATCHER_WIN32_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/external_texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_EXTERNAL_TEXTURE_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_EXTERNAL_TEXTURE_H_
#pragma once

#include "flutter/shell/platform/embedder/embedder.h"

Expand All @@ -29,5 +28,3 @@ class ExternalTexture {
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_EXTERNAL_TEXTURE_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/external_texture_d3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_EXTERNAL_TEXTURE_D3D_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_EXTERNAL_TEXTURE_D3D_H_
#pragma once

#include <memory>

Expand Down Expand Up @@ -51,5 +50,3 @@ class ExternalTextureD3d : public ExternalTexture {
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_EXTERNAL_TEXTURE_D3D_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/external_texture_pixelbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_EXTERNAL_TEXTURE_PIXELBUFFER_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_EXTERNAL_TEXTURE_PIXELBUFFER_H_
#pragma once

#include "flutter/fml/macros.h"
#include "flutter/shell/platform/common/public/flutter_texture_registrar.h"
Expand Down Expand Up @@ -45,5 +44,3 @@ class ExternalTexturePixelBuffer : public ExternalTexture {
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_EXTERNAL_TEXTURE_PIXELBUFFER_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/flutter_desktop_messenger.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_DESKTOP_MESSENGER_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_DESKTOP_MESSENGER_H_
#pragma once

#include <atomic>
#include <mutex>
Expand Down Expand Up @@ -79,5 +78,3 @@ class FlutterDesktopMessenger {
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOW_STATE_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_PLATFORM_NODE_DELEGATE_WINDOWS_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_PLATFORM_NODE_DELEGATE_WINDOWS_H_
#pragma once

#include "flutter/fml/macros.h"
#include "flutter/shell/platform/common/flutter_platform_node_delegate.h"
Expand Down Expand Up @@ -64,5 +63,3 @@ class FlutterPlatformNodeDelegateWindows : public FlutterPlatformNodeDelegate {
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_PLATFORM_NODE_DELEGATE_WINDOWS_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/flutter_project_bundle.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_PROJECT_BUNDLE_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_PROJECT_BUNDLE_H_
#pragma once

#include <filesystem>
#include <string>
Expand Down Expand Up @@ -77,5 +76,3 @@ class FlutterProjectBundle {
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_PROJECT_BUNDLE_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/flutter_windows_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_ENGINE_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_ENGINE_H_
#pragma once

#include <chrono>
#include <map>
Expand Down Expand Up @@ -427,5 +426,3 @@ class FlutterWindowsEngine {
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_ENGINE_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/flutter_windows_texture_registrar.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_TEXTURE_REGISTRAR_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_TEXTURE_REGISTRAR_H_
#pragma once

#include <memory>
#include <mutex>
Expand Down Expand Up @@ -60,5 +59,3 @@ class FlutterWindowsTextureRegistrar {
};

}; // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_TEXTURE_REGISTRAR_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/flutter_windows_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_VIEW_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_VIEW_H_
#pragma once

#include <memory>
#include <mutex>
Expand Down Expand Up @@ -396,5 +395,3 @@ class FlutterWindowsView : public WindowBindingHandlerDelegate {
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_VIEW_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/flutter_windows_view_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_VIEW_CONTROLLER_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_VIEW_CONTROLLER_H_
#pragma once

#include <memory>

Expand All @@ -28,5 +27,3 @@ class FlutterWindowsViewController {
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_VIEW_CONTROLLER_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/gl_proc_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_GL_PROC_TABLE_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_GL_PROC_TABLE_H_
#pragma once

#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
Expand Down Expand Up @@ -66,5 +65,3 @@ class GlProcTable {
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_GL_PROC_TABLE_H_
7 changes: 3 additions & 4 deletions shell/platform/windows/keyboard_handler_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_HOOK_HANDLER_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_HOOK_HANDLER_H_
#pragma once

#include <functional>
#include <map>
#include <string>

namespace flutter {
Expand Down Expand Up @@ -42,5 +43,3 @@ class KeyboardHandlerBase {
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_HOOK_HANDLER_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/keyboard_key_channel_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_KEY_CHANNEL_HANDLER_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_KEY_CHANNEL_HANDLER_H_
#pragma once

#include <deque>
#include <memory>
Expand Down Expand Up @@ -51,5 +50,3 @@ class KeyboardKeyChannelHandler
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_KEY_CHANNEL_HANDLER_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/keyboard_key_embedder_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_KEY_EMBEDDER_HANDLER_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_KEY_EMBEDDER_HANDLER_H_
#pragma once

#include <functional>
#include <map>
Expand Down Expand Up @@ -199,5 +198,3 @@ class KeyboardKeyEmbedderHandler
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_KEY_EMBEDDER_HANDLER_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/keyboard_key_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_KEY_HANDLER_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_KEY_HANDLER_H_
#pragma once

#include <windows.h>
#include <deque>
Expand Down Expand Up @@ -149,5 +148,3 @@ class KeyboardKeyHandler : public KeyboardHandlerBase {
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_KEY_HANDLER_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/keyboard_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_MANAGER_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_MANAGER_H_
#pragma once

#include <windows.h>

Expand Down Expand Up @@ -233,5 +232,3 @@ class KeyboardManager {
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_MANAGER_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/keyboard_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_WIN32_COMMON_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_WIN32_COMMON_H_
#pragma once

#include <stdint.h>

Expand Down Expand Up @@ -42,5 +41,3 @@ inline uint32_t UndeadChar(uint32_t ch) {
std::u16string EncodeUtf16(char32_t character);

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_WIN32_COMMON_H_
5 changes: 1 addition & 4 deletions shell/platform/windows/platform_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_PLATFORM_HANDLER_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_PLATFORM_HANDLER_H_
#pragma once

#include <Windows.h>

Expand Down Expand Up @@ -154,5 +153,3 @@ class ScopedClipboardInterface {
};

} // namespace flutter

#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_PLATFORM_HANDLER_H_
Loading