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

Unified Diff: chrome/browser/tab_contents/interstitial_page.cc

Issue 400012: Refactor the keyboard events handling code related to RenderViewHostDelegate:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/tab_contents/interstitial_page.cc
===================================================================
--- chrome/browser/tab_contents/interstitial_page.cc (revision 34219)
+++ chrome/browser/tab_contents/interstitial_page.cc (working copy)
@@ -98,8 +98,9 @@
virtual void UpdateDragCursor(WebDragOperation operation);
virtual void GotFocus();
virtual void TakeFocus(bool reverse);
- virtual bool IsReservedAccelerator(const NativeWebKeyboardEvent& event);
- virtual bool HandleKeyboardEvent(const NativeWebKeyboardEvent& event);
+ virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
+ bool* is_keyboard_shortcut);
+ virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event);
virtual void HandleMouseEvent();
virtual void HandleMouseLeave();
virtual void OnFindReply(int request_id,
@@ -586,17 +587,18 @@
interstitial_page_->tab()->GetViewDelegate()->TakeFocus(reverse);
}
-bool InterstitialPage::InterstitialPageRVHViewDelegate::IsReservedAccelerator(
- const NativeWebKeyboardEvent& event) {
+bool InterstitialPage::InterstitialPageRVHViewDelegate::PreHandleKeyboardEvent(
+ const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) {
+ if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate())
+ return interstitial_page_->tab()->GetViewDelegate()->PreHandleKeyboardEvent(
+ event, is_keyboard_shortcut);
return false;
}
-bool InterstitialPage::InterstitialPageRVHViewDelegate::HandleKeyboardEvent(
+void InterstitialPage::InterstitialPageRVHViewDelegate::HandleKeyboardEvent(
const NativeWebKeyboardEvent& event) {
if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate())
- return interstitial_page_->tab()->GetViewDelegate()->
- HandleKeyboardEvent(event);
- return false;
+ interstitial_page_->tab()->GetViewDelegate()->HandleKeyboardEvent(event);
}
void InterstitialPage::InterstitialPageRVHViewDelegate::HandleMouseEvent() {
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_mac.mm ('k') | chrome/browser/tab_contents/tab_contents_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698