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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 if (gtk_widget_is_focus(widget)) | 321 if (gtk_widget_is_focus(widget)) |
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 if (delegate_.get()) | 333 if (delegate_.get()) |
333 delegate_->ShowContextMenu(params); | 334 delegate_->ShowContextMenu(params, type); |
334 else | 335 else |
335 DLOG(ERROR) << "Cannot show context menus without a delegate."; | 336 DLOG(ERROR) << "Cannot show context menus without a delegate."; |
336 } | 337 } |
337 | 338 |
338 void WebContentsViewGtk::ShowPopupMenu(const gfx::Rect& bounds, | 339 void WebContentsViewGtk::ShowPopupMenu(const gfx::Rect& bounds, |
339 int item_height, | 340 int item_height, |
340 double item_font_size, | 341 double item_font_size, |
341 int selected_item, | 342 int selected_item, |
342 const std::vector<WebMenuItem>& items, | 343 const std::vector<WebMenuItem>& items, |
343 bool right_aligned, | 344 bool right_aligned, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 // 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 |
388 // spurious resizes from GTK+. | 389 // spurious resizes from GTK+. |
389 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); | 390 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); |
390 if (rwhv) | 391 if (rwhv) |
391 rwhv->SetSize(size); | 392 rwhv->SetSize(size); |
392 if (web_contents_->GetInterstitialPage()) | 393 if (web_contents_->GetInterstitialPage()) |
393 web_contents_->GetInterstitialPage()->SetSize(size); | 394 web_contents_->GetInterstitialPage()->SetSize(size); |
394 } | 395 } |
395 | 396 |
396 } // namespace content | 397 } // namespace content |
OLD | NEW |