summaryrefslogtreecommitdiffstats
path: root/cloud_print
diff options
context:
space:
mode:
authorvitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-06 04:11:51 +0000
committervitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-06 04:11:51 +0000
commit33c0f57d77e38a009034fb7d0e905755d9620035 (patch)
tree9f892607630f8db16846d68871b7f2d2645b1f05 /cloud_print
parent6e15c4252612b14575d81dd005f3817ee95f4a0d (diff)
downloadchromium_src-33c0f57d77e38a009034fb7d0e905755d9620035.zip
chromium_src-33c0f57d77e38a009034fb7d0e905755d9620035.tar.gz
chromium_src-33c0f57d77e38a009034fb7d0e905755d9620035.tar.bz2
Revert 249234 "Use MessagePumpDispatcher instead of MessageFilter"
Failed non-Aura build. > Use MessagePumpDispatcher instead of MessageFilter > > This is a preparation to remove base::MessageLoopForUI::MessageFilter. > > BUG=330735, 319122 > TEST=done by manually executing cloud_print_service_config.exe > > Review URL: https://codereview.chromium.org/152033005 TBR=yukawa@chromium.org Review URL: https://codereview.chromium.org/150283005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249268 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print')
-rw-r--r--cloud_print/service/win/cloud_print_service_config.cc27
1 files changed, 11 insertions, 16 deletions
diff --git a/cloud_print/service/win/cloud_print_service_config.cc b/cloud_print/service/win/cloud_print_service_config.cc
index d19e256..d622e64 100644
--- a/cloud_print/service/win/cloud_print_service_config.cc
+++ b/cloud_print/service/win/cloud_print_service_config.cc
@@ -11,8 +11,6 @@
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/message_loop/message_loop.h"
-#include "base/message_loop/message_pump_dispatcher.h"
-#include "base/run_loop.h"
#include "base/strings/string16.h"
#include "base/threading/thread.h"
#include "chrome/common/chrome_constants.h"
@@ -31,19 +29,15 @@ class SetupDialog : public base::RefCounted<SetupDialog>,
public ATL::CDialogImpl<SetupDialog> {
public:
// Enables accelerators.
- class Dispatcher : public base::MessagePumpDispatcher {
+ class MessageFilter : public base::MessageLoopForUI::MessageFilter {
public:
- explicit Dispatcher(SetupDialog* dialog) : dialog_(dialog) {}
- virtual ~Dispatcher() {};
+ explicit MessageFilter(SetupDialog* dialog) : dialog_(dialog){}
+ virtual ~MessageFilter() {};
- // MessagePumpDispatcher:
- virtual bool Dispatch(const MSG& msg) OVERRIDE {
+ // MessageLoopForUI::MessageFilter
+ virtual bool ProcessMessage(const MSG& msg) OVERRIDE {
MSG msg2 = msg;
- if (!dialog_->IsDialogMessage(&msg2)) {
- ::TranslateMessage(&msg);
- ::DispatchMessage(&msg);
- }
- return true;
+ return dialog_->IsDialogMessage(&msg2) != FALSE;
}
private:
@@ -450,9 +444,10 @@ int WINAPI WinMain(__in HINSTANCE hInstance,
scoped_refptr<SetupDialog> dialog(new SetupDialog());
dialog->Create(NULL);
dialog->ShowWindow(SW_SHOW);
- SetupDialog::Dispatcher dispatcher(dialog);
- base::RunLoop run_loop;
- run_loop.set_dispatcher(&dispatcher);
- run_loop.Run();
+ scoped_ptr<SetupDialog::MessageFilter> filter(
+ new SetupDialog::MessageFilter(dialog));
+ loop.SetMessageFilter(filter.Pass());
+
+ loop.Run();
return 0;
}