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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 388313002: mac: Allow WebContents key handling to supplant extension overrides of the bookmark shortcut. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment from wittman. Created 6 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 ui::WindowOpenDispositionFromNSEventWithFlags( 1219 ui::WindowOpenDispositionFromNSEventWithFlags(
1220 [NSApp currentEvent], modifierFlags)); 1220 [NSApp currentEvent], modifierFlags));
1221 } 1221 }
1222 1222
1223 // Called when another part of the internal codebase needs to execute a 1223 // Called when another part of the internal codebase needs to execute a
1224 // command. 1224 // command.
1225 - (void)executeCommand:(int)command { 1225 - (void)executeCommand:(int)command {
1226 chrome::ExecuteCommand(browser_.get(), command); 1226 chrome::ExecuteCommand(browser_.get(), command);
1227 } 1227 }
1228 1228
1229 - (BOOL)handledByExtensionCommand:(NSEvent*)event { 1229 - (BOOL)handledByExtensionCommand:(NSEvent*)event
1230 priority:
1231 (ui::AcceleratorManager::HandlerPriority)priority {
Scott Hess - ex-Googler 2014/07/15 19:20:59 Sigh.
erikchen 2014/07/15 20:48:40 Done.
1230 return extension_keybinding_registry_->ProcessKeyEvent( 1232 return extension_keybinding_registry_->ProcessKeyEvent(
1231 content::NativeWebKeyboardEvent(event)); 1233 content::NativeWebKeyboardEvent(event), priority);
1232 } 1234 }
1233 1235
1234 // StatusBubble delegate method: tell the status bubble the frame it should 1236 // StatusBubble delegate method: tell the status bubble the frame it should
1235 // position itself in. 1237 // position itself in.
1236 - (NSRect)statusBubbleBaseFrame { 1238 - (NSRect)statusBubbleBaseFrame {
1237 NSView* view = [overlayableContentsController_ view]; 1239 NSView* view = [overlayableContentsController_ view];
1238 return [view convertRect:[view bounds] toView:nil]; 1240 return [view convertRect:[view bounds] toView:nil];
1239 } 1241 }
1240 1242
1241 - (void)updateToolbarWithContents:(WebContents*)tab { 1243 - (void)updateToolbarWithContents:(WebContents*)tab {
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
2291 2293
2292 - (BOOL)supportsBookmarkBar { 2294 - (BOOL)supportsBookmarkBar {
2293 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2295 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2294 } 2296 }
2295 2297
2296 - (BOOL)isTabbedWindow { 2298 - (BOOL)isTabbedWindow {
2297 return browser_->is_type_tabbed(); 2299 return browser_->is_type_tabbed();
2298 } 2300 }
2299 2301
2300 @end // @implementation BrowserWindowController(WindowType) 2302 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698