| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/shell/browser/shell.h" | 5 #include "content/shell/browser/shell.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #import "base/mac/scoped_nsobject.h" | 10 #import "base/mac/scoped_nsobject.h" |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 | 281 |
| 282 NSString* title_string = base::SysUTF16ToNSString(title); | 282 NSString* title_string = base::SysUTF16ToNSString(title); |
| 283 [window_ setTitle:title_string]; | 283 [window_ setTitle:title_string]; |
| 284 } | 284 } |
| 285 | 285 |
| 286 bool Shell::PlatformHandleContextMenu( | 286 bool Shell::PlatformHandleContextMenu( |
| 287 const content::ContextMenuParams& params) { | 287 const content::ContextMenuParams& params) { |
| 288 return false; | 288 return false; |
| 289 } | 289 } |
| 290 | 290 |
| 291 void Shell::PlatformWebContentsFocused(WebContents* contents) { |
| 292 if (headless_) |
| 293 return; |
| 294 |
| 295 NOTIMPLEMENTED(); |
| 296 return; |
| 297 } |
| 298 |
| 291 void Shell::Close() { | 299 void Shell::Close() { |
| 292 if (headless_) | 300 if (headless_) |
| 293 delete this; | 301 delete this; |
| 294 else | 302 else |
| 295 [window_ performClose:nil]; | 303 [window_ performClose:nil]; |
| 296 } | 304 } |
| 297 | 305 |
| 298 void Shell::ActionPerformed(int control) { | 306 void Shell::ActionPerformed(int control) { |
| 299 switch (control) { | 307 switch (control) { |
| 300 case IDC_NAV_BACK: | 308 case IDC_NAV_BACK: |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 [[event.os_event characters] isEqual:@"l"]) { | 341 [[event.os_event characters] isEqual:@"l"]) { |
| 334 [window_ makeFirstResponder:url_edit_view_]; | 342 [window_ makeFirstResponder:url_edit_view_]; |
| 335 return; | 343 return; |
| 336 } | 344 } |
| 337 | 345 |
| 338 [[NSApp mainMenu] performKeyEquivalent:event.os_event]; | 346 [[NSApp mainMenu] performKeyEquivalent:event.os_event]; |
| 339 } | 347 } |
| 340 } | 348 } |
| 341 | 349 |
| 342 } // namespace content | 350 } // namespace content |
| OLD | NEW |