summaryrefslogtreecommitdiffstats
path: root/cloud_print/service/win
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-08 00:10:03 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-08 00:10:03 +0000
commit93805f36f94bd5f824cff64e2f61e24a2df16d6d (patch)
tree6405a410b8b20a37581d5617ae045c23274d2829 /cloud_print/service/win
parent58d8c71c27e4f4e832f76ee6332fdcc16b0ed42b (diff)
downloadchromium_src-93805f36f94bd5f824cff64e2f61e24a2df16d6d.zip
chromium_src-93805f36f94bd5f824cff64e2f61e24a2df16d6d.tar.gz
chromium_src-93805f36f94bd5f824cff64e2f61e24a2df16d6d.tar.bz2
message-pump: Change how MessagePumpDispatchers process events.
This patch allows a MessagePumpDispatcher to invoke the default handling of the message in the message-pump by setting the DISPATCH_DEFAULT flag on the return value from the ::Dispatch() callback. As before, the dispatcher can still request a termination of the current message-loop, but setting the DISPATCH_QUIT flag on the return value (instead of returning false). The callback can set both flags, in which case the message-loop will perform the default action, and also terminate the current loop. As a result of this, we can remove duplicate code, namely aura::DispatcherWin, and aura::Env::GetDispatcher(), that performs the same action as the default message pump. R=darin@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/152083004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249860 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print/service/win')
-rw-r--r--cloud_print/service/win/cloud_print_service_config.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/cloud_print/service/win/cloud_print_service_config.cc b/cloud_print/service/win/cloud_print_service_config.cc
index 58fcacc..9556826 100644
--- a/cloud_print/service/win/cloud_print_service_config.cc
+++ b/cloud_print/service/win/cloud_print_service_config.cc
@@ -37,13 +37,12 @@ class SetupDialog : public base::RefCounted<SetupDialog>,
virtual ~Dispatcher() {};
// MessagePumpDispatcher:
- virtual bool Dispatch(const MSG& msg) OVERRIDE {
+ virtual uint32_t Dispatch(const MSG& msg) OVERRIDE {
MSG msg2 = msg;
- if (!dialog_->IsDialogMessage(&msg2)) {
- ::TranslateMessage(&msg);
- ::DispatchMessage(&msg);
- }
- return true;
+ uint32_t action = POST_DISPATCH_NONE;
+ if (!dialog_->IsDialogMessage(&msg2))
+ action = POST_DISPATCH_PERFORM_DEFAULT;
+ return action;
}
private: