| OLD | NEW |
| 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/tab_contents/tab_contents_view_gtk.h" | 5 #include "content/browser/tab_contents/tab_contents_view_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
| 8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "content/browser/tab_contents/web_drag_source_gtk.h" | 23 #include "content/browser/tab_contents/web_drag_source_gtk.h" |
| 24 #include "content/public/browser/web_contents_delegate.h" | 24 #include "content/public/browser/web_contents_delegate.h" |
| 25 #include "ui/base/gtk/gtk_expanded_container.h" | 25 #include "ui/base/gtk/gtk_expanded_container.h" |
| 26 #include "ui/gfx/point.h" | 26 #include "ui/gfx/point.h" |
| 27 #include "ui/gfx/rect.h" | 27 #include "ui/gfx/rect.h" |
| 28 #include "ui/gfx/size.h" | 28 #include "ui/gfx/size.h" |
| 29 #include "webkit/glue/webdropdata.h" | 29 #include "webkit/glue/webdropdata.h" |
| 30 | 30 |
| 31 using WebKit::WebDragOperation; | 31 using WebKit::WebDragOperation; |
| 32 using WebKit::WebDragOperationsMask; | 32 using WebKit::WebDragOperationsMask; |
| 33 using content::RenderWidgetHostView; |
| 33 using content::WebContents; | 34 using content::WebContents; |
| 34 | 35 |
| 35 namespace { | 36 namespace { |
| 36 | 37 |
| 37 // Called when the mouse leaves the widget. We notify our delegate. | 38 // Called when the mouse leaves the widget. We notify our delegate. |
| 38 gboolean OnLeaveNotify(GtkWidget* widget, GdkEventCrossing* event, | 39 gboolean OnLeaveNotify(GtkWidget* widget, GdkEventCrossing* event, |
| 39 TabContents* tab_contents) { | 40 TabContents* tab_contents) { |
| 40 if (tab_contents->GetDelegate()) | 41 if (tab_contents->GetDelegate()) |
| 41 tab_contents->GetDelegate()->ContentsMouseEvent( | 42 tab_contents->GetDelegate()->ContentsMouseEvent( |
| 42 tab_contents, gfx::Point(event->x_root, event->y_root), false); | 43 tab_contents, gfx::Point(event->x_root, event->y_root), false); |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 // We manually tell our RWHV to resize the renderer content. This avoids | 444 // We manually tell our RWHV to resize the renderer content. This avoids |
| 444 // spurious resizes from GTK+. | 445 // spurious resizes from GTK+. |
| 445 RenderWidgetHostView* rwhv = tab_contents_->GetRenderWidgetHostView(); | 446 RenderWidgetHostView* rwhv = tab_contents_->GetRenderWidgetHostView(); |
| 446 if (rwhv) | 447 if (rwhv) |
| 447 rwhv->SetSize(size); | 448 rwhv->SetSize(size); |
| 448 if (tab_contents_->GetInterstitialPage()) | 449 if (tab_contents_->GetInterstitialPage()) |
| 449 tab_contents_->GetInterstitialPage()->SetSize(size); | 450 tab_contents_->GetInterstitialPage()->SetSize(size); |
| 450 } | 451 } |
| 451 | 452 |
| 452 } // namespace content | 453 } // namespace content |
| OLD | NEW |