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

Side by Side Diff: ui/gfx/win/window_impl.h

Issue 557513002: Deregister window classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add switch to control window unregistering Created 6 years, 3 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_WIN_WINDOW_IMPL_H_ 5 #ifndef UI_GFX_WIN_WINDOW_IMPL_H_
6 #define UI_GFX_WIN_WINDOW_IMPL_H_ 6 #define UI_GFX_WIN_WINDOW_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 23 matching lines...) Expand all
34 // A convenience class that encapsulates the details of creating and 34 // A convenience class that encapsulates the details of creating and
35 // destroying a HWND. This class also hosts the windows procedure used by all 35 // destroying a HWND. This class also hosts the windows procedure used by all
36 // Windows. 36 // Windows.
37 // 37 //
38 /////////////////////////////////////////////////////////////////////////////// 38 ///////////////////////////////////////////////////////////////////////////////
39 class GFX_EXPORT WindowImpl : public MessageMapInterface { 39 class GFX_EXPORT WindowImpl : public MessageMapInterface {
40 public: 40 public:
41 WindowImpl(); 41 WindowImpl();
42 virtual ~WindowImpl(); 42 virtual ~WindowImpl();
43 43
44 // Causes all generated windows classes to be unregistered at exit.
45 // This can cause result in errors for tests that don't destroy all instances
46 // of windows, but is necessary if the tests uses a ShadowingAtExitManager.
Bernhard Bauer 2014/09/11 08:45:06 This comment doesn't really make sense. Calling th
DaveMoore 2014/09/12 04:27:28 Done.
47 static void SetUnregisterClassesAtExit(bool unregister_classes_at_exit);
48
44 // Initializes the Window with a parent and an initial desired size. 49 // Initializes the Window with a parent and an initial desired size.
45 void Init(HWND parent, const gfx::Rect& bounds); 50 void Init(HWND parent, const gfx::Rect& bounds);
46 51
47 // Returns the default window icon to use for windows of this type. 52 // Returns the default window icon to use for windows of this type.
48 virtual HICON GetDefaultWindowIcon() const; 53 virtual HICON GetDefaultWindowIcon() const;
49 54
50 // Returns the HWND associated with this Window. 55 // Returns the HWND associated with this Window.
51 HWND hwnd() const { return hwnd_; } 56 HWND hwnd() const { return hwnd_; }
52 57
53 // Sets the window styles. This is ONLY used when the window is created. 58 // Sets the window styles. This is ONLY used when the window is created.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 bool got_create_; 115 bool got_create_;
111 bool got_valid_hwnd_; 116 bool got_valid_hwnd_;
112 bool* destroyed_; 117 bool* destroyed_;
113 118
114 DISALLOW_COPY_AND_ASSIGN(WindowImpl); 119 DISALLOW_COPY_AND_ASSIGN(WindowImpl);
115 }; 120 };
116 121
117 } // namespace gfx 122 } // namespace gfx
118 123
119 #endif // UI_GFX_WIN_WINDOW_IMPL_H_ 124 #endif // UI_GFX_WIN_WINDOW_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698