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

Side by Side Diff: ui/base/win/hidden_window.cc

Issue 23769011: Move a bunch of windows stuff from ui/base/win to ui/gfx/win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moar bustage. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/base/win/foreground_helper.cc ('k') | ui/base/win/hwnd_subclass.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/base/win/hidden_window.h" 5 #include "ui/base/win/hidden_window.h"
6 6
7 #include "ui/base/win/window_impl.h" 7 #include "ui/gfx/win/window_impl.h"
8 8
9 namespace ui { 9 namespace ui {
10 10
11 namespace { 11 namespace {
12 12
13 // We need to have a parent window for the compositing code to work correctly. 13 // We need to have a parent window for the compositing code to work correctly.
14 // 14 //
15 // A tab will not have a parent HWND whenever it is not active in its 15 // A tab will not have a parent HWND whenever it is not active in its
16 // host window - for example at creation time and when it's in the 16 // host window - for example at creation time and when it's in the
17 // background, so we provide a default widget to host them. 17 // background, so we provide a default widget to host them.
18 // 18 //
19 // It may be tempting to use GetDesktopWindow() instead, but this is 19 // It may be tempting to use GetDesktopWindow() instead, but this is
20 // problematic as the shell sends messages to children of the desktop 20 // problematic as the shell sends messages to children of the desktop
21 // window that interact poorly with us. 21 // window that interact poorly with us.
22 // 22 //
23 // See: http://crbug.com/16476 23 // See: http://crbug.com/16476
24 class TempParent : public ui::WindowImpl { 24 class TempParent : public gfx::WindowImpl {
25 public: 25 public:
26 static TempParent* Get() { 26 static TempParent* Get() {
27 static TempParent* g_temp_parent; 27 static TempParent* g_temp_parent;
28 if (!g_temp_parent) { 28 if (!g_temp_parent) {
29 g_temp_parent = new TempParent(); 29 g_temp_parent = new TempParent();
30 30
31 g_temp_parent->set_window_style(WS_POPUP); 31 g_temp_parent->set_window_style(WS_POPUP);
32 g_temp_parent->set_window_ex_style(WS_EX_TOOLWINDOW); 32 g_temp_parent->set_window_ex_style(WS_EX_TOOLWINDOW);
33 g_temp_parent->Init(GetDesktopWindow(), gfx::Rect()); 33 g_temp_parent->Init(GetDesktopWindow(), gfx::Rect());
34 EnableWindow(g_temp_parent->hwnd(), FALSE); 34 EnableWindow(g_temp_parent->hwnd(), FALSE);
(...skipping 12 matching lines...) Expand all
47 END_MSG_MAP() 47 END_MSG_MAP()
48 }; 48 };
49 49
50 } // namespace 50 } // namespace
51 51
52 HWND GetHiddenWindow() { 52 HWND GetHiddenWindow() {
53 return TempParent::Get()->hwnd(); 53 return TempParent::Get()->hwnd();
54 } 54 }
55 55
56 } // namespace ui 56 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/win/foreground_helper.cc ('k') | ui/base/win/hwnd_subclass.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698