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

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

Issue 122002: Moving the WM_SETFOCUS message processing out of FocusManager (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months 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 18286)
+++ chrome/browser/tab_contents/interstitial_page.cc (working copy)
@@ -83,6 +83,7 @@
virtual void ShowContextMenu(const ContextMenuParams& params);
virtual void StartDragging(const WebDropData& drop_data);
virtual void UpdateDragCursor(bool is_drop_target);
+ virtual void GotFocus();
virtual void TakeFocus(bool reverse);
virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event);
virtual void HandleMouseEvent();
@@ -210,6 +211,13 @@
old_view->Show();
}
+ // If the focus was on the interstitial, let's keep it to the page.
+ // (Note that in unit-tests the RVH may not have a view).
+ if (render_view_host_->view() && render_view_host_->view()->HasFocus() &&
+ tab_->render_view_host()->view()) {
+ tab_->render_view_host()->view()->Focus();
+ }
+
render_view_host_->Shutdown();
render_view_host_ = NULL;
if (tab_->interstitial_page())
@@ -519,6 +527,9 @@
NOTREACHED() << "InterstitialPage does not support dragging yet.";
}
+void InterstitialPage::InterstitialPageRVHViewDelegate::GotFocus() {
+}
+
void InterstitialPage::InterstitialPageRVHViewDelegate::UpdatePreferredWidth(
int pref_width) {
}
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_win.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698