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

Side by Side Diff: chrome/browser/tab_contents/tab_contents_view_mac.mm

Issue 7227007: [Mac] Show correct cursor after context menu is closed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/tab_contents/tab_contents_view_mac.h" 7 #include "chrome/browser/tab_contents/tab_contents_view_mac.h"
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // iterated past the last focusable element on the page). 252 // iterated past the last focusable element on the page).
253 void TabContentsViewMac::TakeFocus(bool reverse) { 253 void TabContentsViewMac::TakeFocus(bool reverse) {
254 if (reverse) { 254 if (reverse) {
255 [[cocoa_view_ window] selectPreviousKeyView:cocoa_view_.get()]; 255 [[cocoa_view_ window] selectPreviousKeyView:cocoa_view_.get()];
256 } else { 256 } else {
257 [[cocoa_view_ window] selectNextKeyView:cocoa_view_.get()]; 257 [[cocoa_view_ window] selectNextKeyView:cocoa_view_.get()];
258 } 258 }
259 } 259 }
260 260
261 void TabContentsViewMac::ShowContextMenu(const ContextMenuParams& params) { 261 void TabContentsViewMac::ShowContextMenu(const ContextMenuParams& params) {
262 RenderViewContextMenuMac menu(tab_contents(), 262 context_menu_.reset(new RenderViewContextMenuMac(tab_contents(),
263 params, 263 params,
264 GetContentNativeView()); 264 GetContentNativeView()));
265 menu.Init(); 265 context_menu_->Init();
266 } 266 }
267 267
268 // Display a popup menu for WebKit using Cocoa widgets. 268 // Display a popup menu for WebKit using Cocoa widgets.
269 void TabContentsViewMac::ShowPopupMenu( 269 void TabContentsViewMac::ShowPopupMenu(
270 const gfx::Rect& bounds, 270 const gfx::Rect& bounds,
271 int item_height, 271 int item_height,
272 double item_font_size, 272 double item_font_size,
273 int selected_item, 273 int selected_item,
274 const std::vector<WebMenuItem>& items, 274 const std::vector<WebMenuItem>& items,
275 bool right_aligned) { 275 bool right_aligned) {
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 [[[notification userInfo] objectForKey:kSelectionDirection] 544 [[[notification userInfo] objectForKey:kSelectionDirection]
545 unsignedIntegerValue]; 545 unsignedIntegerValue];
546 if (direction == NSDirectSelection) 546 if (direction == NSDirectSelection)
547 return; 547 return;
548 548
549 [self tabContents]-> 549 [self tabContents]->
550 FocusThroughTabTraversal(direction == NSSelectingPrevious); 550 FocusThroughTabTraversal(direction == NSSelectingPrevious);
551 } 551 }
552 552
553 @end 553 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698