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

Side by Side Diff: chrome/test/base/ui_controls_internal_win.cc

Issue 12294029: Fix mismatched prototype in InputDispatcher constructor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 | no next file » | 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 "chrome/test/base/ui_controls_internal_win.h" 5 #include "chrome/test/base/ui_controls_internal_win.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Uninstalls the hook set in InstallHook. 104 // Uninstalls the hook set in InstallHook.
105 void UninstallHook(InputDispatcher* dispatcher) { 105 void UninstallHook(InputDispatcher* dispatcher) {
106 if (current_dispatcher_ == dispatcher) { 106 if (current_dispatcher_ == dispatcher) {
107 installed_hook_ = false; 107 installed_hook_ = false;
108 current_dispatcher_ = NULL; 108 current_dispatcher_ = NULL;
109 UnhookWindowsHookEx(next_hook_); 109 UnhookWindowsHookEx(next_hook_);
110 } 110 }
111 } 111 }
112 112
113 InputDispatcher::InputDispatcher(const base::Closure& task, 113 InputDispatcher::InputDispatcher(const base::Closure& task,
114 UINT message_waiting_for) 114 WPARAM message_waiting_for)
115 : task_(task), message_waiting_for_(message_waiting_for) { 115 : task_(task), message_waiting_for_(message_waiting_for) {
116 InstallHook(this, message_waiting_for == WM_KEYUP); 116 InstallHook(this, message_waiting_for == WM_KEYUP);
117 } 117 }
118 118
119 InputDispatcher::~InputDispatcher() { 119 InputDispatcher::~InputDispatcher() {
120 // Make sure the hook isn't installed. 120 // Make sure the hook isn't installed.
121 UninstallHook(this); 121 UninstallHook(this);
122 } 122 }
123 123
124 void InputDispatcher::DispatchedMessage(WPARAM message) { 124 void InputDispatcher::DispatchedMessage(WPARAM message) {
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 return false; 338 return false;
339 339
340 if (dispatcher.get()) 340 if (dispatcher.get())
341 dispatcher->AddRef(); 341 dispatcher->AddRef();
342 342
343 return true; 343 return true;
344 } 344 }
345 345
346 } // namespace internal 346 } // namespace internal
347 } // namespace ui_controls 347 } // namespace ui_controls
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698