summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-08 17:33:05 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-08 17:33:05 +0000
commitf83f78d23b22fce4465781cb153791fd7ad46e93 (patch)
treea4dad5611b88c66995c1181ed26288a8bd5260e6 /chrome/browser/tab_contents
parent684a1714b83e869f39c492802d9950a65e5f90ce (diff)
downloadchromium_src-f83f78d23b22fce4465781cb153791fd7ad46e93.zip
chromium_src-f83f78d23b22fce4465781cb153791fd7ad46e93.tar.gz
chromium_src-f83f78d23b22fce4465781cb153791fd7ad46e93.tar.bz2
Remove a comment that doesn't seem to be true anymore. Change to using an assert.
I tried using a debugger to repro, but was unable to. BUG=9914 Review URL: http://codereview.chromium.org/115111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15649 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_gtk.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/chrome/browser/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/tab_contents/tab_contents_view_gtk.cc
index a55c8fe..2c3c808 100644
--- a/chrome/browser/tab_contents/tab_contents_view_gtk.cc
+++ b/chrome/browser/tab_contents/tab_contents_view_gtk.cc
@@ -210,14 +210,10 @@ void TabContentsViewGtk::HandleKeyboardEvent(
// This may be an accelerator. Try to pass it on to our browser window
// to handle.
GtkWindow* window = GetTopLevelNativeWindow();
- // It's possible to not be associated with a window at the time when we're
- // handling the keyboard event (e.g., the user opened a new tab in the time).
- // What we really want to do is get whatever currently has focus and have
- // that handle the accelerator. TODO(tc): Consider walking
- // gtk_window_list_toplevels to find what has focus and if that's a browser
- // window, forward the event.
- if (!window)
+ if (!window) {
+ NOTREACHED();
return;
+ }
BrowserWindowGtk* browser_window = static_cast<BrowserWindowGtk*>(
g_object_get_data(G_OBJECT(window), "browser_window_gtk"));