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

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

Issue 9382037: Move ContextMenuParams struct from webkit/glue to content/public/common. The reasons are: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 initial_pos); 370 initial_pos);
371 } 371 }
372 372
373 void TabContentsViewGtk::ShowCreatedFullscreenWidget(int route_id) { 373 void TabContentsViewGtk::ShowCreatedFullscreenWidget(int route_id) {
374 tab_contents_view_helper_.ShowCreatedWidget(tab_contents_, 374 tab_contents_view_helper_.ShowCreatedWidget(tab_contents_,
375 route_id, 375 route_id,
376 true, 376 true,
377 gfx::Rect()); 377 gfx::Rect());
378 } 378 }
379 379
380 void TabContentsViewGtk::ShowContextMenu(const ContextMenuParams& params) { 380 void TabContentsViewGtk::ShowContextMenu(
381 const content::ContextMenuParams& params) {
381 // Allow delegates to handle the context menu operation first. 382 // Allow delegates to handle the context menu operation first.
382 if (web_contents()->GetDelegate() && 383 if (web_contents()->GetDelegate() &&
383 web_contents()->GetDelegate()->HandleContextMenu(params)) { 384 web_contents()->GetDelegate()->HandleContextMenu(params)) {
384 return; 385 return;
385 } 386 }
386 387
387 if (wrapper()) 388 if (wrapper())
388 wrapper()->ShowContextMenu(params); 389 wrapper()->ShowContextMenu(params);
389 else 390 else
390 DLOG(ERROR) << "Cannot show context menus without a delegate."; 391 DLOG(ERROR) << "Cannot show context menus without a delegate.";
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 // We manually tell our RWHV to resize the renderer content. This avoids 443 // We manually tell our RWHV to resize the renderer content. This avoids
443 // spurious resizes from GTK+. 444 // spurious resizes from GTK+.
444 RenderWidgetHostView* rwhv = tab_contents_->GetRenderWidgetHostView(); 445 RenderWidgetHostView* rwhv = tab_contents_->GetRenderWidgetHostView();
445 if (rwhv) 446 if (rwhv)
446 rwhv->SetSize(size); 447 rwhv->SetSize(size);
447 if (tab_contents_->GetInterstitialPage()) 448 if (tab_contents_->GetInterstitialPage())
448 tab_contents_->GetInterstitialPage()->SetSize(size); 449 tab_contents_->GetInterstitialPage()->SetSize(size);
449 } 450 }
450 451
451 } // namespace content 452 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698