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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_gtk.cc

Issue 7972006: Removed sending of the content IPC messages from chrome and replaced them with corresponding APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/renderer_host/render_widget_host_view_gtk.h" 5 #include "content/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 net::URLRequestStatus::Status. 9 // badly with net::URLRequestStatus::Status.
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 922
923 BackingStore* RenderWidgetHostViewGtk::AllocBackingStore( 923 BackingStore* RenderWidgetHostViewGtk::AllocBackingStore(
924 const gfx::Size& size) { 924 const gfx::Size& size) {
925 return new BackingStoreX(host_, size, 925 return new BackingStoreX(host_, size,
926 ui::GetVisualFromGtkWidget(view_.get()), 926 ui::GetVisualFromGtkWidget(view_.get()),
927 gtk_widget_get_visual(view_.get())->depth); 927 gtk_widget_get_visual(view_.get())->depth);
928 } 928 }
929 929
930 void RenderWidgetHostViewGtk::SetBackground(const SkBitmap& background) { 930 void RenderWidgetHostViewGtk::SetBackground(const SkBitmap& background) {
931 RenderWidgetHostView::SetBackground(background); 931 RenderWidgetHostView::SetBackground(background);
932 host_->Send(new ViewMsg_SetBackground(host_->routing_id(), background)); 932 host_->SetBackground(background);
933 } 933 }
934 934
935 void RenderWidgetHostViewGtk::ModifyEventForEdgeDragging( 935 void RenderWidgetHostViewGtk::ModifyEventForEdgeDragging(
936 GtkWidget* widget, GdkEventMotion* event) { 936 GtkWidget* widget, GdkEventMotion* event) {
937 // If the widget is aligned with an edge of the monitor its on and the user 937 // If the widget is aligned with an edge of the monitor its on and the user
938 // attempts to drag past that edge we track the number of times it has 938 // attempts to drag past that edge we track the number of times it has
939 // occurred, so that we can force the widget to scroll when it otherwise 939 // occurred, so that we can force the widget to scroll when it otherwise
940 // would be unable to, by modifying the (x,y) position in the drag 940 // would be unable to, by modifying the (x,y) position in the drag
941 // event that we forward on to webkit. If we get a move that's no longer a 941 // event that we forward on to webkit. If we get a move that's no longer a
942 // drag or a drag indicating the user is no longer at that edge we stop 942 // drag or a drag indicating the user is no longer at that edge we stop
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 1185
1186 void RenderWidgetHostViewGtk::ForwardKeyboardEvent( 1186 void RenderWidgetHostViewGtk::ForwardKeyboardEvent(
1187 const NativeWebKeyboardEvent& event) { 1187 const NativeWebKeyboardEvent& event) {
1188 if (!host_) 1188 if (!host_)
1189 return; 1189 return;
1190 1190
1191 #if !defined(OS_CHROMEOS) 1191 #if !defined(OS_CHROMEOS)
1192 EditCommands edit_commands; 1192 EditCommands edit_commands;
1193 if (!event.skip_in_browser && 1193 if (!event.skip_in_browser &&
1194 key_bindings_handler_->Match(event, &edit_commands)) { 1194 key_bindings_handler_->Match(event, &edit_commands)) {
1195 host_->Send(new ViewMsg_SetEditCommandsForNextKeyEvent( 1195 host_->SetEditCommandsForNextKeyEvent(edit_commands);
1196 host_->routing_id(), edit_commands));
1197 NativeWebKeyboardEvent copy_event(event); 1196 NativeWebKeyboardEvent copy_event(event);
1198 copy_event.match_edit_command = true; 1197 copy_event.match_edit_command = true;
1199 host_->ForwardKeyboardEvent(copy_event); 1198 host_->ForwardKeyboardEvent(copy_event);
1200 return; 1199 return;
1201 } 1200 }
1202 #endif 1201 #endif
1203 1202
1204 host_->ForwardKeyboardEvent(event); 1203 host_->ForwardKeyboardEvent(event);
1205 } 1204 }
1206 1205
(...skipping 24 matching lines...) Expand all
1231 last_mouse_down_ = temp; 1230 last_mouse_down_ = temp;
1232 } 1231 }
1233 1232
1234 // static 1233 // static
1235 void RenderWidgetHostView::GetDefaultScreenInfo( 1234 void RenderWidgetHostView::GetDefaultScreenInfo(
1236 WebKit::WebScreenInfo* results) { 1235 WebKit::WebScreenInfo* results) {
1237 GdkWindow* gdk_window = 1236 GdkWindow* gdk_window =
1238 gdk_display_get_default_group(gdk_display_get_default()); 1237 gdk_display_get_default_group(gdk_display_get_default());
1239 content::GetScreenInfoFromNativeWindow(gdk_window, results); 1238 content::GetScreenInfoFromNativeWindow(gdk_window, results);
1240 } 1239 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698