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

Side by Side Diff: views/widget/widget_win.cc

Issue 115553: Remove TRACK_HWND_CREATION/TRACK_HWND_DESTRUCTION macro since the bug it was ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 | « views/controls/text_field.cc ('k') | webkit/glue/plugins/webplugin_delegate_impl.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "views/widget/widget_win.h" 5 #include "views/widget/widget_win.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/win_util.h" 8 #include "app/win_util.h"
9 #include "base/gfx/native_theme.h" 9 #include "base/gfx/native_theme.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // will fail. 172 // will fail.
173 if (parent && !::IsWindow(parent)) { 173 if (parent && !::IsWindow(parent)) {
174 NOTREACHED() << "invalid parent window specified."; 174 NOTREACHED() << "invalid parent window specified.";
175 parent = NULL; 175 parent = NULL;
176 } 176 }
177 177
178 hwnd_ = CreateWindowEx(window_ex_style_, GetWindowClassName().c_str(), L"", 178 hwnd_ = CreateWindowEx(window_ex_style_, GetWindowClassName().c_str(), L"",
179 window_style_, bounds.x(), bounds.y(), bounds.width(), 179 window_style_, bounds.x(), bounds.y(), bounds.width(),
180 bounds.height(), parent, NULL, NULL, this); 180 bounds.height(), parent, NULL, NULL, this);
181 DCHECK(hwnd_); 181 DCHECK(hwnd_);
182 TRACK_HWND_CREATION(hwnd_);
183 SetWindowSupportsRerouteMouseWheel(hwnd_); 182 SetWindowSupportsRerouteMouseWheel(hwnd_);
184 183
185 // The window procedure should have set the data for us. 184 // The window procedure should have set the data for us.
186 DCHECK(win_util::GetWindowUserData(hwnd_) == this); 185 DCHECK(win_util::GetWindowUserData(hwnd_) == this);
187 186
188 root_view_->OnWidgetCreated(); 187 root_view_->OnWidgetCreated();
189 188
190 if (has_own_focus_manager) { 189 if (has_own_focus_manager) {
191 FocusManager::CreateFocusManager(hwnd_, GetRootView()); 190 FocusManager::CreateFocusManager(hwnd_, GetRootView());
192 } else { 191 } else {
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 // First allow messages sent by child controls to be processed directly by 1027 // First allow messages sent by child controls to be processed directly by
1029 // their associated views. If such a view is present, it will handle the 1028 // their associated views. If such a view is present, it will handle the
1030 // message *instead of* this WidgetWin. 1029 // message *instead of* this WidgetWin.
1031 if (ProcessNativeControlMessage(message, w_param, l_param, &result)) 1030 if (ProcessNativeControlMessage(message, w_param, l_param, &result))
1032 return result; 1031 return result;
1033 1032
1034 // Otherwise we handle everything else. 1033 // Otherwise we handle everything else.
1035 if (!widget->ProcessWindowMessage(window, message, w_param, l_param, result)) 1034 if (!widget->ProcessWindowMessage(window, message, w_param, l_param, result))
1036 result = DefWindowProc(window, message, w_param, l_param); 1035 result = DefWindowProc(window, message, w_param, l_param);
1037 if (message == WM_NCDESTROY) { 1036 if (message == WM_NCDESTROY) {
1038 TRACK_HWND_DESTRUCTION(window);
1039 widget->hwnd_ = NULL; 1037 widget->hwnd_ = NULL;
1040 widget->OnFinalMessage(window); 1038 widget->OnFinalMessage(window);
1041 } 1039 }
1042 return result; 1040 return result;
1043 } 1041 }
1044 1042
1045 } // namespace views 1043 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/text_field.cc ('k') | webkit/glue/plugins/webplugin_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698