| OLD | NEW |
| 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/renderer_host/render_widget_host_view_gtk.h" | 5 #include "chrome/browser/renderer_host/render_widget_host_view_gtk.h" |
| 6 | 6 |
| 7 // If this gets included after the gtk headers, then a bunch of compiler | 7 // If this gets included after the gtk headers, then a bunch of compiler |
| 8 // errors happen because of a "#define Status int" in Xlib.h, which interacts | 8 // errors happen because of a "#define Status int" in Xlib.h, which interacts |
| 9 // badly with URLRequestStatus::Status. | 9 // badly with URLRequestStatus::Status. |
| 10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 GtkWidget* widget = gtk_fixed_new(); | 47 GtkWidget* widget = gtk_fixed_new(); |
| 48 gtk_widget_set_name(widget, "chrome-render-widget-host-view"); | 48 gtk_widget_set_name(widget, "chrome-render-widget-host-view"); |
| 49 gtk_fixed_set_has_window(GTK_FIXED(widget), TRUE); | 49 gtk_fixed_set_has_window(GTK_FIXED(widget), TRUE); |
| 50 gtk_widget_set_double_buffered(widget, FALSE); | 50 gtk_widget_set_double_buffered(widget, FALSE); |
| 51 gtk_widget_set_redraw_on_allocate(widget, FALSE); | 51 gtk_widget_set_redraw_on_allocate(widget, FALSE); |
| 52 #if defined(NDEBUG) | 52 #if defined(NDEBUG) |
| 53 gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, &gfx::kGdkWhite); | 53 gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, &gfx::kGdkWhite); |
| 54 #else | 54 #else |
| 55 gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, &gfx::kGdkGreen); | 55 gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, &gfx::kGdkGreen); |
| 56 #endif | 56 #endif |
| 57 // Allow the browser window to be resized freely. |
| 58 gtk_widget_set_size_request(widget, 0, 0); |
| 57 | 59 |
| 58 gtk_widget_add_events(widget, GDK_EXPOSURE_MASK | | 60 gtk_widget_add_events(widget, GDK_EXPOSURE_MASK | |
| 59 GDK_POINTER_MOTION_MASK | | 61 GDK_POINTER_MOTION_MASK | |
| 60 GDK_BUTTON_PRESS_MASK | | 62 GDK_BUTTON_PRESS_MASK | |
| 61 GDK_BUTTON_RELEASE_MASK | | 63 GDK_BUTTON_RELEASE_MASK | |
| 62 GDK_KEY_PRESS_MASK | | 64 GDK_KEY_PRESS_MASK | |
| 63 GDK_KEY_RELEASE_MASK | | 65 GDK_KEY_RELEASE_MASK | |
| 64 GDK_FOCUS_CHANGE_MASK | | 66 GDK_FOCUS_CHANGE_MASK | |
| 65 GDK_ENTER_NOTIFY_MASK | | 67 GDK_ENTER_NOTIFY_MASK | |
| 66 GDK_LEAVE_NOTIFY_MASK); | 68 GDK_LEAVE_NOTIFY_MASK); |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 const NativeWebKeyboardEvent& event) { | 695 const NativeWebKeyboardEvent& event) { |
| 694 if (!host_) | 696 if (!host_) |
| 695 return; | 697 return; |
| 696 | 698 |
| 697 EditCommands edit_commands; | 699 EditCommands edit_commands; |
| 698 if (key_bindings_handler_->Match(event, &edit_commands)) { | 700 if (key_bindings_handler_->Match(event, &edit_commands)) { |
| 699 host_->ForwardEditCommandsForNextKeyEvent(edit_commands); | 701 host_->ForwardEditCommandsForNextKeyEvent(edit_commands); |
| 700 } | 702 } |
| 701 host_->ForwardKeyboardEvent(event); | 703 host_->ForwardKeyboardEvent(event); |
| 702 } | 704 } |
| OLD | NEW |