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

Side by Side Diff: base/message_pump_win.cc

Issue 101004: Ensure Windows window classes are unregistered on shutdown (take 2) (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 | « no previous file | chrome/browser/process_singleton_win.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) 2009 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 "base/message_pump_win.h" 5 #include "base/message_pump_win.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "base/histogram.h" 9 #include "base/histogram.h"
10 #include "base/win_util.h" 10 #include "base/win_util.h"
11 11
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 //----------------------------------------------------------------------------- 82 //-----------------------------------------------------------------------------
83 // MessagePumpForUI public: 83 // MessagePumpForUI public:
84 84
85 MessagePumpForUI::MessagePumpForUI() { 85 MessagePumpForUI::MessagePumpForUI() {
86 InitMessageWnd(); 86 InitMessageWnd();
87 } 87 }
88 88
89 MessagePumpForUI::~MessagePumpForUI() { 89 MessagePumpForUI::~MessagePumpForUI() {
90 DestroyWindow(message_hwnd_); 90 DestroyWindow(message_hwnd_);
91 UnregisterClass(kWndClass, GetModuleHandle(NULL));
91 } 92 }
92 93
93 void MessagePumpForUI::ScheduleWork() { 94 void MessagePumpForUI::ScheduleWork() {
94 if (InterlockedExchange(&have_work_, 1)) 95 if (InterlockedExchange(&have_work_, 1))
95 return; // Someone else continued the pumping. 96 return; // Someone else continued the pumping.
96 97
97 // Make sure the MessagePump does some work for us. 98 // Make sure the MessagePump does some work for us.
98 PostMessage(message_hwnd_, kMsgHaveWork, reinterpret_cast<WPARAM>(this), 0); 99 PostMessage(message_hwnd_, kMsgHaveWork, reinterpret_cast<WPARAM>(this), 0);
99 } 100 }
100 101
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 if (!filter || it->handler == filter) { 548 if (!filter || it->handler == filter) {
548 *item = *it; 549 *item = *it;
549 completed_io_.erase(it); 550 completed_io_.erase(it);
550 return true; 551 return true;
551 } 552 }
552 } 553 }
553 return false; 554 return false;
554 } 555 }
555 556
556 } // namespace base 557 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/process_singleton_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698