Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: gpu/ipc/service/child_window_win.h

Issue 2623763003: Split out ChildWindowWin (Closed)
Patch Set: add comment Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gpu/ipc/service/child_window_surface_win.cc ('k') | gpu/ipc/service/child_window_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef GPU_IPC_SERVICE_CHILD_WINDOW_WIN_H_
6 #define GPU_IPC_SERVICE_CHILD_WINDOW_WIN_H_
7
8 #include "base/memory/weak_ptr.h"
9 #include "gpu/ipc/service/image_transport_surface_delegate.h"
10
11 #include <windows.h>
12
13 namespace gpu {
14
15 struct SharedData;
16
17 // The window DirectComposition renders into needs to be owned by the process
18 // that's currently doing the rendering. The class creates and owns a window
19 // which is reparented by the browser to be a child of its window.
20 class ChildWindowWin {
21 public:
22 ChildWindowWin(base::WeakPtr<ImageTransportSurfaceDelegate> delegate,
23 HWND parent_window);
24 ~ChildWindowWin();
25
26 bool Initialize();
27 void ClearInvalidContents();
28 HWND window() const { return window_; }
29
30 private:
31 // This member contains all the data that can be accessed from the main or
32 // window owner threads.
33 std::unique_ptr<SharedData> shared_data_;
34 // The eventual parent of the window living in the browser process.
35 HWND parent_window_;
36 HWND window_;
37 // The window is initially created with this parent window. We need to keep it
38 // around so that we can destroy it at the end.
39 HWND initial_parent_window_;
40 base::WeakPtr<ImageTransportSurfaceDelegate> delegate_;
41
42 DISALLOW_COPY_AND_ASSIGN(ChildWindowWin);
43 };
44
45 } // namespace gpu
46
47 #endif // GPU_IPC_SERVICE_CHILD_WINDOW_WIN_H_
OLDNEW
« no previous file with comments | « gpu/ipc/service/child_window_surface_win.cc ('k') | gpu/ipc/service/child_window_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698