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

Side by Side Diff: chrome/browser/renderer_host/gtk_key_bindings_handler.cc

Issue 6672070: Move the remaining files in chrome\common to content\common. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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) 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/renderer_host/gtk_key_bindings_handler.h" 5 #include "chrome/browser/renderer_host/gtk_key_bindings_handler.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "chrome/common/native_web_keyboard_event.h" 13 #include "content/common/native_web_keyboard_event.h"
14 14
15 GtkKeyBindingsHandler::GtkKeyBindingsHandler(GtkWidget* parent_widget) 15 GtkKeyBindingsHandler::GtkKeyBindingsHandler(GtkWidget* parent_widget)
16 : handler_(CreateNewHandler()) { 16 : handler_(CreateNewHandler()) {
17 DCHECK(GTK_IS_FIXED(parent_widget)); 17 DCHECK(GTK_IS_FIXED(parent_widget));
18 // We need add the |handler_| object into gtk widget hierarchy, so that 18 // We need add the |handler_| object into gtk widget hierarchy, so that
19 // gtk_bindings_activate_event() can find correct display and keymaps from 19 // gtk_bindings_activate_event() can find correct display and keymaps from
20 // the |handler_| object. 20 // the |handler_| object.
21 gtk_fixed_put(GTK_FIXED(parent_widget), handler_.get(), -1, -1); 21 gtk_fixed_put(GTK_FIXED(parent_widget), handler_.get(), -1, -1);
22 } 22 }
23 23
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 void GtkKeyBindingsHandler::MoveFocus(GtkWidget* widget, 316 void GtkKeyBindingsHandler::MoveFocus(GtkWidget* widget,
317 GtkDirectionType arg1) { 317 GtkDirectionType arg1) {
318 // Just for disabling the default handler. 318 // Just for disabling the default handler.
319 #if !GTK_CHECK_VERSION(2, 14, 0) 319 #if !GTK_CHECK_VERSION(2, 14, 0)
320 // Before gtk 2.14.0, there is no way to override a non-virtual default signal 320 // Before gtk 2.14.0, there is no way to override a non-virtual default signal
321 // handler, so we need stop the signal emission explicitly to prevent the 321 // handler, so we need stop the signal emission explicitly to prevent the
322 // default handler from being executed. 322 // default handler from being executed.
323 g_signal_stop_emission_by_name(widget, "move-focus"); 323 g_signal_stop_emission_by_name(widget, "move-focus");
324 #endif 324 #endif
325 } 325 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698