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

Commit 8389ad9

Browse files
Merge Window into FlutterWindow (#45542)
Merge abstract base class `Window` into concrete derived class `FlutterWindow` to simplify future development. flutter/flutter#132260 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [ ] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --------- Co-authored-by: Loïc Sharma <[email protected]>
1 parent fe5fa05 commit 8389ad9

File tree

11 files changed

+990
-1159
lines changed

11 files changed

+990
-1159
lines changed

ci/licenses_golden/licenses_flutter

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3288,8 +3288,6 @@ ORIGIN: ../../../flutter/shell/platform/windows/text_input_manager.h + ../../../
32883288
ORIGIN: ../../../flutter/shell/platform/windows/text_input_plugin.cc + ../../../flutter/LICENSE
32893289
ORIGIN: ../../../flutter/shell/platform/windows/text_input_plugin.h + ../../../flutter/LICENSE
32903290
ORIGIN: ../../../flutter/shell/platform/windows/text_input_plugin_delegate.h + ../../../flutter/LICENSE
3291-
ORIGIN: ../../../flutter/shell/platform/windows/window.cc + ../../../flutter/LICENSE
3292-
ORIGIN: ../../../flutter/shell/platform/windows/window.h + ../../../flutter/LICENSE
32933291
ORIGIN: ../../../flutter/shell/platform/windows/window_binding_handler.h + ../../../flutter/LICENSE
32943292
ORIGIN: ../../../flutter/shell/platform/windows/window_binding_handler_delegate.h + ../../../flutter/LICENSE
32953293
ORIGIN: ../../../flutter/shell/platform/windows/window_proc_delegate_manager.cc + ../../../flutter/LICENSE
@@ -6060,8 +6058,6 @@ FILE: ../../../flutter/shell/platform/windows/text_input_manager.h
60606058
FILE: ../../../flutter/shell/platform/windows/text_input_plugin.cc
60616059
FILE: ../../../flutter/shell/platform/windows/text_input_plugin.h
60626060
FILE: ../../../flutter/shell/platform/windows/text_input_plugin_delegate.h
6063-
FILE: ../../../flutter/shell/platform/windows/window.cc
6064-
FILE: ../../../flutter/shell/platform/windows/window.h
60656061
FILE: ../../../flutter/shell/platform/windows/window_binding_handler.h
60666062
FILE: ../../../flutter/shell/platform/windows/window_binding_handler_delegate.h
60676063
FILE: ../../../flutter/shell/platform/windows/window_proc_delegate_manager.cc

shell/platform/windows/BUILD.gn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ source_set("flutter_windows_source") {
9696
"text_input_manager.h",
9797
"text_input_plugin.cc",
9898
"text_input_plugin.h",
99-
"window.cc",
100-
"window.h",
10199
"window_binding_handler.h",
102100
"window_binding_handler_delegate.h",
103101
"window_proc_delegate_manager.cc",

shell/platform/windows/direct_manipulation.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <algorithm>
88

99
#include "flutter/shell/platform/windows/direct_manipulation.h"
10-
#include "flutter/shell/platform/windows/window.h"
10+
#include "flutter/shell/platform/windows/flutter_window.h"
1111
#include "flutter/shell/platform/windows/window_binding_handler_delegate.h"
1212

1313
#define RETURN_IF_FAILED(operation) \
@@ -172,7 +172,7 @@ ULONG STDMETHODCALLTYPE DirectManipulationEventHandler::Release() {
172172
return 0;
173173
}
174174

175-
DirectManipulationOwner::DirectManipulationOwner(Window* window)
175+
DirectManipulationOwner::DirectManipulationOwner(FlutterWindow* window)
176176
: window_(window) {}
177177

178178
int DirectManipulationOwner::Init(unsigned int width, unsigned int height) {

shell/platform/windows/direct_manipulation.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
namespace flutter {
1414

15-
class Window;
15+
class FlutterWindow;
1616
class WindowBindingHandlerDelegate;
1717

1818
class DirectManipulationEventHandler;
@@ -21,7 +21,7 @@ class DirectManipulationEventHandler;
2121
// DirectManipulation and WindowBindingHandlerDelegate.
2222
class DirectManipulationOwner {
2323
public:
24-
explicit DirectManipulationOwner(Window* window);
24+
explicit DirectManipulationOwner(FlutterWindow* window);
2525
virtual ~DirectManipulationOwner() = default;
2626
// Initialize a DirectManipulation viewport with specified width and height.
2727
// These should match the width and height of the application window.
@@ -47,7 +47,7 @@ class DirectManipulationOwner {
4747

4848
private:
4949
// The window gesture input is occuring on.
50-
Window* window_;
50+
FlutterWindow* window_;
5151
// Cookie needed to register child event handler with viewport.
5252
DWORD viewportHandlerCookie_;
5353
// Object needed for operation of the DirectManipulation API.

0 commit comments

Comments
 (0)