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

Side by Side Diff: base/message_pump_win.cc

Issue 8566037: aura: Fix unit_tests on linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove Synthetic tests that were added for NWViews Created 9 years 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
11 #include "base/win/wrapped_window_proc.h" 11 #include "base/win/wrapped_window_proc.h"
12 12
13 namespace base { 13 namespace base {
14 14
15 static const wchar_t kWndClass[] = L"Chrome_MessagePumpWindow"; 15 static const wchar_t kWndClass[] = L"Chrome_MessagePumpWindow";
16 16
17 // Message sent to get an additional time slice for pumping (processing) another 17 // Message sent to get an additional time slice for pumping (processing) another
18 // task (a series of such messages creates a continuous task pump). 18 // task (a series of such messages creates a continuous task pump).
19 static const int kMsgHaveWork = WM_USER + 1; 19 static const int kMsgHaveWork = WM_USER + 1;
20 20
21 //----------------------------------------------------------------------------- 21 //-----------------------------------------------------------------------------
22 // MessagePumpWin public: 22 // MessagePumpWin public:
23 23
24 MessagePumpWin::~MessagePumpWin() {
25 FOR_EACH_OBSERVER(MessagePumpObserver, observers_, DestroyMessagePump());
26 }
27
24 void MessagePumpWin::AddObserver(MessagePumpObserver* observer) { 28 void MessagePumpWin::AddObserver(MessagePumpObserver* observer) {
25 observers_.AddObserver(observer); 29 observers_.AddObserver(observer);
26 } 30 }
27 31
28 void MessagePumpWin::RemoveObserver(MessagePumpObserver* observer) { 32 void MessagePumpWin::RemoveObserver(MessagePumpObserver* observer) {
29 observers_.RemoveObserver(observer); 33 observers_.RemoveObserver(observer);
30 } 34 }
31 35
32 void MessagePumpWin::WillProcessMessage(const MSG& msg) { 36 void MessagePumpWin::WillProcessMessage(const MSG& msg) {
33 FOR_EACH_OBSERVER(MessagePumpObserver, observers_, WillProcessEvent(msg)); 37 FOR_EACH_OBSERVER(MessagePumpObserver, observers_, WillProcessEvent(msg));
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 578
575 void MessagePumpForIO::WillProcessIOEvent() { 579 void MessagePumpForIO::WillProcessIOEvent() {
576 FOR_EACH_OBSERVER(IOObserver, io_observers_, WillProcessIOEvent()); 580 FOR_EACH_OBSERVER(IOObserver, io_observers_, WillProcessIOEvent());
577 } 581 }
578 582
579 void MessagePumpForIO::DidProcessIOEvent() { 583 void MessagePumpForIO::DidProcessIOEvent() {
580 FOR_EACH_OBSERVER(IOObserver, io_observers_, DidProcessIOEvent()); 584 FOR_EACH_OBSERVER(IOObserver, io_observers_, DidProcessIOEvent());
581 } 585 }
582 586
583 } // namespace base 587 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698