diff options
author | mazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-20 20:21:11 +0000 |
---|---|---|
committer | mazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-20 20:21:11 +0000 |
commit | e7146cef7148efeaa5b22404e1e3f94aec14749f (patch) | |
tree | 3241a5ebcb2b378a98d7bd5919ee4579a4162616 /ui/web_dialogs | |
parent | 114ade48063f3e979ea39df06d33ab4554ea4611 (diff) | |
download | chromium_src-e7146cef7148efeaa5b22404e1e3f94aec14749f.zip chromium_src-e7146cef7148efeaa5b22404e1e3f94aec14749f.tar.gz chromium_src-e7146cef7148efeaa5b22404e1e3f94aec14749f.tar.bz2 |
Make VKEY_F14 and VKEY_HELP close keyboard overlay.
Also add tests to verify that the shortcuts that open the keyboard overlay close it.
BUG=chrome-os-partner:16067
Review URL: https://chromiumcodereview.appspot.com/11636037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174220 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/web_dialogs')
-rw-r--r-- | ui/web_dialogs/test/test_web_contents_handler.cc | 32 | ||||
-rw-r--r-- | ui/web_dialogs/test/test_web_contents_handler.h | 40 | ||||
-rw-r--r-- | ui/web_dialogs/web_dialogs.gyp | 2 |
3 files changed, 74 insertions, 0 deletions
diff --git a/ui/web_dialogs/test/test_web_contents_handler.cc b/ui/web_dialogs/test/test_web_contents_handler.cc new file mode 100644 index 0000000..4b2077d --- /dev/null +++ b/ui/web_dialogs/test/test_web_contents_handler.cc @@ -0,0 +1,32 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/web_dialogs/test/test_web_contents_handler.h" + +namespace ui { +namespace test { + +TestWebContentsHandler::TestWebContentsHandler() { +} + +TestWebContentsHandler::~TestWebContentsHandler() { +} + +content::WebContents* TestWebContentsHandler::OpenURLFromTab( + content::BrowserContext* context, + content::WebContents* source, + const content::OpenURLParams& params) { + return NULL; +} + +void TestWebContentsHandler::AddNewContents(content::BrowserContext* context, + content::WebContents* source, + content::WebContents* new_contents, + WindowOpenDisposition disposition, + const gfx::Rect& initial_pos, + bool user_gesture) { +} + +} // namespace test +} // namespace ui diff --git a/ui/web_dialogs/test/test_web_contents_handler.h b/ui/web_dialogs/test/test_web_contents_handler.h new file mode 100644 index 0000000..abe2c73 --- /dev/null +++ b/ui/web_dialogs/test/test_web_contents_handler.h @@ -0,0 +1,40 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_WEB_DIALOGS_TEST_TEST_WEB_CONTENTS_HANDLER_H_ +#define UI_WEB_DIALOGS_TEST_TEST_WEB_CONTENTS_HANDLER_H_ + +#include "base/basictypes.h" +#include "base/compiler_specific.h" +#include "ui/web_dialogs/web_dialog_web_contents_delegate.h" + +namespace ui { +namespace test { + +class TestWebContentsHandler + : public WebDialogWebContentsDelegate::WebContentsHandler { + public: + TestWebContentsHandler(); + virtual ~TestWebContentsHandler(); + + private: + // Overridden from WebDialogWebContentsDelegate::WebContentsHandler: + virtual content::WebContents* OpenURLFromTab( + content::BrowserContext* context, + content::WebContents* source, + const content::OpenURLParams& params) OVERRIDE; + virtual void AddNewContents(content::BrowserContext* context, + content::WebContents* source, + content::WebContents* new_contents, + WindowOpenDisposition disposition, + const gfx::Rect& initial_pos, + bool user_gesture) OVERRIDE; + + DISALLOW_COPY_AND_ASSIGN(TestWebContentsHandler); +}; + +} // namespace test +} // namespace ui + +#endif // UI_WEB_DIALOGS_TEST_TEST_WEB_CONTENTS_HANDLER_H_ diff --git a/ui/web_dialogs/web_dialogs.gyp b/ui/web_dialogs/web_dialogs.gyp index 1ac2562..35cc67b 100644 --- a/ui/web_dialogs/web_dialogs.gyp +++ b/ui/web_dialogs/web_dialogs.gyp @@ -41,6 +41,8 @@ 'web_dialogs', ], 'sources': [ + 'test/test_web_contents_handler.cc', + 'test/test_web_contents_handler.h', 'test/test_web_dialog_delegate.cc', 'test/test_web_dialog_delegate.h', 'test/test_web_dialog_observer.cc', |