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

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

Issue 2623763003: Split out ChildWindowWin (Closed)
Patch Set: initialize window_ 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
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 class ChildWindowWin {
stanisc 2017/01/10 20:54:57 Consider adding a short comment that explaining th
18 public:
19 ChildWindowWin(base::WeakPtr<ImageTransportSurfaceDelegate> delegate,
20 HWND parent_window);
21 ~ChildWindowWin();
22
23 bool Initialize();
24 void ClearInvalidContents();
25 HWND window() const { return window_; }
26
27 private:
28 // This member contains all the data that can be accessed from the main or
29 // window owner threads.
30 std::unique_ptr<SharedData> shared_data_;
31 // The eventual parent of the window living in the browser process.
32 HWND parent_window_;
33 HWND window_;
34 // The window is initially created with this parent window. We need to keep it
35 // around so that we can destroy it at the end.
36 HWND initial_parent_window_;
37 base::WeakPtr<ImageTransportSurfaceDelegate> delegate_;
38
39 DISALLOW_COPY_AND_ASSIGN(ChildWindowWin);
40 };
41
42 } // namespace gpu
43
44 #endif // GPU_IPC_SERVICE_CHILD_WINDOW_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698