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

Side by Side Diff: content/browser/tab_contents/tab_contents_view_gtk.cc

Issue 9307063: Split TabContentsViewMac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 8 years, 10 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/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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 void TabContentsViewGtk::ShowContextMenu(const ContextMenuParams& params) { 380 void TabContentsViewGtk::ShowContextMenu(const ContextMenuParams& params) {
381 // Allow delegates to handle the context menu operation first. 381 // Allow delegates to handle the context menu operation first.
382 if (web_contents()->GetDelegate() && 382 if (web_contents()->GetDelegate() &&
383 web_contents()->GetDelegate()->HandleContextMenu(params)) { 383 web_contents()->GetDelegate()->HandleContextMenu(params)) {
384 return; 384 return;
385 } 385 }
386 386
387 if (wrapper()) 387 if (wrapper())
388 wrapper()->ShowContextMenu(params); 388 wrapper()->ShowContextMenu(params);
389 else 389 else
390 DLOG(ERROR) << "Implement context menus without chrome/ code"; 390 DLOG(ERROR) << "Cannot show context menus without a delegate.";
391 } 391 }
392 392
393 void TabContentsViewGtk::ShowPopupMenu(const gfx::Rect& bounds, 393 void TabContentsViewGtk::ShowPopupMenu(const gfx::Rect& bounds,
394 int item_height, 394 int item_height,
395 double item_font_size, 395 double item_font_size,
396 int selected_item, 396 int selected_item,
397 const std::vector<WebMenuItem>& items, 397 const std::vector<WebMenuItem>& items,
398 bool right_aligned) { 398 bool right_aligned) {
399 // We are not using external popup menus on Linux, they are rendered by 399 // We are not using external popup menus on Linux, they are rendered by
400 // WebKit. 400 // WebKit.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 // We manually tell our RWHV to resize the renderer content. This avoids 442 // We manually tell our RWHV to resize the renderer content. This avoids
443 // spurious resizes from GTK+. 443 // spurious resizes from GTK+.
444 RenderWidgetHostView* rwhv = tab_contents_->GetRenderWidgetHostView(); 444 RenderWidgetHostView* rwhv = tab_contents_->GetRenderWidgetHostView();
445 if (rwhv) 445 if (rwhv)
446 rwhv->SetSize(size); 446 rwhv->SetSize(size);
447 if (tab_contents_->GetInterstitialPage()) 447 if (tab_contents_->GetInterstitialPage())
448 tab_contents_->GetInterstitialPage()->SetSize(size); 448 tab_contents_->GetInterstitialPage()->SetSize(size);
449 } 449 }
450 450
451 } // namespace content 451 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698