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

Side by Side Diff: chrome/browser/tab_contents/interstitial_page.cc

Issue 224023: Don't send tab switching/killing/creating keyboard accelerators to pages. Th... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: call Browser:IsReservedAccelerator from tab_contents_view.cc instead of each platform file Created 11 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/tab_contents/interstitial_page.h" 5 #include "chrome/browser/tab_contents/interstitial_page.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/thread.h" 9 #include "base/thread.h"
10 #include "chrome/browser/browser_list.h" 10 #include "chrome/browser/browser_list.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 bool user_gesture, 86 bool user_gesture,
87 const GURL& creator_url); 87 const GURL& creator_url);
88 virtual void ShowCreatedWidget(int route_id, 88 virtual void ShowCreatedWidget(int route_id,
89 const gfx::Rect& initial_pos); 89 const gfx::Rect& initial_pos);
90 virtual void ShowContextMenu(const ContextMenuParams& params); 90 virtual void ShowContextMenu(const ContextMenuParams& params);
91 virtual void StartDragging(const WebDropData& drop_data, 91 virtual void StartDragging(const WebDropData& drop_data,
92 WebDragOperationsMask operations_allowed); 92 WebDragOperationsMask operations_allowed);
93 virtual void UpdateDragCursor(WebDragOperation operation); 93 virtual void UpdateDragCursor(WebDragOperation operation);
94 virtual void GotFocus(); 94 virtual void GotFocus();
95 virtual void TakeFocus(bool reverse); 95 virtual void TakeFocus(bool reverse);
96 virtual bool IsReservedAccelerator(const NativeWebKeyboardEvent& event);
96 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); 97 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event);
97 virtual void HandleMouseEvent(); 98 virtual void HandleMouseEvent();
98 virtual void HandleMouseLeave(); 99 virtual void HandleMouseLeave();
99 virtual void OnFindReply(int request_id, 100 virtual void OnFindReply(int request_id,
100 int number_of_matches, 101 int number_of_matches,
101 const gfx::Rect& selection_rect, 102 const gfx::Rect& selection_rect,
102 int active_match_ordinal, 103 int active_match_ordinal,
103 bool final_update); 104 bool final_update);
104 virtual void UpdatePreferredWidth(int pref_width); 105 virtual void UpdatePreferredWidth(int pref_width);
105 106
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 void InterstitialPage::InterstitialPageRVHViewDelegate::UpdatePreferredWidth( 569 void InterstitialPage::InterstitialPageRVHViewDelegate::UpdatePreferredWidth(
569 int pref_width) { 570 int pref_width) {
570 } 571 }
571 572
572 void InterstitialPage::InterstitialPageRVHViewDelegate::TakeFocus( 573 void InterstitialPage::InterstitialPageRVHViewDelegate::TakeFocus(
573 bool reverse) { 574 bool reverse) {
574 if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate()) 575 if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate())
575 interstitial_page_->tab()->GetViewDelegate()->TakeFocus(reverse); 576 interstitial_page_->tab()->GetViewDelegate()->TakeFocus(reverse);
576 } 577 }
577 578
579 bool InterstitialPage::InterstitialPageRVHViewDelegate::IsReservedAccelerator(
580 const NativeWebKeyboardEvent& event) {
581 return false;
582 }
583
578 void InterstitialPage::InterstitialPageRVHViewDelegate::HandleKeyboardEvent( 584 void InterstitialPage::InterstitialPageRVHViewDelegate::HandleKeyboardEvent(
579 const NativeWebKeyboardEvent& event) { 585 const NativeWebKeyboardEvent& event) {
580 if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate()) 586 if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate())
581 interstitial_page_->tab()->GetViewDelegate()->HandleKeyboardEvent(event); 587 interstitial_page_->tab()->GetViewDelegate()->HandleKeyboardEvent(event);
582 } 588 }
583 589
584 void InterstitialPage::InterstitialPageRVHViewDelegate::HandleMouseEvent() { 590 void InterstitialPage::InterstitialPageRVHViewDelegate::HandleMouseEvent() {
585 if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate()) 591 if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate())
586 interstitial_page_->tab()->GetViewDelegate()->HandleMouseEvent(); 592 interstitial_page_->tab()->GetViewDelegate()->HandleMouseEvent();
587 } 593 }
588 594
589 void InterstitialPage::InterstitialPageRVHViewDelegate::HandleMouseLeave() { 595 void InterstitialPage::InterstitialPageRVHViewDelegate::HandleMouseLeave() {
590 if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate()) 596 if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate())
591 interstitial_page_->tab()->GetViewDelegate()->HandleMouseLeave(); 597 interstitial_page_->tab()->GetViewDelegate()->HandleMouseLeave();
592 } 598 }
593 599
594 void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply( 600 void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply(
595 int request_id, int number_of_matches, const gfx::Rect& selection_rect, 601 int request_id, int number_of_matches, const gfx::Rect& selection_rect,
596 int active_match_ordinal, bool final_update) { 602 int active_match_ordinal, bool final_update) {
597 } 603 }
598 604
599 int InterstitialPage::GetBrowserWindowID() const { 605 int InterstitialPage::GetBrowserWindowID() const {
600 return tab_->GetBrowserWindowID(); 606 return tab_->GetBrowserWindowID();
601 } 607 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698