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

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

Issue 10031044: TabContents -> WebContentsImpl, part 5. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (fixed) Created 8 years, 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 if (event->type == GDK_BUTTON_PRESS && !gtk_widget_has_focus(widget)) 330 if (event->type == GDK_BUTTON_PRESS && !gtk_widget_has_focus(widget))
331 gtk_widget_grab_focus(widget); 331 gtk_widget_grab_focus(widget);
332 332
333 host_view->is_popup_first_mouse_release_ = false; 333 host_view->is_popup_first_mouse_release_ = false;
334 RenderWidgetHostImpl* widget_host = 334 RenderWidgetHostImpl* widget_host =
335 RenderWidgetHostImpl::From(host_view->GetRenderWidgetHost()); 335 RenderWidgetHostImpl::From(host_view->GetRenderWidgetHost());
336 if (widget_host) 336 if (widget_host)
337 widget_host->ForwardMouseEvent(WebInputEventFactory::mouseEvent(event)); 337 widget_host->ForwardMouseEvent(WebInputEventFactory::mouseEvent(event));
338 338
339 // Although we did handle the mouse event, we need to let other handlers 339 // Although we did handle the mouse event, we need to let other handlers
340 // run (in particular the one installed by TabContentsViewGtk). 340 // run (in particular the one installed by WebContentsViewGtk).
341 return FALSE; 341 return FALSE;
342 } 342 }
343 343
344 static gboolean OnMouseMoveEvent(GtkWidget* widget, 344 static gboolean OnMouseMoveEvent(GtkWidget* widget,
345 GdkEventMotion* event, 345 GdkEventMotion* event,
346 RenderWidgetHostViewGtk* host_view) { 346 RenderWidgetHostViewGtk* host_view) {
347 // We want to translate the coordinates of events that do not originate 347 // We want to translate the coordinates of events that do not originate
348 // from this widget to be relative to the top left of the widget. 348 // from this widget to be relative to the top left of the widget.
349 GtkWidget* event_widget = gtk_get_event_widget( 349 GtkWidget* event_widget = gtk_get_event_widget(
350 reinterpret_cast<GdkEvent*>(event)); 350 reinterpret_cast<GdkEvent*>(event));
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 return new RenderWidgetHostViewGtk(widget); 1380 return new RenderWidgetHostViewGtk(widget);
1381 } 1381 }
1382 1382
1383 // static 1383 // static
1384 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo( 1384 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo(
1385 WebKit::WebScreenInfo* results) { 1385 WebKit::WebScreenInfo* results) {
1386 GdkWindow* gdk_window = 1386 GdkWindow* gdk_window =
1387 gdk_display_get_default_group(gdk_display_get_default()); 1387 gdk_display_get_default_group(gdk_display_get_default());
1388 content::GetScreenInfoFromNativeWindow(gdk_window, results); 1388 content::GetScreenInfoFromNativeWindow(gdk_window, results);
1389 } 1389 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698