| 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/web_contents/web_contents_view_gtk.h" | 5 #include "content/browser/web_contents/web_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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 return FALSE; | 322 return FALSE; |
| 323 | 323 |
| 324 gtk_widget_grab_focus(widget); | 324 gtk_widget_grab_focus(widget); |
| 325 bool reverse = focus == GTK_DIR_TAB_BACKWARD; | 325 bool reverse = focus == GTK_DIR_TAB_BACKWARD; |
| 326 web_contents_->FocusThroughTabTraversal(reverse); | 326 web_contents_->FocusThroughTabTraversal(reverse); |
| 327 return TRUE; | 327 return TRUE; |
| 328 } | 328 } |
| 329 | 329 |
| 330 void WebContentsViewGtk::ShowContextMenu( | 330 void WebContentsViewGtk::ShowContextMenu( |
| 331 const content::ContextMenuParams& params, | 331 const content::ContextMenuParams& params, |
| 332 const content::ContextMenuSourceType& type) { | 332 content::ContextMenuSourceType type) { |
| 333 if (delegate_.get()) | 333 if (delegate_.get()) |
| 334 delegate_->ShowContextMenu(params, type); | 334 delegate_->ShowContextMenu(params, type); |
| 335 else | 335 else |
| 336 DLOG(ERROR) << "Cannot show context menus without a delegate."; | 336 DLOG(ERROR) << "Cannot show context menus without a delegate."; |
| 337 } | 337 } |
| 338 | 338 |
| 339 void WebContentsViewGtk::ShowPopupMenu(const gfx::Rect& bounds, | 339 void WebContentsViewGtk::ShowPopupMenu(const gfx::Rect& bounds, |
| 340 int item_height, | 340 int item_height, |
| 341 double item_font_size, | 341 double item_font_size, |
| 342 int selected_item, | 342 int selected_item, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 // We manually tell our RWHV to resize the renderer content. This avoids | 388 // We manually tell our RWHV to resize the renderer content. This avoids |
| 389 // spurious resizes from GTK+. | 389 // spurious resizes from GTK+. |
| 390 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); | 390 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); |
| 391 if (rwhv) | 391 if (rwhv) |
| 392 rwhv->SetSize(size); | 392 rwhv->SetSize(size); |
| 393 if (web_contents_->GetInterstitialPage()) | 393 if (web_contents_->GetInterstitialPage()) |
| 394 web_contents_->GetInterstitialPage()->SetSize(size); | 394 web_contents_->GetInterstitialPage()->SetSize(size); |
| 395 } | 395 } |
| 396 | 396 |
| 397 } // namespace content | 397 } // namespace content |
| OLD | NEW |