Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/web_contents_view_gtk.h" | 5 #include "chrome/browser/tab_contents/web_contents_view_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
| 8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 void WebContentsViewGtk::UpdateDragCursor(bool is_drop_target) { | 155 void WebContentsViewGtk::UpdateDragCursor(bool is_drop_target) { |
| 156 NOTIMPLEMENTED(); | 156 NOTIMPLEMENTED(); |
| 157 } | 157 } |
| 158 | 158 |
| 159 // This is called when we the renderer asks us to take focus back (i.e., it has | 159 // This is called when we the renderer asks us to take focus back (i.e., it has |
| 160 // iterated past the last focusable element on the page). | 160 // iterated past the last focusable element on the page). |
| 161 void WebContentsViewGtk::TakeFocus(bool reverse) { | 161 void WebContentsViewGtk::TakeFocus(bool reverse) { |
| 162 web_contents_->delegate()->SetFocusToLocationBar(); | 162 web_contents_->delegate()->SetFocusToLocationBar(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 | |
| 166 void WebContentsViewGtk::HandleKeyboardEvent( | 165 void WebContentsViewGtk::HandleKeyboardEvent( |
| 167 const NativeWebKeyboardEvent& event) { | 166 const NativeWebKeyboardEvent& event) { |
| 168 // The renderer returned a keyboard event it did not process. This may be a | 167 // The renderer returned a keyboard event it did not process. This may be a |
| 169 // keyboard shortcut that we have to process or a cursor key/page up/down | 168 // keyboard shortcut that we have to process or a cursor key/page up/down |
| 170 // etc. | 169 // etc. |
| 171 switch (event.os_event->keyval) { | 170 switch (event.os_event->keyval) { |
| 172 case GDK_Page_Up: | 171 case GDK_Page_Up: |
| 173 case GDK_Page_Down: | 172 case GDK_Page_Down: |
| 174 case GDK_Left: | 173 case GDK_Left: |
| 175 case GDK_Right: | 174 case GDK_Right: |
| 176 case GDK_Up: | 175 case GDK_Up: |
| 177 case GDK_Down: | 176 case GDK_Down: |
| 178 NOTIMPLEMENTED() | 177 NOTIMPLEMENTED() |
| 179 << "Need better navigation support in HandleKeyboardEvent"; | 178 << "Need better navigation support in HandleKeyboardEvent"; |
| 180 break; | 179 break; |
| 181 default: | 180 default: |
| 182 // This may be an accelerator. Pass it on to GTK. | 181 // This may be an accelerator. Pass it on to GTK. |
| 183 gtk_accel_groups_activate(G_OBJECT(vbox_->window), | 182 GtkWindow* window = GetTopLevelNativeView(); |
|
Dean McNamee
2009/03/16 19:19:02
GetTopLevelNativeView returning a Window still see
Evan Stade
2009/03/16 19:25:49
will change the name of that function in a follow
| |
| 184 event.os_event->keyval, | 183 gtk_accel_groups_activate(G_OBJECT(window), event.os_event->keyval, |
| 185 GdkModifierType(event.os_event->state)); | 184 GdkModifierType(event.os_event->state)); |
| 186 } | 185 } |
| 187 } | 186 } |
| 188 | 187 |
| 189 void WebContentsViewGtk::OnFindReply(int request_id, | 188 void WebContentsViewGtk::OnFindReply(int request_id, |
| 190 int number_of_matches, | 189 int number_of_matches, |
| 191 const gfx::Rect& selection_rect, | 190 const gfx::Rect& selection_rect, |
| 192 int active_match_ordinal, | 191 int active_match_ordinal, |
| 193 bool final_update) { | 192 bool final_update) { |
| 194 NOTIMPLEMENTED(); | 193 NOTIMPLEMENTED(); |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 223 const gfx::Rect& initial_pos, | 222 const gfx::Rect& initial_pos, |
| 224 bool user_gesture) { | 223 bool user_gesture) { |
| 225 NOTIMPLEMENTED(); | 224 NOTIMPLEMENTED(); |
| 226 } | 225 } |
| 227 | 226 |
| 228 void WebContentsViewGtk::ShowCreatedWidgetInternal( | 227 void WebContentsViewGtk::ShowCreatedWidgetInternal( |
| 229 RenderWidgetHostView* widget_host_view, | 228 RenderWidgetHostView* widget_host_view, |
| 230 const gfx::Rect& initial_pos) { | 229 const gfx::Rect& initial_pos) { |
| 231 NOTIMPLEMENTED(); | 230 NOTIMPLEMENTED(); |
| 232 } | 231 } |
| OLD | NEW |