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

Side by Side Diff: chrome/browser/ui/views/tab_contents/tab_contents_view_views.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 "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" 5 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "chrome/browser/ui/constrained_window.h" 10 #include "chrome/browser/ui/constrained_window.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 initial_pos); 335 initial_pos);
336 } 336 }
337 337
338 void TabContentsViewViews::ShowCreatedFullscreenWidget(int route_id) { 338 void TabContentsViewViews::ShowCreatedFullscreenWidget(int route_id) {
339 tab_contents_view_helper_.ShowCreatedWidget(web_contents_, 339 tab_contents_view_helper_.ShowCreatedWidget(web_contents_,
340 route_id, 340 route_id,
341 true, 341 true,
342 gfx::Rect()); 342 gfx::Rect());
343 } 343 }
344 344
345 void TabContentsViewViews::ShowContextMenu(const ContextMenuParams& params) { 345 void TabContentsViewViews::ShowContextMenu(
346 const content::ContextMenuParams& params) {
346 // Allow delegates to handle the context menu operation first. 347 // Allow delegates to handle the context menu operation first.
347 if (web_contents_->GetDelegate() && 348 if (web_contents_->GetDelegate() &&
348 web_contents_->GetDelegate()->HandleContextMenu(params)) { 349 web_contents_->GetDelegate()->HandleContextMenu(params)) {
349 return; 350 return;
350 } 351 }
351 352
352 context_menu_.reset(new RenderViewContextMenuViews(web_contents_, params)); 353 context_menu_.reset(new RenderViewContextMenuViews(web_contents_, params));
353 context_menu_->Init(); 354 context_menu_->Init();
354 355
355 // Don't show empty menus. 356 // Don't show empty menus.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 web_contents_->HideContents(); 470 web_contents_->HideContents();
470 } 471 }
471 } 472 }
472 473
473 void TabContentsViewViews::OnNativeWidgetSizeChanged( 474 void TabContentsViewViews::OnNativeWidgetSizeChanged(
474 const gfx::Size& new_size) { 475 const gfx::Size& new_size) {
475 if (overlaid_view_) 476 if (overlaid_view_)
476 overlaid_view_->SetBounds(gfx::Rect(new_size)); 477 overlaid_view_->SetBounds(gfx::Rect(new_size));
477 views::Widget::OnNativeWidgetSizeChanged(new_size); 478 views::Widget::OnNativeWidgetSizeChanged(new_size);
478 } 479 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698