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

Side by Side Diff: content/browser/tab_contents/web_contents_view_mac.mm

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 #import <Carbon/Carbon.h> 5 #import <Carbon/Carbon.h>
6 6
7 #import "content/browser/tab_contents/web_contents_view_mac.h" 7 #import "content/browser/tab_contents/web_contents_view_mac.h"
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 gfx::Rect()); 337 gfx::Rect());
338 338
339 // A RenderWidgetHostViewMac has lifetime scoped to the view. Now that it's 339 // A RenderWidgetHostViewMac has lifetime scoped to the view. Now that it's
340 // properly embedded (or purposely ignored) we can release the retain we took 340 // properly embedded (or purposely ignored) we can release the retain we took
341 // in CreateNewFullscreenWidgetInternal(). 341 // in CreateNewFullscreenWidgetInternal().
342 RenderWidgetHostViewMac* widget_view_mac = 342 RenderWidgetHostViewMac* widget_view_mac =
343 static_cast<RenderWidgetHostViewMac*>(widget_host_view); 343 static_cast<RenderWidgetHostViewMac*>(widget_host_view);
344 [widget_view_mac->GetNativeView() release]; 344 [widget_view_mac->GetNativeView() release];
345 } 345 }
346 346
347 void WebContentsViewMac::ShowContextMenu(const ContextMenuParams& params) { 347 void WebContentsViewMac::ShowContextMenu(
348 const content::ContextMenuParams& params) {
348 // Allow delegates to handle the context menu operation first. 349 // Allow delegates to handle the context menu operation first.
349 if (tab_contents_->GetDelegate() && 350 if (tab_contents_->GetDelegate() &&
350 tab_contents_->GetDelegate()->HandleContextMenu(params)) { 351 tab_contents_->GetDelegate()->HandleContextMenu(params)) {
351 return; 352 return;
352 } 353 }
353 354
354 if (delegate()) 355 if (delegate())
355 delegate()->ShowContextMenu(params); 356 delegate()->ShowContextMenu(params);
356 else 357 else
357 DLOG(ERROR) << "Cannot show context menus without a delegate."; 358 DLOG(ERROR) << "Cannot show context menus without a delegate.";
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 [[[notification userInfo] objectForKey:kSelectionDirection] 604 [[[notification userInfo] objectForKey:kSelectionDirection]
604 unsignedIntegerValue]; 605 unsignedIntegerValue];
605 if (direction == NSDirectSelection) 606 if (direction == NSDirectSelection)
606 return; 607 return;
607 608
608 [self tabContents]-> 609 [self tabContents]->
609 FocusThroughTabTraversal(direction == NSSelectingPrevious); 610 FocusThroughTabTraversal(direction == NSSelectingPrevious);
610 } 611 }
611 612
612 @end 613 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698