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

Side by Side Diff: chrome/browser/tab_contents/tab_contents_view.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/tab_contents_view.h" 5 #include "chrome/browser/tab_contents/tab_contents_view.h"
6 6
7 #include "chrome/browser/renderer_host/render_process_host.h" 7 #include "chrome/browser/renderer_host/render_process_host.h"
8 #include "chrome/browser/renderer_host/render_widget_host.h" 8 #include "chrome/browser/renderer_host/render_widget_host.h"
9 #include "chrome/browser/renderer_host/render_widget_host_view.h" 9 #include "chrome/browser/renderer_host/render_widget_host_view.h"
10 #include "chrome/browser/tab_contents/tab_contents.h" 10 #include "chrome/browser/tab_contents/tab_contents.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 } 50 }
51 51
52 void TabContentsView::ShowCreatedWidget(int route_id, 52 void TabContentsView::ShowCreatedWidget(int route_id,
53 const gfx::Rect& initial_pos) { 53 const gfx::Rect& initial_pos) {
54 RenderWidgetHostView* widget_host_view = 54 RenderWidgetHostView* widget_host_view =
55 delegate_view_helper_.GetCreatedWidget(route_id); 55 delegate_view_helper_.GetCreatedWidget(route_id);
56 ShowCreatedWidgetInternal(widget_host_view, initial_pos); 56 ShowCreatedWidgetInternal(widget_host_view, initial_pos);
57 } 57 }
58 58
59 bool TabContentsView::IsReservedAccelerator(
60 const NativeWebKeyboardEvent& event) {
61 return tab_contents()->delegate() &&
62 tab_contents()->delegate()->IsReservedAccelerator(event);
63 }
64
59 RenderWidgetHostView* TabContentsView::CreateNewWidgetInternal( 65 RenderWidgetHostView* TabContentsView::CreateNewWidgetInternal(
60 int route_id, bool activatable) { 66 int route_id, bool activatable) {
61 return delegate_view_helper_.CreateNewWidget(route_id, activatable, 67 return delegate_view_helper_.CreateNewWidget(route_id, activatable,
62 tab_contents()->render_view_host()->process()); 68 tab_contents()->render_view_host()->process());
63 } 69 }
64 70
65 void TabContentsView::ShowCreatedWidgetInternal( 71 void TabContentsView::ShowCreatedWidgetInternal(
66 RenderWidgetHostView* widget_host_view, const gfx::Rect& initial_pos) { 72 RenderWidgetHostView* widget_host_view, const gfx::Rect& initial_pos) {
67 if (tab_contents_->delegate()) 73 if (tab_contents_->delegate())
68 tab_contents_->delegate()->RenderWidgetShowing(); 74 tab_contents_->delegate()->RenderWidgetShowing();
69 75
70 widget_host_view->InitAsPopup(tab_contents_->render_widget_host_view(), 76 widget_host_view->InitAsPopup(tab_contents_->render_widget_host_view(),
71 initial_pos); 77 initial_pos);
72 widget_host_view->GetRenderWidgetHost()->Init(); 78 widget_host_view->GetRenderWidgetHost()->Init();
73 } 79 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698