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

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

Issue 3060045: Making window.focus() work in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 55530)
+++ chrome/browser/tab_contents/interstitial_page.cc (working copy)
@@ -107,6 +107,8 @@
virtual void UpdateDragCursor(WebDragOperation operation);
virtual void GotFocus();
virtual void TakeFocus(bool reverse);
+ virtual void Activate();
+ virtual void Deactivate();
virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
bool* is_keyboard_shortcut);
virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event);
@@ -609,6 +611,16 @@
interstitial_page_->tab()->GetViewDelegate()->TakeFocus(reverse);
}
+void InterstitialPage::InterstitialPageRVHViewDelegate::Activate() {
+ if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate())
+ interstitial_page_->tab()->GetViewDelegate()->Activate();
+}
+
+void InterstitialPage::InterstitialPageRVHViewDelegate::Deactivate() {
+ if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate())
+ interstitial_page_->tab()->GetViewDelegate()->Deactivate();
+}
+
bool InterstitialPage::InterstitialPageRVHViewDelegate::PreHandleKeyboardEvent(
const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) {
if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate())
« no previous file with comments | « chrome/browser/tab_contents/background_contents.h ('k') | chrome/browser/tab_contents/tab_contents_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698