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

Side by Side Diff: chrome/browser/cocoa/browser_window_cocoa.mm

Issue 224023: Don't send tab switching/killing/creating keyboard accelerators to pages. Th... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: call Browser:IsReservedAccelerator from tab_contents_view.cc instead of each platform file Created 11 years, 2 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
« no previous file with comments | « chrome/browser/cocoa/browser_window_cocoa.h ('k') | chrome/browser/extensions/extension_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "base/gfx/rect.h" 5 #include "base/gfx/rect.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/sys_string_conversions.h" 7 #include "base/sys_string_conversions.h"
8 #include "chrome/browser/bookmarks/bookmark_utils.h" 8 #include "chrome/browser/bookmarks/bookmark_utils.h"
9 #include "chrome/browser/cocoa/browser_window_cocoa.h" 9 #include "chrome/browser/cocoa/browser_window_cocoa.h"
10 #import "chrome/browser/cocoa/browser_window_controller.h" 10 #import "chrome/browser/cocoa/browser_window_controller.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 } 313 }
314 314
315 void BrowserWindowCocoa::ShowPageMenu() { 315 void BrowserWindowCocoa::ShowPageMenu() {
316 // No-op. Mac doesn't support showing the menus via alt keys. 316 // No-op. Mac doesn't support showing the menus via alt keys.
317 } 317 }
318 318
319 void BrowserWindowCocoa::ShowAppMenu() { 319 void BrowserWindowCocoa::ShowAppMenu() {
320 // No-op. Mac doesn't support showing the menus via alt keys. 320 // No-op. Mac doesn't support showing the menus via alt keys.
321 } 321 }
322 322
323 int BrowserWindowCocoa::GetCommandId(const NativeWebKeyboardEvent& event) {
324 // TODO(port): return the command id if this is a keyboard accelerator.
325 // CommandForKeyboardShortcut() doesn't have the full list.
Nico 2009/10/02 03:11:01 Yes, that's because in cocoa most keyboard shortcu
326 return -1;
327 }
328
323 void BrowserWindowCocoa::Observe(NotificationType type, 329 void BrowserWindowCocoa::Observe(NotificationType type,
324 const NotificationSource& source, 330 const NotificationSource& source,
325 const NotificationDetails& details) { 331 const NotificationDetails& details) {
326 switch (type.value) { 332 switch (type.value) {
327 // Only the key window gets a direct toggle from the menu. 333 // Only the key window gets a direct toggle from the menu.
328 // Other windows hear about it from the notification. 334 // Other windows hear about it from the notification.
329 case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED: 335 case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED:
330 [controller_ toggleBookmarkBar]; 336 [controller_ toggleBookmarkBar];
331 break; 337 break;
332 default: 338 default:
333 NOTREACHED(); // we don't ask for anything else! 339 NOTREACHED(); // we don't ask for anything else!
334 break; 340 break;
335 } 341 }
336 } 342 }
337 343
338 void BrowserWindowCocoa::DestroyBrowser() { 344 void BrowserWindowCocoa::DestroyBrowser() {
339 [controller_ destroyBrowser]; 345 [controller_ destroyBrowser];
340 346
341 // at this point the controller is dead (autoreleased), so 347 // at this point the controller is dead (autoreleased), so
342 // make sure we don't try to reference it any more. 348 // make sure we don't try to reference it any more.
343 } 349 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/browser_window_cocoa.h ('k') | chrome/browser/extensions/extension_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698