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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_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 | « chrome/browser/plugin_process_host.cc ('k') | views/controls/native_control.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 "chrome/browser/renderer_host/render_widget_host_view_win.h" 5 #include "chrome/browser/renderer_host/render_widget_host_view_win.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/l10n_util_win.h" 9 #include "app/l10n_util_win.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 background)); 655 background));
656 } 656 }
657 657
658 /////////////////////////////////////////////////////////////////////////////// 658 ///////////////////////////////////////////////////////////////////////////////
659 // RenderWidgetHostViewWin, private: 659 // RenderWidgetHostViewWin, private:
660 660
661 LRESULT RenderWidgetHostViewWin::OnCreate(CREATESTRUCT* create_struct) { 661 LRESULT RenderWidgetHostViewWin::OnCreate(CREATESTRUCT* create_struct) {
662 // Call the WM_INPUTLANGCHANGE message handler to initialize the input locale 662 // Call the WM_INPUTLANGCHANGE message handler to initialize the input locale
663 // of a browser process. 663 // of a browser process.
664 OnInputLangChange(0, 0); 664 OnInputLangChange(0, 0);
665 TRACK_HWND_CREATION(m_hWnd);
666 // Marks that window as supporting mouse-wheel messages rerouting so it is 665 // Marks that window as supporting mouse-wheel messages rerouting so it is
667 // scrolled when under the mouse pointer even if inactive. 666 // scrolled when under the mouse pointer even if inactive.
668 views::SetWindowSupportsRerouteMouseWheel(m_hWnd); 667 views::SetWindowSupportsRerouteMouseWheel(m_hWnd);
669 return 0; 668 return 0;
670 } 669 }
671 670
672 void RenderWidgetHostViewWin::OnActivate(UINT action, BOOL minimized, 671 void RenderWidgetHostViewWin::OnActivate(UINT action, BOOL minimized,
673 HWND window) { 672 HWND window) {
674 // If the container is a popup, clicking elsewhere on screen should close the 673 // If the container is a popup, clicking elsewhere on screen should close the
675 // popup. 674 // popup.
676 if (close_on_deactivate_ && action == WA_INACTIVE) { 675 if (close_on_deactivate_ && action == WA_INACTIVE) {
677 // Send a windows message so that any derived classes 676 // Send a windows message so that any derived classes
678 // will get a change to override the default handling 677 // will get a change to override the default handling
679 SendMessage(WM_CANCELMODE); 678 SendMessage(WM_CANCELMODE);
680 } 679 }
681 } 680 }
682 681
683 void RenderWidgetHostViewWin::OnDestroy() { 682 void RenderWidgetHostViewWin::OnDestroy() {
684 ResetTooltip(); 683 ResetTooltip();
685 TrackMouseLeave(false); 684 TrackMouseLeave(false);
686 #ifdef ENABLE_TRACK_HWND_DESTRUCTION
687 TRACK_HWND_DESTRUCTION(m_hWnd);
688 #endif // ENABLE_TRACK_HWND_DESTRUCTION
689 } 685 }
690 686
691 void RenderWidgetHostViewWin::OnPaint(HDC dc) { 687 void RenderWidgetHostViewWin::OnPaint(HDC dc) {
692 DCHECK(render_widget_host_->process()->channel()); 688 DCHECK(render_widget_host_->process()->channel());
693 689
694 about_to_validate_and_paint_ = true; 690 about_to_validate_and_paint_ = true;
695 BackingStore* backing_store = render_widget_host_->GetBackingStore(); 691 BackingStore* backing_store = render_widget_host_->GetBackingStore();
696 692
697 // We initialize |paint_dc| (and thus call BeginPaint()) after calling 693 // We initialize |paint_dc| (and thus call BeginPaint()) after calling
698 // GetBackingStore(), so that if it updates the invalid rect we'll catch the 694 // GetBackingStore(), so that if it updates the invalid rect we'll catch the
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 // WM_LBUTTONDOWN. 1315 // WM_LBUTTONDOWN.
1320 SetFocus(); 1316 SetFocus();
1321 } 1317 }
1322 } 1318 }
1323 1319
1324 void RenderWidgetHostViewWin::ShutdownHost() { 1320 void RenderWidgetHostViewWin::ShutdownHost() {
1325 shutdown_factory_.RevokeAll(); 1321 shutdown_factory_.RevokeAll();
1326 render_widget_host_->Shutdown(); 1322 render_widget_host_->Shutdown();
1327 // Do not touch any members at this point, |this| has been deleted. 1323 // Do not touch any members at this point, |this| has been deleted.
1328 } 1324 }
OLDNEW
« no previous file with comments | « chrome/browser/plugin_process_host.cc ('k') | views/controls/native_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698