| 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 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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:(ui::AcceleratorManager::HandlerPriority)priority { |
| 1230 return extension_keybinding_registry_->ProcessKeyEvent( | 1231 return extension_keybinding_registry_->ProcessKeyEvent( |
| 1231 content::NativeWebKeyboardEvent(event)); | 1232 content::NativeWebKeyboardEvent(event), priority); |
| 1232 } | 1233 } |
| 1233 | 1234 |
| 1234 // StatusBubble delegate method: tell the status bubble the frame it should | 1235 // StatusBubble delegate method: tell the status bubble the frame it should |
| 1235 // position itself in. | 1236 // position itself in. |
| 1236 - (NSRect)statusBubbleBaseFrame { | 1237 - (NSRect)statusBubbleBaseFrame { |
| 1237 NSView* view = [overlayableContentsController_ view]; | 1238 NSView* view = [overlayableContentsController_ view]; |
| 1238 return [view convertRect:[view bounds] toView:nil]; | 1239 return [view convertRect:[view bounds] toView:nil]; |
| 1239 } | 1240 } |
| 1240 | 1241 |
| 1241 - (void)updateToolbarWithContents:(WebContents*)tab { | 1242 - (void)updateToolbarWithContents:(WebContents*)tab { |
| (...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2291 | 2292 |
| 2292 - (BOOL)supportsBookmarkBar { | 2293 - (BOOL)supportsBookmarkBar { |
| 2293 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2294 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 2294 } | 2295 } |
| 2295 | 2296 |
| 2296 - (BOOL)isTabbedWindow { | 2297 - (BOOL)isTabbedWindow { |
| 2297 return browser_->is_type_tabbed(); | 2298 return browser_->is_type_tabbed(); |
| 2298 } | 2299 } |
| 2299 | 2300 |
| 2300 @end // @implementation BrowserWindowController(WindowType) | 2301 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |