| OLD | NEW | 
|---|
| 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 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1257     // Remove the command key from the flags, it means "keep the window in | 1257     // Remove the command key from the flags, it means "keep the window in | 
| 1258     // the background" in this case. | 1258     // the background" in this case. | 
| 1259     modifierFlags &= ~NSCommandKeyMask; | 1259     modifierFlags &= ~NSCommandKeyMask; | 
| 1260   } | 1260   } | 
| 1261   chrome::ExecuteCommandWithDisposition( | 1261   chrome::ExecuteCommandWithDisposition( | 
| 1262       targetController->browser_.get(), command, | 1262       targetController->browser_.get(), command, | 
| 1263       ui::WindowOpenDispositionFromNSEventWithFlags( | 1263       ui::WindowOpenDispositionFromNSEventWithFlags( | 
| 1264           [NSApp currentEvent], modifierFlags)); | 1264           [NSApp currentEvent], modifierFlags)); | 
| 1265 } | 1265 } | 
| 1266 | 1266 | 
| 1267 // Called when another part of the internal codebase needs to execute a |  | 
| 1268 // command. |  | 
| 1269 - (void)executeCommand:(int)command { |  | 
| 1270   chrome::ExecuteCommand(browser_.get(), command); |  | 
| 1271 } |  | 
| 1272 |  | 
| 1273 - (BOOL)handledByExtensionCommand:(NSEvent*)event | 1267 - (BOOL)handledByExtensionCommand:(NSEvent*)event | 
| 1274     priority:(ui::AcceleratorManager::HandlerPriority)priority { | 1268     priority:(ui::AcceleratorManager::HandlerPriority)priority { | 
| 1275   return extension_keybinding_registry_->ProcessKeyEvent( | 1269   return extension_keybinding_registry_->ProcessKeyEvent( | 
| 1276       content::NativeWebKeyboardEvent(event), priority); | 1270       content::NativeWebKeyboardEvent(event), priority); | 
| 1277 } | 1271 } | 
| 1278 | 1272 | 
| 1279 // StatusBubble delegate method: tell the status bubble the frame it should | 1273 // StatusBubble delegate method: tell the status bubble the frame it should | 
| 1280 // position itself in. | 1274 // position itself in. | 
| 1281 - (NSRect)statusBubbleBaseFrame { | 1275 - (NSRect)statusBubbleBaseFrame { | 
| 1282   NSView* view = [overlayableContentsController_ view]; | 1276   NSView* view = [overlayableContentsController_ view]; | 
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2272 | 2266 | 
| 2273 - (BOOL)supportsBookmarkBar { | 2267 - (BOOL)supportsBookmarkBar { | 
| 2274   return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2268   return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 
| 2275 } | 2269 } | 
| 2276 | 2270 | 
| 2277 - (BOOL)isTabbedWindow { | 2271 - (BOOL)isTabbedWindow { | 
| 2278   return browser_->is_type_tabbed(); | 2272   return browser_->is_type_tabbed(); | 
| 2279 } | 2273 } | 
| 2280 | 2274 | 
| 2281 @end  // @implementation BrowserWindowController(WindowType) | 2275 @end  // @implementation BrowserWindowController(WindowType) | 
| OLD | NEW | 
|---|