summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-31 22:53:37 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-31 22:53:37 +0000
commit148d105e27c7c8c2cda0c81292690b9edafcae1f (patch)
treee278052fc84a6e5399aec5bd0d423162aecb6d16 /chrome/test
parentdc75d4823b598a9b9b313728a06f6b47d6a73929 (diff)
downloadchromium_src-148d105e27c7c8c2cda0c81292690b9edafcae1f.zip
chromium_src-148d105e27c7c8c2cda0c81292690b9edafcae1f.tar.gz
chromium_src-148d105e27c7c8c2cda0c81292690b9edafcae1f.tar.bz2
This CL adds accelerators to the Linux toolkit views.
The MessageLoop had to be modified to support Dispatchers on Linux. BUG=None TEST=On Windows and Linux, make sure the accelerators still work as expected. On Linux toolkit views, build and run the unit-tests. Review URL: http://codereview.chromium.org/159046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22210 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/ui_test_utils.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc
index ee9b7d4..928ff87 100644
--- a/chrome/test/ui_test_utils.cc
+++ b/chrome/test/ui_test_utils.cc
@@ -18,8 +18,8 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/common/notification_service.h"
-#if defined (OS_WIN)
-#include "views/widget/accelerator_handler.h"
+#if defined(TOOLKIT_VIEWS)
+#include "views/focus/accelerator_handler.h"
#endif
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
@@ -260,9 +260,11 @@ void RunMessageLoop() {
MessageLoopForUI* loop = MessageLoopForUI::current();
bool did_allow_task_nesting = loop->NestableTasksAllowed();
loop->SetNestableTasksAllowed(true);
-#if defined (OS_WIN)
+#if defined(TOOLKIT_VIEWS)
views::AcceleratorHandler handler;
loop->Run(&handler);
+#elif defined(OS_LINUX)
+ loop->Run(NULL);
#else
loop->Run();
#endif