OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 } | 1036 } |
1037 | 1037 |
1038 bool RenderWidgetHostViewGtk::ContainsNativeView( | 1038 bool RenderWidgetHostViewGtk::ContainsNativeView( |
1039 gfx::NativeView native_view) const { | 1039 gfx::NativeView native_view) const { |
1040 // TODO(port) | 1040 // TODO(port) |
1041 NOTREACHED() << | 1041 NOTREACHED() << |
1042 "RenderWidgetHostViewGtk::ContainsNativeView not implemented."; | 1042 "RenderWidgetHostViewGtk::ContainsNativeView not implemented."; |
1043 return false; | 1043 return false; |
1044 } | 1044 } |
1045 | 1045 |
| 1046 void RenderWidgetHostViewGtk::AcceleratedCompositingActivated(bool activated) { |
| 1047 GtkPreserveWindow* widget = |
| 1048 reinterpret_cast<GtkPreserveWindow*>(view_.get()); |
| 1049 |
| 1050 gtk_preserve_window_delegate_resize(widget, activated); |
| 1051 } |
| 1052 |
1046 void RenderWidgetHostViewGtk::ForwardKeyboardEvent( | 1053 void RenderWidgetHostViewGtk::ForwardKeyboardEvent( |
1047 const NativeWebKeyboardEvent& event) { | 1054 const NativeWebKeyboardEvent& event) { |
1048 if (!host_) | 1055 if (!host_) |
1049 return; | 1056 return; |
1050 | 1057 |
1051 EditCommands edit_commands; | 1058 EditCommands edit_commands; |
1052 if (!event.skip_in_browser && | 1059 if (!event.skip_in_browser && |
1053 key_bindings_handler_->Match(event, &edit_commands)) { | 1060 key_bindings_handler_->Match(event, &edit_commands)) { |
1054 host_->ForwardEditCommandsForNextKeyEvent(edit_commands); | 1061 host_->ForwardEditCommandsForNextKeyEvent(edit_commands); |
1055 } | 1062 } |
1056 host_->ForwardKeyboardEvent(event); | 1063 host_->ForwardKeyboardEvent(event); |
1057 } | 1064 } |
1058 | 1065 |
1059 // static | 1066 // static |
1060 RenderWidgetHostView* | 1067 RenderWidgetHostView* |
1061 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( | 1068 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( |
1062 gfx::NativeView widget) { | 1069 gfx::NativeView widget) { |
1063 gpointer user_data = g_object_get_data(G_OBJECT(widget), | 1070 gpointer user_data = g_object_get_data(G_OBJECT(widget), |
1064 kRenderWidgetHostViewKey); | 1071 kRenderWidgetHostViewKey); |
1065 return reinterpret_cast<RenderWidgetHostView*>(user_data); | 1072 return reinterpret_cast<RenderWidgetHostView*>(user_data); |
1066 } | 1073 } |
OLD | NEW |